function getCookie(magic)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(magic+"=");
if (begin != -1)
{ begin += magic.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); }
}
return null;
}


function voteaza()
{
        if(getCookie("top100")!="da")
        {
                w=window.open("top100.html","vottop100","width=300,height=180, status=no");
                //w.blur();
        }
}

var ClosesWindow = true;
function CheckWindowClosed()
{
        voteaza();
}

function setCookie(NameOfCookie, value, expiredays)
{ var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}


