// Created by Vitaliy Marusyak


function load_flash(num)
{
	// window.document.body.scroll='no';

	document.getElementById('body_id').style.overflow='hidden';
	
		if(num==1) {
		document.getElementById('panel_2').innerHTML='<div align="right" style="width:600px; height:21px;  text-align:center; opacity: 0.70; filter: alpha(opacity=70); -moz-opacity: 0.7;"><div style="float:right;"><a href="#" style="font-size:16px; font-weight:bold; font-family:Tahoma; color:#FFFFFF;" onClick="closePop();"><img src="images/close_but2.jpg" alt="" title="" border=""></a></div></div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="600" height="480"><param name="movie" value="webedu.swf" /><param name="quality" value="high" /><embed src="webedu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="480"></embed></object>';
		};
}

	function resizeBox()
	{
		var panel_2 = document.getElementById('panel_2');
		var width = getWindowWidth()/2 - 300;
		var height = getWindowHeight()/2 - 240;
		panel_2.style.left = width.toString()+'px';
		panel_2.style.top = height.toString()+'px';		
	}	
	
	function dimPop()
	{
		var winHeight = getWindowHeight();
		var winWidth = getWindowWidth();
		
		var dimmer_2 = document.getElementById('dimmer_2');
		var panel_2 = document.getElementById('panel_2');

		dimmer_2.style.width = winWidth + "px";
		dimmer_2.style.height = winHeight + "px";
		
		resizeBox();
		
		dimmer_2.style.display = "block";
		panel_2.style.display = "block";
		
	}
	
	function closePop()
	{
		document.getElementById('body_id').style.overflow='auto';
		var dimmer_2 = document.getElementById('dimmer_2');
		var panel_2 = document.getElementById('panel_2');

		dimmer_2.style.display = "none";
		panel_2.style.display = "none";
	}
	
	function getWindowHeight()
	{
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
					windowHeight = window.innerHeight;
			} else {
					if (document.documentElement && document.documentElement.clientHeight) {
							windowHeight = document.documentElement.clientHeight;
					} else {
							if (document.body && document.body.clientHeight) {
									windowHeight = document.body.clientHeight;
							}
					}
			}
			return( windowHeight );  
	}
	
	function getWindowWidth()
	{
			return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
	}
	
	window.onresize=resizeBox;
