



var popupBgColor = "#000000" ;
var popupWindowColor = "#ffffff" ;
var popupWindowBorder = "2px solid #080990" ;

function popup(html) {
	wrapper = document.getElementById('site-wrapper') ;
	div1 = document.createElement('div') ;
	div1.id = 'popup-translucent' ;
	div1.style.width = '100%' ;
	div1.style.height = '2000px' ;
	div1.onclick = function() {closePopup()}
	div1.style.position = 'absolute' ;
	div1.style.display = 'block' ;
	div1.style.cssfloat = 'left' ;
	div1.style.top = '0' ;
	div1.style.left = '0' ;
	div1.style.cursor = 'pointer' ;
	div1.style.zIndex = "1000" ;
	div1.style.backgroundColor = popupBgColor ;
	div1.style.padding = '25px' ;
	document.body.appendChild(div1) ;
	div2 = document.createElement('div') ;
	div2.id = 'popup-window' ;
	div2.style.height = '420px' ;
	div2.style.width = '475px' ;
	div2.style.border = popupWindowBorder ;
	div2.style.cssFloat = "left" ;
	div2.style.position = 'absolute' ;
	div2.style.display = 'block' ;
	div2.style.zIndex = "2000" ;
	div2.style.top = '160px' ;
	div2.style.left = '420px' ;
	div2.style.backgroundColor = popupWindowColor ;
	div2.style.padding = '10px' ;
	div2.style.fontSize = '18px' ;
	div2.innerHTML = html ;
	document.body.appendChild(div2) ;
	SetOpacity(div1, 80) ;
}
function closePopup() {
    var reMove = document.getElementById('popup-window');
    reMove.parentNode.removeChild(reMove);
    var reMove = document.getElementById('popup-translucent');
    reMove.parentNode.removeChild(reMove);
}
function SetOpacity(elem, opacityAsInt)
{
     var opacityAsDecimal = opacityAsInt;
     
     if (opacityAsInt > 100)
         opacityAsInt = opacityAsDecimal = 100; 
     else if (opacityAsInt < 0)
         opacityAsInt = opacityAsDecimal = 0; 
    
    opacityAsDecimal /= 100;
    if (opacityAsInt < 1)
        opacityAsInt = 1; // IE7 bug, text smoothing cuts out if 0
   
    elem.style.opacity = (opacityAsDecimal);
    elem.style.filter  = "alpha(opacity=" + opacityAsInt + ")";
}


function goFlash(file)
{
	var code1 = "<div id='flashcontent'></div><script type='text/javascript'>var so = new SWFObject('http://www.shomer-tec.com/flash/video-player.swf', 'mymovie', '475', '395', '8', '#ffffff');so.useExpressInstall('expressinstall.swf');so.addParam('AllowFullScreen', 'true');so.addVariable('flvVideo', 'MossadPenFinal.flv');so.addVariable('flvSkin', 'SkinOverAll.swf');so.addVariable('skinColor', '0xCCCCCC');so.write('flashcontent');</script>" ;
	var code2 = '<embed id="mymovie" width="475" height="395" flashvars="flvVideo=' + file + '&flvSkin=SkinOverAll.swf&skinColor=0xCCCCCC" allowfullscreen="true" quality="high" bgcolor="#ffffff" name="mymovie" style="" src="http://www.shomer-tec.com/flash/video-player.swf" type="application/x-shockwave-flash"/>'
	code2 += "<br /><div style='color:#000000; float:right; font-size:12px; margin-top:12px; cursor:pointer' onclick='closePopup()'>Close</div>" ;
	popup(code2) ;
}
