// //Taken from same as "new" but renamed so tags do not need to be replaced on web site. //----------------------------------------------------- window.onunload=setSessionFlag; //Modify Survey cookie to match project number var surveyID_LO = "C7849_P101_pop_cookie"; if (surveyID_LO.substring(0,8)=="nocookie") { var surveyID_LO="" } //Modify popup odds. A 1 means 1% of the hits, 10=10%, etc... var popUpOdds_LO = 100; //Sets popup window configuration options. Height, width, toolbars... var popUpWindow_LO = "height=300,width=300,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=auto,status=0,toolbar=0,screenY=300,left=300,top=100"; var popUpURL_LO = ''; //Sets the total percentage figure. Currently set to work on a 100 scale var popUpScale_LO = 100; //Set delay time var popupDelay_LO=0; if (popupDelay_LO.length=0) {popupDelay_LO = 0;} var noLayerPopFlag = getCookie("noLayerPop"); var currentSessionFlag = getCookie("currentSessionFlag"); //PopUp Delay Cookie Name var timeCookie_LO = "C7849_P101_pop_cookie_time"; //Page view counter cookie var pageViewCookie_LO = "C7849_P101_pop_cookie_cnt"; //Pop Type cookie var popTypeCookie_LO = "C7849_P101_pop_cookie_type"; //Gets the current number of seconds have been on site: var elapseTime_LO = getCookie(timeCookie_LO); if (elapseTime_LO==null) {elapseTime_LO = 0;} popupDelay_LO=popupDelay_LO-elapseTime_LO; if (popupDelay_LO < 0) {popupDelay_LO = 0;} //Gets the Page Counter Cookie: var pageViewCounter = getCookie(pageViewCookie_LO); if (pageViewCounter==null) {pageViewCounter = 0;} pageViewCounter=parseFloat(pageViewCounter) + 1; var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(pageViewCookie_LO, pageViewCounter, now); //Gets the Page Counter Cookie: //var popType = getCookie(popTypeCookie_LO); var popType = 1; var rNmbr = randomRange(); if (rNmbr <= 100) { var PIN = "16B5Z949KT96N&s=rp"; } else { //removed site sat survey 4-11-12 per Email //reinstall site sat survey 7-10-12 per Email //removed site sat survey 9-4-12 per Email var PIN = "165Y84VLNC8LY"; } var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(popTypeCookie_LO, popType, now); var popupText='The Responsibility Project
Take the Survey
Sweepstake Rules
'; var barColor='#98B4A8'; popUpURL_LO = "http://deploy.ztelligence.com/start/index.jsp?PIN=15WT5ZLYJNLD9&type=" + popType + "&pages=" + pageViewCounter + "&time=" + elapseTime_LO; //var layeredText='
Take the Survey
Sweepstake Rules
'; var layeredText='
Take the Survey
Sweepstake Rules
'; var barColor='#98B4A8'; var startTime_LO = getCurrentTime(); var varCode=''; var noGO_sw=0; var noGO1_sw=0; //***Added to force exit popup on 2+pages //Removed for layered popover 6/27/2012 //var noGO_sw=1; if (pageViewCounter < 3) { noGO_sw=1; //***Added to force exit popup on 2+pages //noGO1_sw=1; } function dounload() { //Sets popup window configuration options. Height, width, toolbars... var popUpWindow = "toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=yes,scrollbars=no,height=340,width=320,screenY=300,left=300,top=100"; var endTime_LO = getCurrentTime(); elapseTime=(endTime_LO - startTime_LO) / 1000; elapseTime_LO=parseFloat(elapseTime_LO) + parseFloat(elapseTime); var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(timeCookie_LO, elapseTime_LO, now); var surveyAsked = getCookie(surveyID_LO); if ((!surveyAsked) && (!noLayerPopFlag) && (!currentSessionFlag) ) { if ((noGO_sw==0) || (noGO1_sw==0)) { var popWin=window.open("", "SurveyPrompt", popUpWindow); popWin.document.write(popupText); window.focus(); var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(surveyID_LO, "True", now); } } } function openPopunder() { var popUpWindow = "toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=yes,scrollbars=no,height=338,width=317,screenY=300,left=300,top=100"; var popWin=window.open("", "SurveyPrompt", popUpWindow); popWin.document.write(PopupText); setCookie(surveyID_LO, "True", now); window.focus(); } function getCurrentTime() { var now = new Date(); fixDate(now); return now.getTime(); } function noLayerPop() { var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie("noLayerPop", "True", now); setCookie(surveyID_LO, "True", now); } function setSessionFlag() { //***removed to force exit popup on 2+pages //if (noGO1_sw == 0) {dounload();return false; } //***removed to force exit popup on 2+pages if (noGO_sw == 1) {return false; } if (noGO1_sw == 1) {return false; } var now = new Date(); fixDate(now); now.setTime(now.getTime()); setCookie("currentSessionFlag", null, now); //setCookie(pageViewCookie_LO, 0, now); //***added to force exit popup on 2+pages //Cancelled per new layered popover 6/27/2012 //if (noGO1_sw == 0) {dounload(); } } function setCookie(name, value, expires, path, domain, secure) { path="/"; var CurrentDomain=document.domain; if (CurrentDomain.indexOf(".") > -1) { var arCurrentDomain=CurrentDomain.split("."); domain=arCurrentDomain[arCurrentDomain.length-2] + "." + arCurrentDomain[arCurrentDomain.length-1]; } else { domain=""; } var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } 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 fixDate(date) { var base = new Date(0); var skew = base.getTime(); if (skew > 0) date.setTime(date.getTime() - skew); } function randomRange () { return Math.round(Math.random() * (popUpScale_LO-1)) + 1 } var MWJ_winZind = 65535; function createMiniWinLayer(mainContent,oTitle,oLeft,oTop,oWidth,barColour,mainColour,oLogo,oMin,oMax,oClose,oFull,oDrag,oVis,oFullDrag,anyExtra,oScroll) { if( typeof( oFullDrag ) == 'undefined' ) { window.alert( 'New mini window script incompatible.\nPlease see the script source.' ); return; } window.MWJ_MINIWINS = window.MWJ_MINIWINS ? ( window.MWJ_MINIWINS + 1 ) : 1; if( document.layers && !document.childNodes ) { var theDragString = ' onmouseover="this.captureEvents(Event.MOUSEDOWN);this.onmousedown = function () { clickDiv(\'MWJminiwinMAX'+window.MWJ_MINIWINS+'\',\'MWJminiwinMIN'+window.MWJ_MINIWINS+'\',arguments[0]);return false; };"'; document.write( ''+ '
'+ '
'+ ''+(oFullDrag?'':'')+ ''+oTitle+ ''+(oFullDrag?'':'')+''+ ''+ ''+ ''+ 'Close.
'+ '
'+mainContent+'
' ); document.write( ''+ '
'+ '
'+ ''+(oFullDrag?'':'')+ ''+oTitle+ ''+(oFullDrag?'':'')+''+ ''+ ''+ ''+ 'Close.
'+ '
' ); } else { var theDragString = ' onmousedown="clickDiv(\'MWJminiwinMAX'+window.MWJ_MINIWINS+'\',\'MWJminiwinMIN'+window.MWJ_MINIWINS+'\',arguments[0]);return false;" onselectstart="return false;" ondragstart="return false;"'; document.write( '
'+ (document.childNodes?('
'+((oDrag&&!oFullDrag)?' ':'')+ '
'):'')+''+ '
'+ '
'+ ''+ '
'+oTitle+''+ ''+ ''+ ((oFull&&oDrag&&document.childNodes&&!oFullDrag)?''+ '':'')+ ''+ 'Close.
'+ '
'+((anyExtra&&document.childNodes)?anyExtra:'')+''+ '
'+mainContent+'
' ); document.write( '
'+ ''+ '
'+ '
'+ ''+ '
'+oTitle+''+ ''+ ''+ ((oFull&&oDrag&&document.childNodes&&!oFullDrag)?''+ '':'')+ ''+ 'Close.
'+ '
' ); } var tempOb = new Object(); tempOb.maxName = 'MWJminiwinMAX'+window.MWJ_MINIWINS; tempOb.minName = 'MWJminiwinMIN'+window.MWJ_MINIWINS; return tempOb; } function getRefToDivNest( divID, oDoc ) { if( !oDoc ) { oDoc = document; } if( document.layers ) { if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else { for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) { y = getRefToDivNest(divID,oDoc.layers[x].document); } return y; } } if( document.getElementById ) { return document.getElementById(divID); } if( document.all ) { return document.all[divID]; } return document[divID]; } function winMousePos(e) { //get the position of the mouse if( !e ) { e = window.event; } if( !e || ( typeof( e.pageX ) != 'number' && typeof( e.clientX ) != 'number' ) ) { return [0,0]; } if( typeof( e.pageX ) == 'number' ) { var xcoord = e.pageX; var ycoord = e.pageY; } else { var xcoord = e.clientX; var ycoord = e.clientY; if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) ) { if( document.documentElement && ( document.documentElement.scrollTop || document.documentElement.scrollLeft ) ) { xcoord += document.documentElement.scrollLeft; ycoord += document.documentElement.scrollTop; } else if( document.body && ( document.body.scrollTop || document.body.scrollLeft ) ) { xcoord += document.body.scrollLeft; ycoord += document.body.scrollTop; } } } return [xcoord,ycoord]; } function clickDiv(div1,div2,e,isRes) { //make note of starting positions and detect mouse movements if( ( !window.ActiveXObject || navigator.userAgent.indexOf('Mac') == -1 || navigator.__ice_version ) && document.onmousemove == winIsMove ) { document.onmousemove = window.storeMOUSEMOVE; document.onmouseup = window.storeMOUSEUP; return; } if( ( e && ( e.which > 1 || e.button > 1 ) ) || ( window.event && ( window.event.which > 1 || window.event.button > 1 ) ) ) { return; } MWJ_winZind += 2; div1 = getRefToDivNest(div1); div2 = getRefToDivNest(div2); if( !div2 ) { return; } window.msStartCoord = winMousePos(e); div1.currentMWJAction = isRes ? true : false; if( isRes ) { window.lyStartCoord = [div1.offsetWidth,div1.getElementsByTagName('div')[1].parentNode.offsetHeight,div1.offsetHeight-div1.getElementsByTagName('div')[1].parentNode.offsetHeight]; } else { window.lyStartCoord = div1.style?[parseInt(div1.style.left),parseInt(div1.style.top)]:[parseInt(div1.left),parseInt(div1.top)]; } if( div1.style ) { div1.style.zIndex = MWJ_winZind; div2.style.zIndex = MWJ_winZind + 1; } else { div1.zIndex = MWJ_winZind; div2.zIndex = MWJ_winZind + 1; } if( document.captureEvents && Event.MOUSEMOVE ) { document.captureEvents(Event.MOUSEMOVE); document.captureEvents(Event.MOUSEUP); } if( !window.ActiveXObject || navigator.userAgent.indexOf('Mac') == -1 || navigator.__ice_version ) { window.storeMOUSEMOVE = document.onmousemove; window.storeMOUSEUP = document.onmouseup; } window.storeLayer = [div1,div2]; document.onmousemove = winIsMove; document.onmouseup = winIsMove; } function winIsMove(e) { //move the layer to its newest position var msMvCo = winMousePos(e); if( !e ) { e = window.event ? window.event : ( new Object() ); } e.cancelBubble = true; if( e.stopPropagation ) e.stopPropagation(); var newX = window.lyStartCoord[0] + ( msMvCo[0] - window.msStartCoord[0] ); var newY = window.lyStartCoord[1] + ( msMvCo[1] - window.msStartCoord[1] ); //reset the mouse monitoring as before - delay needed by Gecko to stop jerky response (hence two functions instead of one) //as long as the Gecko user does not release one window then click on another within 1ms (!) this will cause no problems if( e.type && e.type.toLowerCase() == 'mouseup' ) { document.onmousemove = window.storeMOUSEMOVE; document.onmouseup = window.storeMOUSEUP; } if( navigator.product == 'Gecko' ) { window.setTimeout('winIsMove2('+newX+','+newY+');',1); } else { winIsMove2(newX,newY); } } function winIsMove2(y,z) { if( window.storeLayer[0].currentMWJAction ) { doActualResize(window.storeLayer,y,z,window.lyStartCoord[2]); } else { for( var x = 0, oPix = ( document.childNodes ? 'px' : 0 ); x < 2; x++ ) { var theLayer = window.storeLayer[x].style ? window.storeLayer[x].style : window.storeLayer[x]; theLayer.left = y + oPix; theLayer.top = z + oPix; } } } function doActualResize(oDivs,y,z,offSet) { //resize - first to what you want, then again to what was possible (stops the drag handle moving inside the window) for( var x = 0; x < 2; x++ ) { var theLayer = oDivs[x]; if( y < 0 ) { y = 0; } if( !x && theLayer.getElementsByTagName('div')[1].style.overflow == 'auto' && navigator.product=='Gecko' && navigator.taintEnabled ) { //gecko bug (otherwise cannot make it get narrower and the drag handle moves wrong) var ppDv = theLayer.getElementsByTagName('div')[1]; if( !ppDv.tmpDiv ) { ppDv.tmpDiv = document.createElement('div'); ppDv.appendChild( ppDv.tmpDiv ); while( ppDv.childNodes[0] != ppDv.tmpDiv ) { ppDv.tmpDiv.appendChild( ppDv.childNodes[0] ); } } ppDv.tmpDiv.style.display = 'none'; ppDv.style.overflow = ''; ppDv.style.height = ''; } theLayer.style.width = y + 'px'; if( !x ) { y = theLayer.getElementsByTagName('div')[1].parentNode.offsetWidth + 10; theLayer.style.width = y + 'px'; if( z < 20 ) { z = 20; } theLayer.getElementsByTagName('div')[1].parentNode.style.height = z + 'px'; if( !window.ActiveXObject && !navigator.taintEnabled ) { theLayer.getElementsByTagName('div')[1].style.height = ( z - 4 ) + 'px'; } z = theLayer.getElementsByTagName('div')[1].parentNode.offsetHeight; if( !window.ActiveXObject && !navigator.taintEnabled ) { theLayer.getElementsByTagName('div')[1].style.height = ( z - 4 ) + 'px'; z += 2; } theLayer.getElementsByTagName('div')[1].parentNode.style.height = z + 'px'; theLayer.style.height = ( z + offSet ) + 'px'; if( theLayer.getElementsByTagName('div')[1].tmpDiv ) { ppDv.tmpDiv.style.display = 'block'; ppDv.style.overflow = 'auto'; ppDv.style.height = doNumMax(96+(ppDv.parentNode.offsetHeight/500))+'%'; } } } } function doNumMax(oNm) { return ( oNm > 99 ) ? 99 : oNm; } function reWriteWin(theWin,minName,newContent) { //rewrite the window content if possible var theWin = getRefToDivNest(theWin), minName = getRefToDivNest(minName); if( theWin && document.childNodes && theWin.getElementsByTagName && theWin.getElementsByTagName('div')[1] ) { if( !window.ActiveXObject && !navigator.taintEnabled ) { theWin.getElementsByTagName('div')[1].style.height = ( theWin.getElementsByTagName('div')[1].offsetHeight - 4 ) + 'px'; } theWin.getElementsByTagName('div')[1].parentNode.style.height = theWin.getElementsByTagName('div')[1].parentNode.offsetHeight + 'px'; if( window.ActiveXObject && navigator.platform.indexOf( 'Mac' ) + 1 && !navigator.__ice_version ) { var theOffset = theWin.offsetHeight - theWin.getElementsByTagName('div')[1].parentNode.offsetHeight; } else { var theOffset = theWin.offsetHeight - theWin.getElementsByTagName('div')[1].offsetHeight; } theWin.getElementsByTagName('div')[1].innerHTML = newContent; if( window.ActiveXObject && navigator.platform.indexOf( 'Mac' ) + 1 && !navigator.__ice_version ) { theWin.style.height = ( theWin.getElementsByTagName('div')[1].parentNode.offsetHeight + theOffset ) + 'px'; } else { theWin.style.height = ( theWin.getElementsByTagName('div')[1].offsetHeight + theOffset ) + 'px'; } theWin.style.width = theWin.offsetWidth + 'px'; minName.style.width = theWin.offsetWidth + 'px'; } } function changeWinBG(winName,newBG) { var theWin = getRefToDivNest(winName); if( theWin && theWin.parentNode && theWin.getElementsByTagName && theWin.getElementsByTagName('div')[1] ) { theWin.getElementsByTagName('div')[1].parentNode.style.backgroundColor = newBG; } } function moveWin(oMax,oMin,x,y) { oMax = getRefToDivNest(oMax); oMin = getRefToDivNest(oMin); if( !oMax ) { return; } if( oMax.style ) { oMax = oMax.style; oMin = oMin.style; } var oPix = document.childNodes ? 'px' : 0; oMax.left = x + oPix; oMin.left = x + oPix; oMax.top = y + oPix; oMin.top = y + oPix; } function resizeWin(oMax,oMin,y,z) { oMax = [getRefToDivNest(oMax),getRefToDivNest(oMin)]; if( !oMax[0] ) { return; } if( oMax[0].getElementsByTagName && document.childNodes ) { var oTitlSiz = oMax[0].offsetHeight - oMax[0].getElementsByTagName('div')[1].parentNode.offsetHeight; z = z - oTitlSiz; doActualResize(oMax,y,z,oTitlSiz); } } function maximiseWin( oMax, oMin ) { var div1 = getRefToDivNest(oMax), div2 = getRefToDivNest(oMin); if( !div2 ) { return; } MWJ_winZind += 2; if( div1.style ) { div1.style.zIndex = MWJ_winZind; div2.style.zIndex = MWJ_winZind + 1; } else { div1.zIndex = MWJ_winZind; div2.zIndex = MWJ_winZind + 1; } var newSet = findMaxSize(); moveWin(oMax,oMin,newSet[0],newSet[1]); resizeWin(oMax,oMin,newSet[2],newSet[3]); } function findMaxSize() { if( typeof( window.pageXOffset ) == 'number' ) { var x = window.pageXOffset, y = window.pageYOffset; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { var x = document.documentElement.scrollLeft, y = document.documentElement.scrollTop; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { var x = document.body.scrollLeft, y = document.body.scrollTop; } else { var x = 0, y = 0; } if( window.innerWidth ) { var w = window.innerWidth, h = window.innerHeight; } else if( document.documentElement && document.documentElement.clientWidth ) { var w = document.documentElement.clientWidth, h = document.documentElement.clientHeight; } else if( document.body && document.body.clientWidth ) { var w = document.body.clientWidth, h = document.body.clientHeight; } else { var w = 400, h = 400; } if( window.opera || ( navigator.product == 'Gecko' && navigator.taintEnabled ) ) { w -= 16; } if( !window.ActiveXObject && !navigator.taintEnabled ) { h -= 4; } return [x,y,w,h] } function hideMinWin(thisDiv) { //this function hides the div thisDiv = getRefToDivNest(thisDiv); if( !thisDiv ) { return; } if( thisDiv.style ) { thisDiv.style.visibility = 'hidden'; } else { thisDiv.visibility = 'hide'; } } function showMinWin(thisDiv,thatDiv) { //this function shows the div and hides the old one if necessary thisDiv = getRefToDivNest(thisDiv); if( thatDiv ) { hideMinWin(thatDiv); } if( !thisDiv ) { return; } MWJ_winZind += 2; if( thisDiv.style ) { thisDiv.style.visibility = 'visible'; thisDiv.style.zIndex = MWJ_winZind; } else { thisDiv.visibility = 'show'; thisDiv.zIndex = MWJ_winZind; } } function manuf() { window.alert('Movable mini window script\nWritten by Mark Wilton-Jones, 2001\n'+ '\nSee http://www.howtocreate.co.uk/jslibs/termsOfUse.html for terms of use.\n'+ '\nSee http://www.howtocreate.co.uk/jslibs/ for detailed support info and other scripts'); } function loadURL(URL,theCookieName,str1) { var theCookieValue=getCookie(theCookieName); window.open(URL + "?data=" + theCookieValue + "~" + str1); CloseLayer(); } function takeSurvey() { //Page view counter cookie var pageViewCookie_LO = "C7849_P101_pop_cookie_cnt"; //Gets the number of pages views var pageViewCounter = getCookie(pageViewCookie_LO); var endTime_LO = getCurrentTime(); elapseTime=(endTime_LO - startTime_LO) / 1000; elapseTime_LO=elapseTime_LO + elapseTime; var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(timeCookie_LO, elapseTime_LO, now); setCookie(surveyID_LO, "True", now); //To manually size a window change x and y to a specific number or pixels //----------------------------------------------------------------------- var x=screen.availHeight - 10; var y=screen.availWidth - 10; x=550; y=800; //Opens survey into a new window without tool bars or menus //--------------------------------------------------------- window.open("http://deploy.ztelligence.com/start/index.jsp?PIN=" + PIN + "&type=" + popType + "&pages=" + pageViewCounter + "&time=" + elapseTime_LO,'Survey1','toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=yes,scrollbars=yes,width=' + y + ',height=' + x + ',screenY=50,left=50,top=50'); } if (noGO_sw == 0) { if ((popType == 1) || (popType == 2)) { var surveyAsked = getCookie(surveyID_LO); if ((!surveyAsked) && (!noLayerPopFlag) && (!currentSessionFlag) ) { var nameObject = createMiniWinLayer( layeredText , '', //The text to be written in the title bar of the mini window 300, //Distance from the left edge of the page to start 100, //Distance from the top edge of the page to start 320, //Width of the mini window '#98B4A8', //The background colour of the title bar of the mini window '#ffffff', //The background colour of the main part of the mini window 'logo.gif', //The location of the logo image in the top left corner (16px x 16px) 'min.gif', //The location of the minimise image (16px x 16px) 'restore.gif', //The location of the restore image (16px x 16px) 'http://www.surveywriter.net/in/cross.gif', //The location of the 'close window' image (16px x 16px) 'max.gif', //The location of the maximise image (16px x 16px) - use '' for not maximisable //(only used if drag handle image is also specified) '', //The location of the drag handle image (8px x 8px) - use '' for not resizable //(not available if dragable portion is set to true) 1, //Initial window visibility (0 = hidden, 1 = maximised, 2 = minimised) false, //Dragable portion (true = entire window, false = title bar only) //Some browsers may have problems using the minimise/maximise/close buttons //if you use entire window. '', //Only used in DOM browsers - HTML to be put just above the main part of the window - //this MUST NOT contain any 'div' elements - this is designed to be used along with my //display based menu script to provide menus in the mini windows false //Only used in DOM browsers (not Konqueror or IE Mac) - should the window use scrollbars ); hideMinWin("MWJminiwinMAX1"); if (popupDelay_LO > 0) { setTimeout('doShowMinWin();',parseFloat(popupDelay_LO) * 1000); } else { doShowMinWin(); } } else { } } else { } } function doShowMinWin() { var endTime_LO = getCurrentTime(); elapseTime=(endTime_LO - startTime_LO) / 1000; elapseTime_LO=parseFloat(elapseTime_LO) + parseFloat(elapseTime); var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); setCookie(timeCookie_LO, elapseTime_LO, now); var now = new Date(); fixDate(now); now.setTime(now.getTime() + 182 * 24 * 60 * 60 * 1000); //setCookie(surveyID_LO, "True", now); showMinWin("MWJminiwinMAX1"); setCookie("currentSessionFlag", "True", now); } function moveURL(x) { moveWin( "MWJminiwinMAX1", "MWJminiwinMIN1",x, 100); } function CloseLayer() { moveWin("MWJminiwinMAX1","MWJminiwinMIN1",0,0); resizeWin("MWJminiwinMAX1","MWJminiwinMIN1",0,0); hideMinWin("MWJminiwinMAX1"); } function deleteCookie(theDays) { createCookie(surveyID_LO,"",theDays); CloseLayer(); } function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function doFunctionCheckClickSW(e) { var targ; if (!e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; var targHref=targ.href; if (targHref!=undefined) { if (targHref.indexOf(location.hostname)>-1) { noGO1_sw=1; } } } var element; if (element) { document.captureEvents(Event.CLICK); } document.onclick = doFunctionCheckClickSW; //-->