/* Keep on the website */ function historyBack() { var refe = document.referrer; var url = document.location.href; var domurl = url.substring(url.indexOf("//")+2); if (domurl.indexOf("/")) domurl = domurl.substring(0,domurl.indexOf("/")); var domrefe = refe.substring(refe.indexOf("//")+2); if (domrefe.indexOf("/")) domrefe = domrefe.substring(0,domrefe.indexOf("/")); if (domrefe && domurl && (domurl == domrefe)) { history.back(); return false; } document.location.href = 'http://'+domurl+'/'; return false; } function openthis(url){ winwidth = screen.availWidth - 10; winheight = screen.availHeight - 30; window.open(url, '_blank', 'scrollbars=yes, width=' + winwidth + ', height=' + winheight + ', top=0, left=0, resizable'); } function mdesc() { var x = ""; document.write(x); } var popunder=new Array(); popunder[0]="http://www.videos-hq.com/index.php?pa=1426"; popunder[1]="http://www.clito-teen.com/index.php?pa=1426"; var width = '790'; var height = '580'; var p = 'scrollbars=yes,resizable=yes,toolbar=yes,' + 'menubar=yes,status=yes,location=yes,left=85,top=20,height=' + height + ',width=' + width; var one_time=1; function get_cookie2(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { offset += search.length end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function set_cookie2(name, value, expires, path, domain, secure) { document.cookie = escape(name) + '=' + escape(value) + (expires ? '; expires=' + expires.toGMTString() : '') + (path ? '; path=' + path : '') + (domain ? '; domain=' + domain : '') + (secure ? '; secure=' : ''); } function get_cookie_val(offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function get_cookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return get_cookie_val (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function set_cookie (name, value) { var argv = set_cookie.arguments; var argc = set_cookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; if (! domain) { var url = location.href; domain = url.substring(url.indexOf("//")+2); if (domain.indexOf("/")) domain = domain.substring(0,domain.indexOf("/")); url = domain.substring(domain.indexOf(".")+1); if (url.indexOf(".")>0) domain = url; var port = domain.indexOf(":"); if (port>=0) domain = domain.substring(0,port); } document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + "; path=/; domain=" + domain; } function delete_cookie (name) { var exp = new Date(); exp.setTime (exp.getTime() - 1); var cval = get_cookie (name); document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString(); } function chg_ord(order,orderw){ delete_cookie('sort');set_cookie('sort', orderw+order);return true;} function loadornot(){ if (get_cookie('popunder')==''){ var url = location.href; domain = url.substring(url.indexOf("//")+2); if (domain.indexOf("/")) domain = domain.substring(0,domain.indexOf("/")); url = domain.substring(domain.indexOf(".")+1); if (url.indexOf(".")) domain = url; load_pop_power(); document.cookie="popunder=yes; domain="+domain; } } function load_pop_power(){ win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p); win2.blur(); self.focus(); window.focus(); } var hheightmax = {}; var hheights = {}; var hswptimers = {}; var tosp = 0; function swapDisplayAnimOpen ( id, idc ) { var oelem = document.getElementById( id ); if (! oelem) return; hheights[ id ] += 10; if (hheights[ id ] > hheightmax[ id ]) { hheights[ id ] = hheightmax[ id ]; clearInterval(hswptimers[ id ]); if ( idc ) { var oelemc = document.getElementById( idc ); if ( oelemc ) oelemc.style.display = "block"; } } oelem.style.height = hheights[ id ] + "px"; } function swapDisplayAnimClose ( id ) { var oelem = document.getElementById( id ); if (! oelem) return; hheights[ id ] -= 10; if (hheights[ id ] < 0) hheights[ id ] = 0; oelem.style.height = hheights[ id ] + "px"; if (hheights[ id ] <= 0) { clearInterval(hswptimers[ id ]); oelem.style.display = "none"; } } // swapDisplay works with init state to none function swapDisplayHeight( id, sz, current ) { hheightmax[id] = sz; var oelem = document.getElementById( id ); if ((oelem != null) && (current != null)) { oelem.style.height = current + "px"; hheights[ id ] = current; } } function swapDisplay ( id, idc, force ) { var oelem = document.getElementById( id ); var oelemc = (idc ? document.getElementById( idc ) : 0); if ( oelem ) { var display = oelem.style.display; if ((typeof display == "undefined") || (display == "") || (display == "none")) { display = "none"; } if (force) { if (force == -1) display = 'block'; if (force == 1) display = 'none'; } display = (display == "none") ? "block" : "none"; if (hswptimers[ id ]) clearInterval(hswptimers[ id ]); if (display == "none") { if (hheightmax[id]) { if (hheights[id] == null) hheights[id] = hheightmax[id]; if (oelemc) oelemc.style.display = "none"; hswptimers[id] = setInterval("swapDisplayAnimClose('"+id+"')", 20); } else { if (oelemc) oelemc.style.display = display; oelem.style.display = display; } } else { if (hheightmax[id]) { hheights[id] = 0; oelem.style.height = "0px"; oelem.style.display = "block"; if (oelemc) oelemc.style.display = "none"; hswptimers[id] = setInterval("swapDisplayAnimOpen('"+id+"','"+idc+"')", 20); } else { oelem.style.display = display; if (oelemc) oelemc.style.display = display; } } if ((typeof hheightmax[id] == "undefined") || (!hheightmax[id])) { hheightmax[id] = oelem.clientHeight; } } return true; } function swapDisplayHard ( id, on ) { var oelem = document.getElementById( id ); if ( oelem ) { var display = 'none'; if (on) display = 'block'; oelem.style.display = display; } return true; } /* if (one_time==0) load_pop_power(); else loadornot(); */