function setLightBox(state){
	backgroundMovie=getFlashMovieObject("background");
	backgroundMovie.SetVariable("/background/:lightboxState", state);	
}

function setDivLightBox(state, url){
	var lightBox=document.getElementById('lightbox');
	var dimensions=getWindowDimensions();

	lightBox.style.width=dimensions[0];
	lightBox.style.height=dimensions[1];
	lightBox.style.visibility="visible";
	setFrame(url, dimensions);
}

function setFrame(url, dimensions){	
	var content=document.getElementById("content");	
	content.src=url;
	content.style.left=10;
	content.style.top=21;
	content.style.width=dimensions[0]-20;
	content.style.height=dimensions[1]-21;
	content.style.visibility="visible";	
	
	var close=document.getElementById("close");
	close.style.visibility="visible";
}

function getWindowDimensions(){
	var content=document.getElementById("content");	

	var myWidth = 0, myHeight = 0;
  	if( typeof( window.innerWidth ) == 'number' ) {
    			//Non-IE
    			myWidth = window.innerWidth;
    			myHeight = window.innerHeight;
  	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    			//IE 6+ in 'standards compliant mode'
    			myWidth = document.documentElement.clientWidth;
    			myHeight = document.documentElement.clientHeight;
  	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    			//IE 4 compatible
    			myWidth = document.body.clientWidth;
    			myHeight = document.body.clientHeight;
  	}else{
			myWidth = 1600;
    			myHeight = 1070;
	}

	var res=new Array(2);
	res[0]=myWidth;
	res[1]=myHeight;
	return res;
}

function hideContent(){
	//backgroundMovie=getFlashMovieObject("background");
	//backgroundMovie.SetVariable("/background/:lightboxState", 'false');	

	//contentMovie=getFlashMovieObject("web");
	//contentMovie.SetVariable("/web/:lightboxState", 'false');
	
	var lightBox=document.getElementById('lightbox');
	lightBox.style.visibility="hidden";
	lightBox.style.width=10;
	lightBox.style.height=10;	

	var content=document.getElementById("content");
	content.style.visibility="hidden";
	content.src="";

	var close=document.getElementById("close");
	close.style.visibility="hidden";
}
