function getCookie(name) { var result = null; var myCookie = " " + document.cookie + ";"; var searchName = " " + name + "="; var startOfCookie = myCookie.indexOf(searchName); var endOfCookie; if (startOfCookie != -1) { startOfCookie += searchName.length; // skip past cookie name endOfCookie = myCookie.indexOf(";", startOfCookie); result = unescape(myCookie.substring(startOfCookie,endOfCookie)); } return result; } function setCookie(NameOfCookie, value, expiremonths,path,domain,secure) { // Three variables are used to set the new cookie. // The name of the cookie, the value to be stored, // and finally the number of days until the cookie expires. // The first lines in the function convert // the number of days to a valid date. var expiredate = new Date (); var expdays = parseInt(expiremonths) * 365 / 12; var days = parseInt(expdays.toString()); var pathString = ((path == null) ? "" : ("; path=" + path)); var domainString = ((domain == null)? "" : ("; domain=" + domain)); var secureString = ((secure == true) ? "; secure" : ""); expiredate.setTime(expiredate.getTime() + (days * 24 * 60 * 60 * 1000)); // The next line stores the cookie, simply by assigning the values to the "document.cookie" object. document.cookie = NameOfCookie + "=" + escape(value) + ((expiremonths == null) ? "" : ";expires=" +expiredate.toGMTString())+ pathString; } function delCookie(NameOfCookie) { // The function simply checks to see if the cookie is set. // If so, the expiration date is set to Jan. 1st 1970. if (getCookie(NameOfCookie)) { document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } function doSpupop(popupenabled,launchpopup,popupnum){ setCookie('testcookie','yes',null,'/fido/'); cookieEnabled=getCookie('testcookie'); if (cookieEnabled=='yes') { if (popupenabled == 'Yes') { if (launchpopup == 'Yes') { CheckPopupCookie(popupnum); } } } } function oldCheckPopupCookie(popupnum) { shown=getCookie('asicpopups'); if (shown==null) { window.open("/fido/centadm.nsf/0/" + popupnum,"Survey", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=350,location=no"); } else { if (shown!='yes') { window.open("/fido/centadm.nsf/0/" + popupnum,"Survey", "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=560,height=350,location=no"); } } } // Checks whether a cookie has been set. If not, it will display the pop up. function CheckPopupCookie(popupnum) { var windowWidth, windowHeight, windowLeft, windowTop; if(typeof window.screenX == "number" && typeof window.innerWidth == "number") { windowWidth = window.innerWidth * .5; windowHeight = window.innerHeight * .6; windowLeft = window.screenX + window.innerWidth * .16; windowTop = window.screenY + window.innerHeight * .16; } else if(typeof window.screenTop == "number" && typeof document.documentElement.offsetHeight == "number") { windowWidth = document.documentElement.offsetWidth * .5; windowHeight = document.documentElement.offsetHeight * .6; windowLeft = window.screenLeft + document.documentElement.offsetWidth * .16; windowTop = window.screenTop - 50; } else { windowWidth = 560; windowHeight = 350; windowLeft = 60; windowTop = 40; }; shown=getCookie('asicpopups'); if (shown==null) { window.open("/fido/centadm.nsf/0/" + popupnum,"Survey", "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no"); } else { if (shown!='yes') { window.open("/fido/centadm.nsf/0/" + popupnum,"Survey", "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no"); } } } function setYesCookie(popupexp,popupURL) { this.disabled=true; this.value='Please wait...'; setCookie('asicpopups','yes', popupexp,'/fido/'); newwin = window.open(popupURL); window.open('','_parent',''); window.close(); newwin.focus(); } function setNoCookie(popupexp) { setCookie('asicpopups','yes',popupexp,'/fido/'); window.close(); } function setNotNowCookie(popupexp) { setCookie('asicpopups','yes',null,'/fido/'); window.close(); } function testPopup(popupnum) { window.open("/fido/centadm.nsf/0/" + popupnum,"Survey", "width=100,height=100" + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no"); } function FidoFeedback(){ var windowWidth, windowHeight, windowLeft, windowTop; if(typeof window.screenX == "number" && typeof window.innerWidth == "number") { windowWidth = window.innerWidth * .6; windowHeight = window.innerHeight * .85; windowLeft = window.screenX + window.innerWidth * .16; windowTop = window.screenY + window.innerHeight * .16; } else if(typeof window.screenTop == "number" && typeof document.documentElement.offsetHeight == "number") { windowWidth = document.documentElement.offsetWidth * .6; windowHeight = document.documentElement.offsetHeight * .85; windowLeft = window.screenLeft + document.documentElement.offsetWidth * .16; windowTop = window.screenTop - 50; } else { windowWidth = 670; windowHeight = 700; windowLeft = 60; windowTop = 40; }; window.open("/fido/fido.nsf/FIDOFeedback?openform","Feedback", "top=" + windowTop + ",left=" + windowLeft + ",width=" + windowWidth + ",height=" + windowHeight + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no"); }