﻿function opnWin(pDivId, sDivId)
{
	var pDiv=document.getElementById(pDivId);
	if(pDiv.style.display=="none")
	{
		pDiv.style.display="block";
	}
	var sDiv=document.getElementById(sDivId);
	if(sDiv.style.display=="none")
	{
		sDiv.style.display="block";
	}
}
function clsWin(pDivId, sDivId)
{
	var pDiv=document.getElementById(pDivId);
	if(pDiv.style.display=="block")
	{
		pDiv.style.display="none";
	}
	var sDiv=document.getElementById(sDivId);
	if(sDiv.style.display=="block")
	{
		sDiv.style.display="none";
	}
}

function gen_popup_swf(src, width, height, page_header) {
	if(!page_header) page_header = "";
	win = window.open("", "_blank", "width=" + (width) + ",height=" + (height) + ",titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no");
	win.document.write("<html><head><title>" + page_header + "</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0><table style='height: 100%' cellspacing='0' cellpadding='0' border='0'><tr><td valgin='middle'>");
	win.document.write("<" + "script" + ">document.title = \"" + page_header + "\";\r\nfunction _CloseOnEsc(e) {if(e){ event = e;} if (event.keyCode == 27) { window.close(); return; }} document.onkeydown = _CloseOnEsc;<" + "/script>");
	win.document.write("<div onclick=\"javascript: window.close();\" style=\"cursor: pointer;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0\" width=\"" + width + "\" height=\"" + height + "\" id=\"com_int\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\" /><param name=\"allowFullScreen\" value=\"false\" /><param name=\"movie\" value=\"" + src + "\" /><param name=\"quality\" value=\"high\" /><param name=\"bgcolor\" value=\"#ffffff\" /><embed src=\"" + src + "\" quality=\"high\" bgcolor=\"#ffffff\" width=\"" + width + "\" height=\"" + height + "\" name=\"presentation\" align=\"middle\" allowScriptAccess=\"sameDomain\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" /></object></div>");
	win.document.write("</td></tr></table></body></html>");
	win.document.close();
	return false;
}
