// -------------------------- POPUP (set position) function ppp(mylink, windowname, width, height, x, y) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + x + ',top=' + y + ', resizable=no, location=no, menubar=no'); open.focus(); setTimeout(function(){ open.close(); }, 120000); return false; } function ppp2(mylink, windowname, width, height, x, y) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + x + ',top=' + y + ', resizable=no, location=no, menubar=no'); open.focus(); // setTimeout(function(){ open.close(); }, 120000); return false; } // -------------------------- POPUP RANDOM POSITION TIMEOUT SHORT var w = window.innerWidth; var h = window.innerHeight; function posX(){ return Math.ceil(Math.random() * w)-200 } function posY(){ return Math.ceil(Math.random() * h) } function pppR(mylink, windowname, width, height) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + posX() + ',top=' + posY() + ', resizable=no, location=no, menubar=no'); open.focus(); setTimeout(function(){ open.close(); }, 15000); return false; } // -------------------------- POPUP RANDOM POSITION TIMEOUT LONG function pppRL(mylink, windowname, width, height) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; var open = window.open(mylink, windowname, 'width=' + width + ',height='+ height + ',left=' + posX() + ',top=' + posY() + ', resizable=no, location=no, menubar=no'); open.focus(); setTimeout(function(){ open.close(); }, 180000); return false; } // -------------------------- POPUP RANDOM POSITION NO!TIMEOUT function pppRNT(mylink, windowname, width, height) { if (! window.focus)return true; var href; if (typeof(mylink) == 'string') href=mylink; else href=mylink.href; var open = window.open(href, windowname, 'width=' + width + ',height='+ height + ',left=' + posX() + ',top=' + posY() + ', resizable=no, location=no, menubar=no'); open.focus(); //setTimeout(function(){ open.close(); }, 15000); return false; } function pppRP(windowname, width, height, x, y) { var pages = ['http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=2', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=4', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=6', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=8', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=9', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=21', 'http://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf#page=27' ]; function rand(){ return Math.ceil(Math.random() * pages.length+1) } var open = window.open(pages[rand()], windowname, 'width=' + width + ',height='+ height + ',left=' + x + ',top=' + y + ', resizable=no, location=no, menubar=no'); open.focus(); // setTimeout(function(){ open.close(); }, 15000); return false; } function pppRPvodoo(windowname, width, height, x, y) { var pages = ['../media/pdfs/vodoo_death.pdf', '../media/pdfs/vodoo_death.pdf#page=2', '../media/pdfs/vodoo_death.pdf#page=2', '../media/pdfs/vodoo_death.pdf#page=2' ]; function rand(){ return Math.ceil(Math.random() * pages.length+1) } var open = window.open(pages[rand()], windowname, 'width=' + width + ',height='+ height + ',left=' + x + ',top=' + y + ', resizable=no, location=no, menubar=no'); open.focus(); // setTimeout(function(){ open.close(); }, 15000); return false; } // -------------------------- REDIRECT OPENER (from popup) function next(mylink){ var mhref = mylink +'.html'; window.opener.location.href = mhref; } function nextC(mylink){ var mhref = mylink +'.html'; window.opener.location.href = mhref; window.close(); } // ------------------------ OPEN HIDDEN IFRAME function openIframe(name) { document.getElementById(name).style.visibility = "visible"; }