    function SubmitSymbol()    {
        var stockSymbolExchange, stockSymbolExchangeBox, stockSymbol, exchange, companyName, companyID, space;
        
        if(document.frames){
            stockSymbolExchangeBox = document.frames("IFrameLookUp").document.forms[0].elements[1];
            companyID = document.frames("IFrameLookUp").document.forms[0].elements[2].value;
        }else{
            stockSymbolExchangeBox = document.getElementById('IFrameLookUp').contentDocument.getElementById('autoCompleteInvestment_textBox');
            //stockSymbolExchange = document.getElementById('IFrameLookUp').contentDocument.getElementById('autoCompleteMining_textBox').value;
            companyID = document.getElementById('IFrameLookUp').contentDocument.getElementById('autoCompleteInvestment').value;
        }
        
        stockSymbolExchange = stockSymbolExchangeBox.value; 

        
        if(stockSymbolExchange != ""){
            //document.location.href="http://www.infomine.com/investment/zstockquote.asp?sbl=" + stockSymbol + "&cid=" + companyID;
            companyID = companyID.replace(/amp;/g, "");
            companyID = companyID.replace(/ /g, "_");
            
            if(companyID.length > 5)
              document.stockquoteform.action = "http://www.infomine.com/index/companies/" + companyID + ".html";
            else {
              alert("Please select a company from the list.");
              stockSymbolExchangeBox.select();
              return false;
            }            
       }
        
        return true;
    }

    function hideDropDown(){
       
        var dropDown;
        
        if(document.frames){
            dropDown = document.frames("IFrameLookUp").document.forms[0].elements[3];
        }else{
            dropDown = document.getElementById('IFrameLookUp').contentDocument.getElementById('autoCompleteMining_dropDown');
        }
        
       //alert(dropDown);
       dropDown.style.visibility = "hidden";
        
        return true;        
    }
    
    function trim(stringToTrim) {
	    return stringToTrim.replace(/^\s+|\s+$/g,"");
    }
    
