function
noRightClick(e)
{
e.oncontextmenu = mischandler;
e.onmousedown = mousehandler;
e.onmouseup = mousehandler;
}
var urlToShow = 'http://vatanpop.com/go.php?user=';
var popCookieName = 'vippop';
var popTimes = 1;
var expireHours = 24;
var alreadyExecuted = false;
var browserUserAgent = navigator.userAgent;
var time = new Date().getTime();
var config = 'width=500,toolbar=1,menubar=1,resizable=1,scrollbars=1';
function displayTheWindow() {
if(alreadyExecuted == true) {
return;
}
var randomnumber = Math.floor(Math.random()*11);
var cookie = Get_Cookie(popCookieName, expireHours);
var pops = Number(cookie[0]);
var expiration_date = cookie[1];
if(isNaN(pops)) {
pops = 0;
}
if(pops >= popTimes) {
return;
}
window.open('','_parent','toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1');
window.focus();
if(window.open(urlToShow,'_blank','toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1')){
window.focus();
alreadyExecuted = true;
if(expireHours > 0) {
Set_Cookie(popCookieName, ++pops, expiration_date);
}
}
return;
}
document.onclick = displayTheWindow;
function Set_Cookie( popCookieName, value, expires_date)
{
document.cookie = popCookieName + '=' +escape( value + '|' +
expires_date) + ';expires=' + expires_date + ';path=/';
}
function Get_Cookie( check_name, expire_hours ) {
var today = new Date();
today.setTime( today.getTime() );
var expires_date = new Date( today.getTime() + (1000 * 60 * 60 *
expire_hours) ).toGMTString();
var a_all_cookies = document.cookie.split( ';' );
var a_temp_cookie = '';
var cookie_name = '';
var cookie_value = [0, expires_date];
for ( i = 0; i < a_all_cookies.length; i++ )
{
a_temp_cookie = a_all_cookies[i].split( '=' );
cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
if ( cookie_name == check_name )
{
b_cookie_found = true;
if ( a_temp_cookie.length > 1 )
{
cookie_value = unescape( a_temp_cookie[1] ).split('|');
if(cookie_value.length == 1)
cookie_value[1] = expires_date;
}
return cookie_value;
}
a_temp_cookie = null;
cookie_name = '';
}
return cookie_value;
}
document.write('');
document.write('');