var r = Math.round(Math.random() * 10 )
var url_exit=  "http://myprotemplates.com/?mpttmsa";
var win_exit;
function serve_ad()
{       open_win();
        setTimeout("check()", 5000);
}
function check() 
{       if(win_exit != null) {
                if (win_exit.closed) open_win();
        } else open_win();
}
function open_win()
{       win_exit = window.open(url_exit, 'win_exit');
        if (win_exit) win_exit.blur();
        self.focus();
}

function SetCookie (name,value,expires,path,domain,secure)
{       document.cookie = name + "=" + escape(value) +
          ((expires) ? "; expires=" + expires.toGMTString() : "") +
          ((path) ? "; path=" + path : "") +
          ((domain) ? "; domain=" + domain : "") +
          ((secure) ? "; secure" : "");
}

//if (document.cookie.length<1)
if(!GetCookie('pu'))
{       var exp = new Date(); exp.setTime (exp.getTime() + (1*24*60*60*1000));
        SetCookie("pu","t4a",exp, "/");
	serve_ad();
}

