		sfHover = function(){
			var nav = document.getElementById("topnav");
			if(nav){	// Added by RL, 3/8/04 as nav0 might not exist.
				var sfEls = nav.getElementsByTagName("LI");
				for (var i=0; i<sfEls.length; i++) {
					sfEls[i].onmouseover=function() {
						this.className+=" sfhover";
					}
					sfEls[i].onmouseout=function() {
						this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
					}
				}
			}
		}
		if (window.attachEvent) window.attachEvent("onload", sfHover);
		// Check File Type
		function changeFileType( s ){
			try{
				if( document.all )
				{
					if(s.value == ""){
						document.all.fileExtension_other_ID.style.display = "inline";
						document.advancedForm.fileExtension_other.focus();
					}
					else{
						document.all.fileExtension_other_ID.style.display = "none";
					}
				}
			}catch(e){ alert(e.description); }
		}
		function changeWhere( s ){
			try{
				if( document.all )
				{
					var show = "visible";
					if(s.value != "document"){
						show = "hidden";
					}
					document.all.fileExtension_ID.style.visibility = show;
				}
			}catch(e){ alert(e.description); }
		}
		//////////////////////////////////////////////////////////////////////////////////////////////
		//  Converts a specified substring of a nodes text to bold
		//////////////////////////////////////////////////////////////////////////////////////////////
		function makeSubstringFontBold(mainNode, subString)
		{
			var mainString = mainNode.firstChild.data;
			var startPos = mainString.indexOf(subString);
			if(startPos>=0)
			{
				var begNormalString = mainString.substring(0, startPos-1);
				var boldString = mainString.substring(startPos, startPos+subString.length);
				var endNormalString = mainString.substring(startPos+subString.length+1, mainString.length);
				
				// Creates a text node for the beginning text that does not change
				if (begNormalString != "")
					var begNormalText = document.createTextNode(begNormalString + " ");
				else
					var begNormalText = document.createTextNode(begNormalString);
				// Creates a bold element
				var boldElm = document.createElement('B');
				// Creates text for the bold node
				var boldText = document.createTextNode(boldString);
				// Adds the text to the bold element
				boldElm.appendChild(boldText);
				// Creates a text node for the beginning text that does not change
				if (endNormalString != "")
					var endNormalText = document.createTextNode(" " + endNormalString);
				else
					var endNormalText = document.createTextNode(endNormalString);
				
				// Removes current text and adds the new bolded text
				mainNode.removeChild(mainNode.childNodes[0]);
				mainNode.appendChild(begNormalText);
				mainNode.appendChild(boldElm);
				mainNode.appendChild(endNormalText);
			}
		}	
		function jtrim(str)
		{
		var i= 0;
			var ltrimedStr = ""
			var rtrimedStr = ""
			l=str.length;
			for (i=0;i<l;i++)
			{
				if (str.charAt(i) != " ")
				break;
			}
			ltrimedStr = str.substring(i,l);
			k = ltrimedStr.length;   
			for(j=k-1;j>=0;j--)
			{
		      
			if (ltrimedStr.charAt(j)!= " ")
			{
					break;
			}  
			}
		      
			rtrimedStr = ltrimedStr.substring(0,j+1);
			return rtrimedStr;
		} 
		function ValidateSearchBox(id)
		{
					
			if(jtrim(document.getElementById(id).value).length < 3 )
			{
				alert("Please enter at least 3 letters for the search");
				document.getElementById(id).focus();  
				return false;
			}
			else
			{
					var m = document.getElementById(id).value
					if (m.search(/^[\w+áàäçéèêñóòôöüæøå ]+( \w[áàäçéèêñóòôöüæøå ]+)?$/) == -1)
					{
					alert("Special characters not allowed"); 
					document.getElementById(id).focus();
					return false;
					}
					
					
			}
			return true;
		} 	
		function emailPassword()//This function is to display the popup window for emailing the password
		{
			window.open('sbt_emailpassword.aspx','','toolbar=no,scrollbars=no,resizable=no, width=480, height=200','');
		}
