﻿// JScript File

function SearchButtonOnClick()
{
    var text = this.document.getElementById("SearchText");
    var site = this.document.getElementById("Site");
    if (text == null || site==null)
        return;
        
    //alert(text.value + ";" + site.value);
    if (text.value=="") 
    {
        alert("Please enter the keyword to search.");
        return;
    }
    
    top.document.location.href= "http://www.anggogo.com/search.aspx?keyword=" + text.value + "&site=" + site.value;
}

function handleEnter(e)
{
    if (!e) e=window.event;
    
    var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
    if (keyCode == 13) 
    {        
        //alert(keyCode);
        e.cancelBubble = true;
        if (e.returnValue) e.returnValue = false;
        if (e.stopPropagation) e.stopPropagation();        
        eval(SearchButtonOnClick());
        return false;
    }
    return true;
 }
 
function popUp(URL,NAME) 
{
    amznwin=window.open(URL,NAME,"location=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,width=380,height=450,screenX=10,screenY=10,top=10,left=10");
    amznwin.focus();
}