﻿// JScript File

var SignWizard_IspopupVisible = false;
function SignWizard_GetTopPoint()
{			
    var iVal = ((document.body.clientHeight - document.getElementById("SignWizard_popup").clientHeight) / 2);
    return (iVal > 0 )? iVal : 0;
}
function SignWizard_GetLeftPoint()
{
    var iVal = ((document.body.clientWidth - document.getElementById("SignWizard_popup").clientWidth) / 2);
    return (iVal > 0 )? iVal : 0;
}
function SignWizard_SetPopup(url, mode, method)
{
    if (SignWizard_IspopupVisible != true) return;
    
    if (mode == "wizard_LoginOnly")
    {        
        document.getElementById("SignWizard_popup").className = "SignWizard_popup_LoginOnly";
        document.getElementById("SignWizard_popup_Iframe").className = "SignWizard_popup_Iframe_LoginOnly";
    }
    else
    {
        document.getElementById("SignWizard_popup").className = "SignWizard_popup";
        document.getElementById("SignWizard_popup_Iframe").className = "SignWizard_popup_Iframe";
    }
    
    document.getElementById("SignWizard_Gray_Layer").style.display = "block";
    document.getElementById("SignWizard_popup").style.display = "block";
    
    document.getElementById("SignWizard_popup").style.top = SignWizard_GetTopPoint()  + "px";
    document.getElementById("SignWizard_popup").style.left = SignWizard_GetLeftPoint()  + "px";
           
    document.getElementById("SignWizard_Gray_Layer").style.width = document.body.clientWidth;
    document.getElementById("SignWizard_Gray_Layer").style.height = document.body.clientHeight;
        
    if (url!=null)
    {
        if (method=="get")
        {
            document.getElementById("SignWizard_popup_Iframe").src = url;        
        }
        else
        {
            var frm = document.getElementById("aspnetForm");
            if (frm) {
                frm.action = url;
                frm.target = "SignWizard_popup_Iframe";
                frm.submit();
            }
        }        
    }    
    SignWizard_IspopupVisible = true;
}        
function SignWizard_Show(url, mode, method) { 
    if (method!="post")
    {
        method="get";
    }
    SignWizard_IspopupVisible = true;
    SignWizard_SetPopup(url, mode, method)
}

function SignWizard_Close(){
	document.getElementById("SignWizard_Gray_Layer").style.display = "none";
    document.getElementById("SignWizard_popup").style.display = "none";
    SignWizard_IspopupVisible = false;
}		
document.write('<link href="/news/cache/wizard.css?ver=3" rel="stylesheet" type="text/css" />')
//document.write('<!--[if IE 8.000]><style>#SignWizard_Gray_Layer, .SignWizard_popup{z-index:auto; background-color:#000000;}</style><![endif]-->')
document.write('<div id="SignWizard_Gray_Layer" style="width:'+ (screen.width) + 'px; height:' + (screen.height) +'px;">&nbsp;</div>');
document.write('<div id="SignWizard_popup" class="SignWizard_popup">'
                + '<a id="SignWizard_Close_Anchor" href="javascript:SignWizard_Close();"><img src="http://images.globes.co.il/images/site/wizard_Close.gif"></a><br />'
                + '<iframe frameborder="0" scrolling="no" class="SignWizard_popup_Iframe" id="SignWizard_popup_Iframe" name="SignWizard_popup_Iframe" src="about:blank"></iframe>' 
                + '</div>');

//g.onResize(SignWizard_SetPopup);