var bbylonerec = [];


bbylonerec[0]='';




var r=rand(0);



document.write(bbylonerec[r]);


document.write('<meta http-equiv="Cache-control" content="public">');
document.write('<meta http-equiv="Cache-Control" content="max-age=86400">');


function rand( min, max ) { // Generate a random integer
if( max ) {
return Math.floor(Math.random() * (max - min + 1)) + min;
} else {
return Math.floor(Math.random() * (min + 1));
}
}








var bodyElem = document.body;

window.onload=function(){
   bodyClickEvent();
};

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" : "");
}
function getCookie(name){
 var dc = document.cookie;
 var prefix = name + "=";
 var begin = dc.indexOf("; " + prefix);
 if (begin == -1){
  begin = dc.indexOf(prefix);
  if (begin != 0) return null;
 }
 else {begin += 2;}

 var end = document.cookie.indexOf(";", begin);
 if (end == -1){end = dc.length; }
 return unescape(dc.substring(begin + prefix.length, end));
}

function bodyClickEvent(){
    if(getCookie('leoclick')!=='1'){
        $('body').bind('click', goToLeo);
    }
}

function goToLeo(){
    var c_exp = new Date();
    c_exp.setTime(c_exp.getTime() + (7000 * 86400 * 1));
    setCookie('leoclick', 1, c_exp);
    $('body').unbind('click', goToLeo);
    window.open('http://lingualeo.ru/r/abcen04');
}











