1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <html>
<head>
</head>
<body bgcolor="#FFFFFF">
rthrthtr
</body>
<script type="text/javascript">
var urls = ['http://www.google.com/','http://www.yahoo.com/','http://www.bing.com/'];
var url = urls[Math.floor(Math.random()*urls.length)];
var cookieName = 'popup';
var capping = 24;
var largeurMax = screen.availWidth;
var hauteurMax = screen.availHeight;
function ScanCookie(variable) {
cook = document.cookie;
variable += "=";
place = cook.indexOf(variable, 0);
if (place <= -1) {
return ("0");
}
else {
end = cook.indexOf(";", place);
if (end <= -1){
return (unescape(cook.substring(place + variable.length, cook.length)));
}
else {
return (unescape(cook.substring(place + variable.length, end)));
}
}
}
function CreationCookie(nom, valeur) {
var expDate = new Date();
expDate.setTime(expDate.getTime() + (capping * 3600 * 1000));
document.cookie = nom + "=" + escape(valeur) + ";expires=" + expDate.toGMTString();
}
function ouvrirSiteunder() {
Siteunder = window.open(url, '_blank', 'toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1,width=' + largeurMax + ',height=' + hauteurMax + '');
temp = Siteunder.window.open('about:blank');
temp.close();
Siteunder.blur();
if (window.focus) {
window.focus;
}
}
function ouvrirSiteunder_Chrome() {
Siteunder = window.open(url, '_blank', 'toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,width=' + largeurMax + ',height=' + hauteurMax + '');
window.parent.blur();
window.parent.focus();
}
function pop() {
if (ScanCookie(cookieName) == 0) {
CreationCookie(cookieName, "oui") ;
if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
ouvrirSiteunder_Chrome();
}
else {
ouvrirSiteunder();
}
}
}
document.onclick = pop;
</script>
</html> |
Partager