	function executeRender(render_config, session_width, render_config_clients, add_width ,document_width){
		
		//var divh = document.getElementById('newsSection').offsetHeight; 
		var IE = /*@cc_on!@*/false;
		
		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;
		}
  
		var change = false;
		  
		if(myWidth < 1000){
			  
		    myWidth = 1000;
			  
		}
		
		//alert(render_config); 
		
		if (IE){
			
			
		 		
				var main_project_width = Math.round(((myWidth- 357) / 100) * 40);
				var main_project_width2 =  ((myWidth - 288) - 24);
				var hype_project_width = Math.round((myWidth - ( main_project_width2 + 500)) / 3) ;
				var main_project_width3 = Math.round(myWidth- 335);
				
			
			
			
			
		} else {
			
			
				
				var main_project_width = Math.round(((myWidth - 350) / 100) * 40);
				var main_project_width2 =  ((myWidth - 288) - 22);
		    	var hype_project_width = Math.round(((myWidth - 350) / 100) * 20); 
				var main_project_width3 = Math.round(myWidth- 357);
				
			
		}
		//project_info_front
		
		
		
		
		
		for(i = 0; i < 3; i++){
			
			if (document.getElementById(["hype_" + i])) {
				document.getElementById(["hype_" + i]).width = hype_project_width + "px";
			}
			
			if (document.getElementById(["hype_" + i])) {
				document.getElementById(["hype_" + i]).style.width = hype_project_width + "px";
			}
			
			if (document.getElementById(["hype_" + i])) {
				document.getElementById(["hype_" + i]).height = ((hype_project_width / 100) * 50)  + "px";
			}
			
			if (document.getElementById(["hyped_project_" + i])) {
				document.getElementById(["hyped_project_" + i]).style.width = hype_project_width + "px";
			}
			
			
		}
		
		if (document.getElementById("project_info")) {
			document.getElementById("project_info").style.width = main_project_width + "px";
		}	
		
		
		if (document.getElementById("project_info_front")) {
			document.getElementById("project_info_front").style.width = (document_width - (170 + 260 + 90)) + "px";
		}
		
		if (document.getElementById("project_info_news")) {
			document.getElementById("project_info_news").style.width = (document_width - (170 + 260 + 20)) + "px";
		}
		
		if (document.getElementById("project_info")) {
			document.getElementById("project_info").style.width = main_project_width + "px";
		}
		
		if (document.getElementById("project_info2")) {
			document.getElementById("project_info2").style.width = main_project_width2  + "px";
		}
		
		if (document.getElementById("project_info3")) {
			document.getElementById("project_info3").style.width = main_project_width3  + "px";
		}
		
		if (document.getElementById("clients")) {
			document.getElementById("clients").style.width = myWidth - 44 + "px";
		}
		
	
		
		if (document.getElementById("clients_logo")) {
			document.getElementById("clients_logo").style.width = 150 + "px";
		}
		
		if (document.getElementById("clients_logo")) {
			document.getElementById('clients_logo').style.zIndex = 0;
		}
		
		
		
				
	}

 	function resetLayout(mode) {
		  
		  
		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;
		}
  
		var change = false;
		  
		if(myWidth < 1000){
			  
		    myWidth = 1000;
			  
		}
		  		
		var render_configuration = null;
		var settings = "settings";
		
		
		
		
		//$.post("http://www.inaflash.no/set_session.php", { width: myWidth});  
			  

					
		if (document.getElementById("logo_cell")) {
			document.getElementById("logo_cell").style.width = 264 + "px";
		}
			  
	    if (document.getElementById("topBannerMenu")) {
			document.getElementById("topBannerMenu").style.width = (myWidth - (306 + 12)) + "px";
		}
		
		if (document.getElementById("lbOverlay")) {
			document.getElementById('lbOverlay').style.zIndex = 100;
		}
		if (document.getElementById("lbCenter")) {
			document.getElementById('lbCenter').style.zIndex = 101;
		} 
			  
		if (document.getElementById("info_text")) {
			document.getElementById("info_text").style.width = ((((myWidth - 55) / 100) * 70)) + "px";
		}
			  
		if (document.getElementById("contact_text")) {
			document.getElementById("contact_text").style.width = ((((myWidth - 55) / 100) * 30)) + "px";
		}
			  
		if (document.getElementById("newsSection")) {
			document.getElementById("newsSection").style.width = 260 + "px";
		}
		
		
			  
			   
		if (document.getElementById("customers")) {
			document.getElementById("customers").style.width = 258 + "px";
		}
		  	
		
		var IE = /*@cc_on!@*/false;
		
			  
		if (document.getElementById("newsSection")) {
			  		
			var divh = document.getElementById('newsSection').offsetHeight; 
					
				if(divh < 300){
					
					var divh = 270;
					
				} else if(divh > 300){ 
			  		
					var divh = 270;
					
				} else {
					
					var divh = document.getElementById('newsSection').offsetHeight;  
					
				}
						
		} else {
				  
			var divh = 274;
					
		}
			  
			  
		
			  
		
		
		
		if (document.getElementById("flash_content_2")) {
			document.getElementById("flash_content_2").width = (myWidth - 52) + "px";
			document.getElementById("flash_content_2").height = 270 + "px";
		}
			  
		if (document.getElementById("project_info4")) {
			document.getElementById("project_info4").style.width = (myWidth - 44)  + "px";
		}
		
		
		
		
		
		//$.get("http://www.inaflash.no/get_session.php", function(data){
  			
			//var dataSplit = data.split(":");
			//executeRender(dataSplit[1], dataSplit[2], dataSplit[3], dataSplit[4], myWidth);
			//render_configuration = data;
			
			
		//});
		
		executeRender("", "", "", "", myWidth);
		
		if (document.getElementById("flash_content_0")) {
			document.getElementById("flash_content_0").width = ((myWidth - 288) - 24) + "px";
			document.getElementById("flash_content_0").height = (divh - 44) + "px";
		}	
		
		
		
		
	}
	
	
	function requestSize(){
				
			
				
		  	  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;
			  }
			  
			  if(myWidth < 1000){
			  
			  	myWidth = 1000;
			 	//return 1000;	
		  
			  }
			  
			  //$.post("set_session.php", { width: myWidth});
			
			
		
				
				
	}
	
function openNewWindow(source){
		
		var fileLoc = ("http://www.stavangerwebdesign.no/movies/moviePlayer.php?source=" + source); 
		//testWindow = window.open ("http://www.lundegruppen.no/swf/moviePlayer.html", "Lunde_Gruppen_AS", "location=no,status=0,scrollbars=1,width=370,height=350,scrollbars=no,resizable=no");
		testWindow = window.open (fileLoc, "Inaflash", "location=no,status=0,scrollbars=1,width=360,height=263,scrollbars=no,resizable=no");
		
		
		
		testWindow.moveTo(0, 0);

	
}

