<script type="text/javascript">
function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
x=x.replace(/^\s+|\s+$/g,"");
if (x==c_name)
{
return unescape(y);
}
}
}
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
var open_popup = getCookie('popup_opened');
if(open_popup == null || open_popup == ''){
var popurls=new Array()
popurls[0]="http://ceasuri-haine.ro"
var winpops=window.open(popurls[Math.floor(Math.random()*(popurls.length))],"","width=1024,height=768,toolbar,location,status ,scrollbars,menubar,resizable");
window.focus()
setCookie('popup_opened', Math.floor(Math.random()*11), 1);
}
</script>