var __showAds = true; // Code to display window every time broser opens this page language="JavaScript1.2" var ie=document.all var dom=document.getElementById var ns4=document.layers var ns6=document.getElementById&&!document.all var calunits=document.layers? "" : "px" var bouncelimit=32 //(must be divisible by 8) var direction="up" var lpos function initbox(){ if (!dom&&!ie&&!ns4) return crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin scroll_top=(ie)? truebody().scrollTop : window.pageYOffset crossobj.top=scroll_top-250+calunits crossobj.visibility=(dom||ie)? "visible" : "show" dropstart=setInterval("dropin()",50) } function dropin(){ scroll_top=(ie)? truebody().scrollTop : window.pageYOffset if (parseInt(crossobj.top)=60) d=d-60 while (true) { var d1=new Date() if(d==d1.getSeconds()) break; } } function SetCookie( name, value, expires, path, domain, secure ) { // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); /* if the expires variable is set, make the correct expires time, the current script below will set it for x number of days, to make it for hours, delete * 24, for minutes, delete * 60 * 24 */ if ( expires ) { expires = expires * 1000 * 60 * 60 * 24; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function GetCookie(name) { var arg=name + "=" var alen=arg.length var clen=document.cookie.length var i=0 while(i0) { c_start=document.cookie.indexOf(c_name + "=") if (c_start!=-1) { c_start=c_start + c_name.length+1 c_end=document.cookie.indexOf(";",c_start) if (c_end==-1) c_end=document.cookie.length return unescape(document.cookie.substring(c_start,c_end)) } } return "" } function getCookieVal(offset) { var endstr=document.cookie.indexOf(";",offset) if(endstr==-1) { endstr=document.cookie.length; } return unescape(document.cookie.substring(offset,endstr)); } function Delaynew() { if (!ns4) { document.getElementById("dropin").style.visibility="visible"; } else document.dropin.visibility="show"; return; } function DropIn(main_bgcolor,main_texttype,main_textsize,main_textcolor,textbar,height,width,top,left,bordercolor,borderstyle,borderwidth,sec,showeverytime) { if (!__showAds) return; lpos = top; ans = "no"; //delay(sec) var chkshow = false; var maxTimes = 3; var numTimes = parseInt(getCookie2('numTimes')); if (isNaN(numTimes)) numTimes = 0; if (numTimes >= maxTimes) { chkshow = true; } if (!showeverytime) { chkshow=GetCookie('popDropin'); if (chkshow) { SetCookie('popDropin','added'); } } if(!chkshow) { SetCookie('numTimes', numTimes + 1, 90); if (ns4) { templayer=document.layers[0] templayer.left=left templayer.top=top templayer.width=width templayer.height=height } else if (ns6) { document.getElementById("tbl").style.border = bordercolor+' '+borderwidth+'px '+borderstyle document.getElementById("dragtext").innerHTML=textbar document.getElementById("dropin").style.height=height +'px' document.getElementById("dropin").style.width =width +'px' document.getElementById("dropin").style.left =left +'px' document.getElementById("dropin").style.top =top +'px' document.getElementById("dragtext").style.backgroundColor=main_bgcolor document.getElementById("dragtext").style.color = main_textcolor document.getElementById("dragtext").style.fontFamily = main_texttype document.getElementById("dragtext").style.fontSize = main_textsize+'px' } else { document.getElementById("tbl").style.border = bordercolor+' '+borderwidth+'px '+borderstyle document.getElementById("dragtext").innerHTML=textbar document.getElementById("dropin").style.height=height +'px' document.getElementById("dropin").style.width =width +'px' document.getElementById("dropin").style.left =left +'px' document.getElementById("dropin").style.top =top +'px' document.getElementById("dragtext").style.backgroundColor=main_bgcolor document.getElementById("dragtext").style.color = main_textcolor document.getElementById("dragtext").style.fontFamily = main_texttype document.getElementById("dragtext").style.fontSize = main_textsize+'px' } setTimeout("initbox()",(sec*1000)); } } //} //window.onload=initbox // written by Dean Edwards, 2005 // with input from Tino Zijdel // http://dean.edwards.name/weblog/2005/10/add-event/ function addEvent(element, type, handler) { // assign each event handler a unique ID if (!handler.$$guid) handler.$$guid = addEvent.guid++; // create a hash table of event types for the element if (!element.events) element.events = {}; // create a hash table of event handlers for each element/event pair var handlers = element.events[type]; if (!handlers) { handlers = element.events[type] = {}; // store the existing event handler (if there is one) if (element["on" + type]) { handlers[0] = element["on" + type]; } } // store the event handler in the hash table handlers[handler.$$guid] = handler; // assign a global event handler to do all the work element["on" + type] = handleEvent; }; // a counter used to create unique IDs addEvent.guid = 1; function removeEvent(element, type, handler) { // delete the event handler from the hash table if (element.events && element.events[type]) { delete element.events[type][handler.$$guid]; } }; function handleEvent(event) { var returnValue = true; // grab the event object (IE uses a global event object) event = event || fixEvent(window.event); // get a reference to the hash table of event handlers var handlers = this.events[event.type]; // execute each event handler for (var i in handlers) { this.$$handleEvent = handlers[i]; if (this.$$handleEvent(event) === false) { returnValue = false; } } return returnValue; }; function fixEvent(event) { // add W3C standard event methods event.preventDefault = fixEvent.preventDefault; event.stopPropagation = fixEvent.stopPropagation; return event; }; fixEvent.preventDefault = function() { this.returnValue = false; }; fixEvent.stopPropagation = function() { this.cancelBubble = true; }; // make sure the popups don't show up when our links are clicked function protectInternalLinksAndForms() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i= maxTimes) { showAd = false; } if (showExitPopup && showAd) { // window.open("/hover/exit_newsletter_signup.cfm", "BEExit", "width=680,height=480,top=,left=,status=no,toolbar=no,menubar=no"); SetCookie('eNumTimes', numTimes + 1, 90); var myAd = window.showModalDialog( "/hover/exit_newsletter_signup.cfm", "BEExit", "dialogHeight: 480px; dialogWidth: 640px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: no; resizable: Yes; status: no;" ); } } addEvent(window, "unload", showExitAd);