
var lastNum= new String('subNav1');
var lastcolorId= new String('title1');
var lastContent= new String('content1');
var lastcolorId2= new String('1');
var refreshed=false;

window.onresize= doResize;
var obj = getBody(window);
obj.onresize= doResize;

window.onload=showBG;
obj.onload= showBG;

var minH= 640;
var minHContent=610;



		var flashvars = {

		};
		
		
		var attributes = {
		};
		
		var params = {
		wmode:"transparent",
		scale: "exactfit",
		salign: "tl",
		quality: "high"
		  
		};
		
				
		var params2 = {
		wmode:"transparent", 
		  scale: "normal",
		  salign: "tr",
		  quality: "high"
		  
		};
		
		function showBG()
		{
		swfobject.embedSWF("test.swf", "background", "100%", "100%", "10.0.0.0", "expressInstall.swf",flashvars, params, attributes);
		doResize();
		}
		
		function showMenuEN()
		{
		document.getElementById("menu").className="da";
		swfobject.embedSWF("menuEN.swf", "menu", "800", "610", "10.0.0.0", "expressInstall.swf",flashvars, params2, attributes);
		doResize();
			
		}

		function showMenuRU()
		{
		document.getElementById("menu").className="da";
		swfobject.embedSWF("menuRU.swf", "menu", "800", "610", "10.0.0.0", "expressInstall.swf",flashvars, params2, attributes);
		doResize();
			
		}	
		
		function showMenuDT() 
		{
		document.getElementById("menu").className="da";
		swfobject.embedSWF("menuDT.swf", "menu", "800", "610", "10.0.0.0", "expressInstall.swf",flashvars, params2, attributes);
		doResize();
		}





function doResize() 
{

	var h;
	var w;
	//var obj = getBody(window);

    if(typeof window.innerWidth != 'undefined')
    {
	h = window.innerHeight;
	w = window.innerWidth;
    }
    else
    {

		 h = parseInt(obj.clientHeight);
         w = parseInt(obj.clientWidth);
    }

	
	var faktorW = w/1000;
	var faktorH = h/625;
	
	var prop = w/h;
	
	var resizeH = 625 * faktorW;
	
	var resizeW =1000 * faktorH;
	


	if(prop>=1.6)
	{

	document.getElementById("background").style.height=resizeH+"px";	
	document.getElementById("background").style.width= 100 + "%";	
	}
	else
	{
	document.getElementById("background").style.width= resizeW + "px";
	document.getElementById("background").style.height= 100 + "%";	
	}	

if(h<=minH)
{
	var newH= h - 610;
	if(newH<=0)
	{
	newH=0;	
	}
	
document.getElementById("menu").style.top= newH + "px";	
}
else
{
document.getElementById("menu").style.top="30px";	
}

	
}



		function callAnimation(i)
		{
						var obj = swfobject.getObjectById("background");  					
						if (obj && typeof obj.playAnimation != "undefined") {    										    
 							obj.playAnimation(i); 
						}   
		
		}
		
				function callReverse()
		{

						var obj = swfobject.getObjectById("background");  					
						if (obj && typeof obj.playReverse != "undefined") {    										    
 							obj.playReverse(); 
						}   
		
		}

function getBody(w)
{
    return (w.document.compatMode && w.document.compatMode == "CSS1Compat") ? w.document.documentElement : w.document.body || null;
} 
