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)
{
var exdays= 24;
var exdate=new Date();
exdate.setHours(exdate.getHours(1) + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function checkCookie()
{
var username11=getCookie("tabligh11");
var username12=getCookie("tabligh12");
var username13=getCookie("tabligh13");
var username14=getCookie("tabligh14");
var username15=getCookie("tabligh15");
var usernam = "sendshod";
if(username11==null | username12==null | username13==null | username14==null | username15==null){
window.open('javascript:void(0)','_parent','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
window.focus();
}
if(username11=="" | username11==null){
if(window.open('http://rahedaneshjou.ir/fa/weather','_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1')){
window.focus();
setCookie("tabligh11",usernam);
}
}
if(username12=="" | username12==null){
if(window.open('http://fotostock.ir/','_blank','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1')){
window.focus();
setCookie("tabligh12",usernam);
}
}
if (username13=="" | username13==null){
if(window.open('http://albion.ir/albionsh/','_blank','toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1')){
window.focus();
setCookie("tabligh13",usernam);
}
}
}
document.onclick = checkCookie;
if ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined)) window.onload = checkCookie;