//<!--
			function pandi_advisor() {
				window.open('/cgi-bin/sbso/exit.cgi?goto=product/pandi_advisor','CtrlWindow','toolbar=1, menubar=1,scrollbars=1,location=0,resizable=1,status=1,width=570,height=600'); return false;
			}

			function openprod(page) {
				window.open(page,'pop','toolbar=0, menubar=0,scrollbars=0,location=0,resizable=0,status=0,width=165,height=130');
			}

			function MM_openBrWindow(url) {
    			remote = window.open("","remotewin","status=yes,toolbar=1, menubar=1 ,scrollbars=yes,width=570,height=600");
    			remote.location.href = url;
        			if (remote.opener == null) remote.opener = window;
    			remote.opener.name = "the_opener";
    		}

			function removeUrlParameter(url,removeParam)
			{
				origionalUrl = url;
				removeParam += "="; //append equals to match ensures matching on key and not value or URL.
			
				beginParamIndex = url.indexOf(removeParam); 
				endParamIndex = url.indexOf("&",beginParamIndex);
			
				if(endParamIndex < 0) //check for end of line. didn't match a following '&'
					{
						endParamIndex = url.length; //set end index to url length
						beginParamIndex -= 1; // subtract 1 from begin index, to remove the preceding '?' or '&'
					}
			
				if(beginParamIndex < 0)
					endParamIndex = -1;  //if match not found set end index to -1 so that nothing is removed.
				
				extracted = url.substring(beginParamIndex,endParamIndex+1);  //get key and value string.
			
				if((extracted.indexOf("?") > -1) && (endParamIndex > -1) && (beginParamIndex > -1))
					extracted = "\\" + extracted;  //prepend a '\' if a '?' is the first character of the parameter.  
													//regular expressions require an escape for '?'
				rExpression = RegExp(extracted);  //create regular expression from parameter
				url = url.replace(rExpression,"");  //replace matches with nothing(effectively removing)
				return url;
//				alert(origionalUrl+"\nBegin index: "+beginParamIndex+"\nEnd index: "+endParamIndex+"\nextract: "+extracted+"\nresult: "+url);
			}

			function popup2(url,w,h)
			{
					newWindow = window.open (url, 'mesa', 'resizable=no,toolbar=no,location=no,menubar=no,status=no,scrollbar=no,width='+w+',height='+h);
			        newWindow.focus();
			}
			
		/*	if coming from staging and in admin tool (frames exist), then add 'adminFrame' parameter 
			to href and refresh to itself so we can extract the parameter with php to set the 
			environment=DEV so users coming from stage see dev content. DONT NEED - dbsplit*/ 
			function refreshWithAdminFrame() {
				if(document.location.search) {
					queryVar = "&";
				} else {
					queryVar = "?";
				}
				if(window.parent.frames[0]) {
					//if(window.parent.frames[0].name=="menuFrame" && (document.location.href.indexOf("adminFrame=") == -1) || document.adminForm.adminFrame.value!="yes") {
					if(window.parent.frames[1].name=="menuFrame" && (document.location.href.indexOf("adminFrame=") == -1)) {
						// && filenameOnly(location.href) != "editContent.php"
						wholeUrl = document.location.href;
						wholeUrl = wholeUrl + queryVar + 'adminFrame=yes';
						document.location.href = wholeUrl;
					}
				}
			}
			function open_popup(page,x,y,s,r) { 
				eval("page" + " = window.open(page, 'newWin', 'toolbars=0,scrollbars=' + s + ',location=0,statusbars=0,menubars=0,resizable=' + r + ',width=' + x + ',height=' + y);");
				page.focus();
				return false;
			}
//-->
