//cookie functions function SetCookie(name,value,path,domain,expires,secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.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 (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 getCookieVal(offset) { var endstr = document.cookie.indexOf(";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } expdate = new Date(); Days = 60 //how long the cookie will last expdate.setTime (expdate.getTime() + (Days * 24 * 60 * 60 * 1000)); function sourceParm(ArgString) { parmSource="0"; //default to zero in case there are search args, but none is "source" if (ArgString.indexOf("&") != -1 ) { // if more than one search arg refParms=ArgString.split("&"); // split parms searchParms=refParms; //check if any search parms are source ones for (i=0; i < searchParms.length; i++) { // go through the array of parms passed if (searchParms[i].indexOf("source") != -1 || searchParms[i].indexOf("Source") != -1) { // if find parm with word source parmSource=searchParms[i]; // find name-value pair with source name } } //end for }else { parmSource=ArgString; // if only one search arg set as parmsource } if (parmSource != "0") { // if value changed from default parmID=parmSource.split("=") // split out the value from the label return parmID[1]; // source value } } //end sourceParm