﻿// JScript 文件

function openWindow(theURL,winName,width,height)
{
    window.open(theURL,winName,"width="+width+",height="+height+",toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no");
}

function GetEvents(events)
{   
    var btn=document.getElementById("btnHKStockSearch");
    var currentKey = events.charCode||events.keyCode;
    if(document.all)    
    {
        if( currentKey == 13 )
        {
            event.returnValue=false;
            btn.click();
        }
    }
    else
    {
        if(currentKey == 13 )
        {
            events.preventDefault(); 
            btn.click();
        }
    }
}
function DoSearch()
{
    var txt = document.getElementById("txtHKStockCode");
    if(txt.value!="")
    {
        window.location.href='QuoteShare.aspx?symbol='+txt.value;
    }
    else
        alert("请输入股票代号！");
}
function indexSearch()
{
    var txt = document.getElementById("txtHKStockCode");
    if(txt.value!="")
    {
        window.location.href='hkstocks/QuoteShare.aspx?symbol='+txt.value;
    }
    else
        alert("请输入股票代号！");
}