﻿// JScript 파일

if(GetPopCookie("EstsoftPopup") != '1') 
{
    ViewPopup();
    try 
    {
        window.setTimeout("FocusPopup()",1000);
    }
    catch(e) 
    { }
}

function GetPopCookie( name )
{
    var nameOfCookie = name + "=";
    var x = 0;
    while ( x <= document.cookie.length )
    {
        var y = (x+nameOfCookie.length);
        if ( document.cookie.substring( x, y ) == nameOfCookie )
        {
            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
            endOfCookie = document.cookie.length;
            return unescape( document.cookie.substring( y, endOfCookie ) );
        }
        x = document.cookie.indexOf( " ", x ) + 1;
        if ( x == 0 )
            break;
    }
    
    return "";
}

function FocusPopup()
{
    try
    {
        wndPop.focus();
    }
    catch(e)
    { }
}

function ViewPopup()
{ 
    //document.getElementById("notifyLayer").style.display = "block";  
    var top = (document.documentElement.clientHeight - 230) / 2;
    var left = (document.documentElement.clientWidth - 300) / 2;
    //wndPop = window.open("./Popup/Newyear2010/2010.html","","width=349,height=479,left=" + left + ", top=" + top + ",toolbar=no,status=no,scrollbars=no,resizable=no");
}