\n'); } function SendPage(gotoPage){ document.Pandroid.SetVariable("page", gotoPage); } function SendHost(isHost){ document.Pandroid.SetVariable("isHost", isHost); } /* The parameters of the function above holds the name of the cookie, the value of the cookie, and the number of days until the cookie expires. In the function we first convert the number of days to a valid date, then we add the number of days until the cookie should expire. After that we store the cookie name, cookie value and the expiration date in the document.cookie object. */ function setCookie(c_name,value,expiredays) { var exdate=new Date() exdate.setDate(expiredays) document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : "; expires="+exdate) } /* If the document.cookie object holds some cookies, then check to see if our specific cookie is stored. If our cookie is found, then return the value, if not - return null. */ function getCookie(c_name) { if (document.cookie.length>0) { 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 null } function checkWelcome(){ var userbeen = GetWelcomeCookie('userbeen'); wbStat=getCookie('welcomeback'); pathname = location.pathname; myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/'; // set expiry date to 1 month from now. var largeExpDate = new Date (); largeExpDate.setTime(largeExpDate.getTime() + (5 * 24 * 3600 * 1000)); if (userbeen == null) { userbeen = 'yes'; SetWelcomeCookie('userbeen',userbeen,largeExpDate,myDomain); } else { userbeen = 'yes'; if(wbStat == 'yes') SendPage("Idle"); else SendPage("WelcomeBack"); }//end if }//end checkWelcome(); function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetWelcomeCookie (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 getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetWelcomeCookie (name, value) { var argv = SetWelcomeCookie.arguments; var argc = SetWelcomeCookie.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; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } //document.write('
Thanks for coming, '+userbeen); function backToSupport() { isHostOn=getCookie('isHostOn'); toPage=getCookie('backto'); //if (toPage!=null) if (toPage == 'support') { if(isHostOn == 'no') { SendHost('no') SendPage("SupportIdle"); isHostOn = 'none'; } else if(isHostOn == 'yes') { SendPage("Support"); isHostOn = 'none'; } toPage = 'none'; } else if (toPage == 'contactus') { if(isHostOn == 'no') { SendHost('no') isHostOn = 'none'; } else if(isHostOn == 'yes') { SendPage("ContactUs"); isHostOn = 'none'; } toPage = 'none'; } else if (toPage == 'services') { if(isHostOn == 'no') { SendHost('no') isHostOn = 'none'; } else if(isHostOn == 'yes') { SendPage("Services"); isHostOn = 'none'; } toPage = 'none'; } else if (toPage == 'products') { if(isHostOn == 'no') { SendHost('no') isHostOn = 'none'; } else if(isHostOn == 'yes') { SendPage("Products"); isHostOn = 'none'; } toPage = 'none'; } else if (toPage == 'aboutus') { if(isHostOn == 'no') { SendHost('no') isHostOn = 'none'; } else if(isHostOn == 'yes') { SendPage("AboutUs"); isHostOn = 'none'; } toPage = 'none'; } } function displayMicrosite() { var iWidth = 800; var iHeight = 500; var iTop = screen.width / 2 - iWidth / 2; var iLeft = screen.width / 2 - iWidth / 2; var sMetrics = 'top=' + iTop + ', left=' + iLeft + ', width=' + iWidth + ', height=' + iHeight; window.open('../../microsites/helpDesk/index.download.html','microsite', 'menubar=no, status=no, toolbar=no, ' + sMetrics); } //-->