function checkAnswer(answer) {
    if (answer == 1) {
        //alert(answer);
        document.getElementById('WhichAdvertisementSpan').innerHTML = "<b>Where did you see the advertisement?</b><br /><textarea name='WhichAdvertisement' id='WhichAdvertisement' cols='55' rows='3' class='silverBorder'>" + WhichAdvertisement + "</textarea><br><br>";
    }
    else {
        //alert(answer);
        document.getElementById('WhichAdvertisementSpan').innerHTML = "PLEASE NOTE:  If you are <span style='color:red;'>not responding to an advertised position</span>, please feel free to submit your resume for future vacancies. You will receive an automated receipt of your resume. Your resume will be reviewed when a suitable position becomes vacant.<br><br>";
    }
}
function ajaxChangeLocation(branchID) {
    var theURL = 'ajaxLocationChecker.asp?BranchID=' + branchID + '&deafExperience=' + deafExperience + '&auslanFluent=' + auslanFluent;
    var spanID = 'deafInfo';
    ajaxFunction(theURL, spanID)
}
function checkPosition(position) {
    var currentLocation = document.getElementById('Location').selectedIndex;
    if (position == 3) {
        if (currentLocation != 11)
        {
            alert("This position is not available from Nova outlet you have selected above.\nPlease select \'Deaf Service\' from the location box above");
            document.getElementById('Location').selectedIndex = 0;
            document.getElementById('Location').focus();
        }
    }
}
function ajaxFunction(theURL, spanID) {

    document.getElementById(spanID).innerHTML = "Please wait..."
    var theTime = new Date().getMilliseconds();
    var xmlhttp;
    if (window.XMLHttpRequest) {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        // code for IE6, IE5
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else {
        alert("Your browser does not support XMLHTTP!");
    }
    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            document.getElementById(spanID).innerHTML = xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET", theURL + "&t=" + theTime, true);
    xmlhttp.send(null);
}
//checkAnswer(Advertised);
ajaxChangeLocation(Location)
