﻿// Google Search JScript File
// NMO 20070229


function GoogleSearch() {

    var SearchString = document.getElementById("txtSearchString").value;
    SearchString = SearchString.replace(/ /,"+");
    
    var GoogleSearchURL = "http://www.google.com/custom?q=";
    GoogleSearchURL = GoogleSearchURL + SearchString;
    GoogleSearchURL = GoogleSearchURL + "&sa=Go&cof=LW%3A800%3BL%3Ahttp%3A%2F%2Fwww.astronomy.org.nz%2Fimages%2FHeader%2FAAS_Google.jpg%3BLH%3A100%3BAH%3Aleft%3BGL%3A0%3BS%3Ahttp%3A%2F%2Fwww.astronomy.org.nz%3BAWFID%3A8862a6d961e874bc%3B&domains=www.astronomy.org.nz&sitesearch=";

    var GoogleSiteSearchURL = GoogleSearchURL;
    GoogleSiteSearchURL = GoogleSiteSearchURL + "www.astronomy.org.nz";
   
    if (document.getElementById("chkSearchType").checked) {
        window.open(GoogleSearchURL,"_blank", "resizable=yes, scrollbars=yes, toolbar=yes");
    }
    else {
        window.open(GoogleSiteSearchURL,"_blank", "resizable=yes, scrollbars=yes, toolbar=yes");
    }
        
}