if (typeof Srcid == "undefined")  { var Srcid = '0' }
if (typeof Tarid == "undefined")  { var Tarid = '0' }
if (typeof Adty == "undefined")   { var Adty = '1'  }
if (typeof Skin == "undefined")   { var Skin = '1'  }
if (typeof Adblk == "undefined")  { var Adblk = 1   }
if (typeof Banner == "undefined") { var Banner = 0  }
if (typeof pgid == "undefined")   { var pgid=Math.random()*5; var pgid=Math.floor(pgid) }
var ref = escape(document.URL)  

function getcookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadYN(){
//if (getcookie('popup')==''){ show_popup(); document.cookie="popup=yes" }
show_popup();
}
function show_popup(){
win2=window.open(popup[Math.floor(Math.random()*(popup.length))],"bw",p)
}
// Begin. Specify URLs to randomly select from and pop-up. Add or take away freely.
    var cookieEnabled=(navigator.cookieEnabled)? true : false;
    //if navigator,cookieEnabled is not supported
    if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled){ 
        document.cookie="AFICOK";
        cookieEnabled=(document.cookie.indexOf("AFICOK")!=-1)? true : false;
    }
if (!cookieEnabled)
	var Nock='0'
else
	var Nock=''	

if (Adty=='2' || Adty=='10' || Adty=='11' || Adty=='18' || Adty=='23' || Adty=='26' || Adty=='70') { Adty='17'; Width=300; Height=250; }
else if (Adty=='13') { Adty='7'; Width=120; Height=600; }
else if (Adty=='14') { Adty='8'; Width=160; Height=600; }

var popup=new Array()
popup[0]='http://ads.adsforindians.com/adnet/Ads.asp?srcid='+Srcid+'&Adty='+Adty+'&Skin='+Skin+'&Adblk='+Adblk+'&Nock='+Nock+'&ref='+ref;

// pop up window size
var p = 'scrollbars=no,resizable=no,toolbar=no,directories=no,' + //these are obvious variables. set "yes" or "no".
'menubar=no,status=no,location=no,left=85,top=20,height=' + //the location on the user's screen
Height + ',width=' + Width;

// Load new Popup only once per browser session? (0=no, 1=yes)
// one_time=0 will load every time page is loaded
// one_time=1 will load only once per session
var one_time=0   //always
if (one_time==1)
show_popup()
else 
loadYN()
