//======================================================= //detect browser settings for showing and hiding DIVs isNS4 = (document.layers) ? true : false; isIE4 = (document.all && !document.getElementById) ? true : false; isIE5 = (document.all && document.getElementById) ? true : false; isNS6 = (!document.all && document.getElementById) ? true : false; //======================================================= function switchDiv(strDivName,bolVisible){ //identify the element based on browser type if (isNS4) { objElement = document.layers[strDivName]; } else if (isIE4) { objElement = document.all[strDivName].style; } else if (isIE5 || isNS6) { objElement = document.getElementById(strDivName).style; } var is_current = objElement.display; // Use -1 to just Toggle it to what it wasn't if (bolVisible == -1) { if (is_current == "none") { objElement.display = ""; } else { objElement.display = "none"; } } else if(!bolVisible){ objElement.display = "none"; } else { objElement.display = ""; } } function addslashes(str) { str=str.replace(/\'/g,'\\\''); str=str.replace(/\"/g,'\\"'); str=str.replace(/\\/g,'\\\\'); str=str.replace(/\0/g,'\\0'); return str; } function stripslashes(str) { str=str.replace(/\\'/g,'\''); str=str.replace(/\\"/g,'"'); str=str.replace(/\\\\/g,'\\'); str=str.replace(/\\0/g,'\0'); return str; }