function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function changeChoice(obj) {
    //alert(obj.options[obj.selectedIndex].text);//value);
    var choice1 = document.getElementById('c1');
    var choice2 = document.getElementById('c2');
    var choice3 = document.getElementById('c3');
    var choice1Text = document.getElementById('1stChoice');
    var choice2Text = document.getElementById('2ndChoice');
    var choice3Text = document.getElementById('3rdChoice');
    //alert(choice1.value);
    if (obj.options[obj.selectedIndex].text == "First") {
        choice1.value = obj.options[obj.selectedIndex].value;
        choice1Text.innerHTML = obj.options[0].value;
    } else if (obj.options[obj.selectedIndex].text == "Second") {
        choice2.value = obj.options[obj.selectedIndex].value;
        choice2Text.innerHTML = obj.options[0].value;
    } else if (obj.options[obj.selectedIndex].text == "Third") {
        choice3.value = obj.options[obj.selectedIndex].value;
        choice3Text.innerHTML = obj.options[0].value;
    }
}

function checkChoices(whichOne) {
    var choice1 = document.getElementById('c1');
    var choice2 = document.getElementById('c2');
    var choice3 = document.getElementById('c3');
    var choice1Text = document.getElementById('1stChoice').innerHTML;
    var choice2Text = document.getElementById('2ndChoice').innerHTML;
    var choice3Text = document.getElementById('3rdChoice').innerHTML;
    var count = document.getElementById('count').value;
    //alert (x.action);
    
    if (count >= 3) {
        if (choice1.value == "" || choice2.value == "" || choice3.value == "") {
            document.getElementById('errorText').innerHTML = "Please select Choice options (First, Second and Third)";
            alert("Please select property Choice options (First, Second and Third)");
            return;
        }
    } else if (count >= 2) {
        if (choice1.value == "" || choice2.value == "") {
            document.getElementById('errorText').innerHTML = "Please select Choice options (First and Second)";
            alert("Please select property Choice options (First and Second)");
            return;
        }
    } else if (count >= 1) {
        if (choice1.value == "") choice1.value = document.getElementById('choice0').options[1].value;
    }
    
    if (whichOne == "enquiry") document.forms["shortlistForm"].action = "SubmitEnquiry.aspx";
    document.forms["shortlistForm"].submit();
}

function popUp(URL, widthIn, heightIn) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + widthIn + ",height=" + heightIn + "');");
}

function enableCheckbox() {
    document.getElementById('TermsReadCheckbox').disabled = false;
}

function doTestBox() {
    document.getElementById('FirstName').onkeypress = "doTestText()";
    alert(document.getElementById('FirstName').onkeypress)
}

function doTestText() {
    if (document.getElementById('FirstName').value == "test") {
        document.getElementById('Title').options[1].selected = true;
        document.getElementById('FirstName').value = "FirstName";
        document.getElementById('LastName').value = "LastName";
        document.getElementById('Email').value = "prague1@mlongagency.com";
        document.getElementById('HomePhone').value = "0123456789";
        document.getElementById('MobilePhone').value = "0123456789";
        document.getElementById('ContactMethod').options[1].selected = true;
        document.getElementById('DateFromText').value = "01/02/2009";
        document.getElementById('DateToText').value = "08/02/2009";
        document.getElementById('NoOfNights').innerHTML = "7";
    }
}

//Title.SelectedIndex = 1;
//FirstName.Text = "FirstName";
//LastName.Text = "LastName";
//Email.Text = "prague1@mlongagency.com";
//HomePhone.Text = "0123456789";
//MobilePhone.Text = "0123456789";
//ContactMethod.SelectedIndex = 1;
//DateFromText.Text = "01/02/2009";
//DateToText.Text = "08/02/2009";
//NoOfNights.Text = "7";
