function searchPopUpTestHeader() {
	var boolFound;
	boolFound = false;
	var outletKeywords = new Array ("outlet", "outlet store", "eddie bauer outlet", "clearance");
	
	searchTerm = trim(document.searchform.searchstring.value);		

	if (searchTerm != "") {
		for (i=0;  i < outletKeywords.length; i++) {
			if (searchTerm.toLowerCase() == outletKeywords[i]) {
				boolFound = true;
				break;
			}
		}
	
		if (boolFound == true) { 
			PopUp('/eb/jump.asp', 'JumpPage','526','276','10','10');
			popupwin.focus();
			return false;
		} else {
			searchsubmit();
		}
	}
}

function searchsubmit () {
    return false;   
    alert('come here');
    alert(br); 		
    if(br=="N"){
		if(trim(document.searchform.searchstring.value) == "Enter Keyword or Item #"){
			document.searchform.searchstring.value = "";
		}
        var searchURL = '/eb/searchresults.asp?searchstring='+escape(document.searchform.searchstring.value)+'&lp=h4';
    	gotoUrl(searchURL);        
    	return false;        
    	    	
    }	
    
    if(br=="IE"){
        alert('come here');
        if(trim(document.all.searchform.searchstring.value) == "Enter Keyword or Item #"){			
			document.all.searchform.searchstring.value = "";
		}		
        var searchURL = '/eb/searchresults.asp?searchstring='+document.all.searchform.searchstring.value+'&lp=h4';        
    	gotoUrl(searchURL);
    	return false;        	
    }
            
    if(br=="NS6"){		
        if(trim(document.searchform.searchstring.value) == "Enter Keyword or Item #"){			
			document.searchform.searchstring.value = "";
		}		
        var searchURL = '/eb/searchresults.asp?searchstring='+document.searchform.searchstring.value+'&lp=h4';        
    	gotoUrl(searchURL);
    	return false;        	
    }
}

function trim(inputString) {
   // Removes leading and trailing spaces from the passed string. Also removes
   // consecutive spaces and replaces it with one space. If something besides
   // a string is passed in (null, custom object, etc.) then return the input.
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") { // Check for spaces at the beginning of the string
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") { // Check for spaces at the end of the string
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) { // Note that there are two spaces in the string - look for multiple spaces within the string
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); // Again, there are two spaces in each of the strings
   }
   return retValue; // Return the trimmed string back to the user
} // Ends the "trim" function
