BASE_URL = "."
if ( document.location.href.indexOf("www.wirelessbeehive.com") > 0 ) {
	BASE_URL = "/cgi-bin"
}


function verifyNoWires(formname) {
    var output = document.getElementById('statusdiv');
    var xml = new JKL.ParseXML.Text(BASE_URL + "/checkcoverage.cgi", "accountStreet=" + encode(formname.accountStreet.value) + "&accountCity=" + encode(formname.accountCity.value) + "&accountState=" + encode(formname.accountState.value), "POST");
    output.innerHTML = "Searching...";
    output.innerHTML = xml.parse();
}


function encode( uri ) {
    if (encodeURIComponent) {
        return encodeURIComponent(uri);
    }

    if (escape) {
        return escape(uri);
    }
}

function decode( uri ) {
    uri = uri.replace(/\+/g, ' ');

    if (decodeURIComponent) {
        return decodeURIComponent(uri);
    }

    if (unescape) {
        return unescape(uri);
    }

    return uri;
}
