// 
function gotoSpecial(param)
{
	alert('podano '+param);	
}
//
function design_DoFSCommand(command, args)
	{ 
		if (command == "call_sub")
		{
			setFlashHeight("flash_cont", args);
		}
		if (command == "scroll_div")
		{
			scrollDiv(args);
		}
	}
	//
function newWin(nazwa,szer,wys) {
odlewa=(screen.width-szer)/2;
odgory=(screen.height-wys)/2;	
config='left='+odlewa+',top='+odgory+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
cel=window.open('','okno',config)
cel.document.write('<HTML><HEAD>');
cel.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8">');
cel.document.write('<title>IMAGE</title>');
cel.document.write('</HEAD>');
cel.document.write('<body bgcolor=white leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>');
cel.document.write('<DIV align=center><a href=# onclick="javascript:self.close();"><img src='+nazwa+' border=0></A></DIV>');
cel.document.write('</body></html>');
cel.focus();
}
//
function setFlashWidth(divid, newW){
	document.getElementById('flash_cont').style.width = newW+"px";
}
function setFlashHeight(nh){
	alert("cos");
	var clis = readSize();
	if(clis[1] < nh){
		document.getElementById('flash_cont').style.height = nh+'px';	
		document.getElementById('design').style.height = nh+'px';	
	}else{
		document.getElementById('flash_cont').style.height = clis[1]+'px';	
		document.getElementById('design').style.height = clis[1]+'px';	
	}
}

function setFlashSize(divid, newW, newH){
	setFlashWidth('flash_cont', newW);
	setFlashHeight('flash_cont', newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
//
function readSize() 
{
	var divh = document.getElementById('scroller');
	var divl = document.getElementById('l_cont');
	var tdl = document.getElementById('l_td');
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) 
	{
    	browserType = "notIe";
	    myWidth = window.innerWidth;
	    myHeight = window.innerHeight;
		myHa = 31;
  	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
	{
    //IE 6+ in 'standards compliant mode'
		browserType = "ie6";
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
		myHa = 0;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
	{
		//IE 4 compatible
		browserType = "ie4";
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return [myWidth, myHeight];
}
//
