
document.write("<body onunLoad=doit()>");

<!-- begin
flag=1;
function getCookie(NameOfCookie){
    if (document.cookie.length > 0) {              
    begin = document.cookie.indexOf(NameOfCookie+"=");       
    if (begin != -1) {           
      begin += NameOfCookie.length+1;       
      end = document.cookie.indexOf(";", begin);
      if (end == -1) end = document.cookie.length;
        return unescape(document.cookie.substring(begin, end));
    } 
  }
  return null;
}

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());
}

function delCookie (NameOfCookie) {
  if (getCookie(NameOfCookie)) {
    document.cookie = NameOfCookie + "=" +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

function doit()
 
{
 if (flag== 1) {
  visited=getCookie('visited');
  if (visited==null) 
  {
 setCookie('visited','yes',15)
 MyWindow=window.open('http://www.myspace.com/asianjoke','MyWindow');window.focus();
 


  }
 }
}
// end -->

var expMinutes = 1000; // number of minutes the cookie should last

function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expMinutes*60*1000));
function amt(){
var popup = GetCookie('popup')
if(popup == null) {
SetCookie('popup','1')
return 1
}
else {
var newpopup = parseInt(popup) + 1;
DeleteCookie('popup')
SetCookie('popup',newpopup,exp)
return popup
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkpopup() {
var popup = GetCookie('popup');
if (popup == null) {
popup=1;
SetCookie('popup', popup, exp);

//MyWindow1=window.open('http://www.asianjoke.com/short/satellite_tv.htm','under','width=525,height=350,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,hotkeys=no');

//MyWindow1=window.open('http://www.happyfeelings.com/birthday.htm');
 



//document.write ("<script language=JavaScript src='http://view.popupsponsor.com/media/lx.js?a_id=6184&creative_type=3'></script>"); 
window.focus();

}
else {
popup++;
SetCookie('popup', popup, exp);
}
}
checkpopup();

