function $(id)
{
    return document.getElementById(id);
}
function CheckKeyword1()
{
    $("keywordMSG").innerHTML="Search like this keywords";
    $("keywordMSG").style.color="#00CC00";
    $("keywordMSG").style.backgroundColor="#ffffff";
}
function CheckKeyword2()
{
    $("keywordMSG").innerHTML="";
}
function CheckTime()
{
    var kw = $("TB_Keywords").value;
    var stime = $("TB_stime").value;
    var etime = $("TB_etime").value;
    var sReg=/^[0-9]+(.[0-9]{1,2})?$/;
    var sprice=$("TB_sprice").value;
    var eprice=$("TB_eprice").value;
    var ok = AjaxProAdvancedSearch.CheckSETime(stime,etime).value;
    if(kw=="")
    {
        $("keywordMSG").innerHTML="Enter Keywords please!";
        $("keywordMSG").style.color="#00CC00";
        $("keywordMSG").style.backgroundColor="#ffffff";
        return false;
    }
    else if(ok=="false")
    {
        $("timeMSG").innerHTML="Start time is greater than the end of time";
        $("timeMSG").style.color="#00CC00";
        $("timeMSG").style.backgroundColor="#ffffff";
        return false;
    }
    else if(!sReg.test(sprice)&&sprice!="")
    {
        $("priceMSG").innerHTML="The Start Price is wrong! e.g. 0.01 or 1.1 or 10";
        $("priceMSG").style.color="#00CC00";
        $("priceMSG").style.backgroundColor="#ffffff";
        return false;
    }
    else if(!sReg.test(eprice)&&eprice!="")
    {
        $("priceMSG").innerHTML="The End Price is wrong! e.g. 0.01 or 1.1 or 10";
        $("priceMSG").style.color="#00CC00";
        $("priceMSG").style.backgroundColor="#ffffff";
        return false;
    }
    else if(sprice>eprice&&sprice!=""&&eprice!="")
    {
        $("priceMSG").innerHTML="The start price is larger than end price";
        $("priceMSG").style.color="#00CC00";
        $("priceMSG").style.backgroundColor="#ffffff";
        return false;
    }
    else
    {
        $("priceMSG").innerHTML="";
        return true;
    }
}

