//This module will hold all of the java scripts to be used in this web application

// This function will change the state of the comboboxes depending on which value the combobox
// scboArrivalDate is set to.

function SetArrivalDateState()
	{
		//alert(document.getElementById("scboArrivalDate").value);
		if (document.getElementById("scboArrivalDate").value=="Not Sure")
			{
				//document.getElementById("scboLengthOfStay").disabled="true";
				//document.getElementById("scboTotalRent").disabled="true";
				document.getElementById("scboLengthOfStay").disabled = true;
				/*document.getElementById("scboTotalRent").disabled = true;*/
			}
		else
			{
				/*document.getElementById("scboTotalRent").disabled = false;*/
				document.getElementById("scboLengthOfStay").disabled = false;
			}
	}
/*function SetArrivalDateStateAdvanced()
	{
		if (document.getElementById("scboArrivalDate").value=="Not Sure")
			{
				document.getElementById("scboLengthOfStay").disabled = true;
				document.getElementById("scboTotalRent").disabled = true;
				document.getElementById("scboPlusMinusDays").disabled = true;
			}
		else
			{
				document.getElementById("scboTotalRent").disabled = false;
				document.getElementById("scboLengthOfStay").disabled = false;
				document.getElementById("scboPlusMinusDays").disabled = false;
			}
	}*/
/*
function SetArrivalDateState2()
	{
		alert(document.getElementById("scboArrivalDate").value);
		if (document.forms('Form1').scboArrivalDate.value=="Not Sure")
			{
				document.forms('Form1').scboLengthOfStay.disabled="true";
				document.forms('Form1').scboTotalRent.disabled="true";
				
			}
		else
			{
				document.forms('Form1').scboTotalRent.disabled = false;
				document.forms('Form1').scboLengthOfStay.disabled = false;
			}
	}



//scboArrivalDate
//scboLengthOfStay	


function yesnoix()
{
	var selectedItem = document.ixhome.dbProperty.selectedIndex;
	var selectedValue = document.ixhome.dbProperty.options[selectedItem].value;
	document.ixhome.submit.disabled=null;
	document.ixhome.submit.value=" Show ";
	if (selectedValue == "0")
		{
			document.ixhome.submit.disabled="True";
			document.ixhome.submit.value="Choose";
		}
}
//asfdasdfasdfasdfasdfname="scboLengthOfStay" 

function ttt()
	{
		document.forms('Form1').TextBox1.disabled = false;
		alert('Please enterrrrr a name that is 8 characters or less');
	}

function SetArrivalDateStateB()
	{
	
		document.forms('Form1').scboLengthOfStay.disabled = false;
		//document.bgColor="aqua";
		
		alert('Please enterrrrr a name that is 8 characters or less');
		//document.forms('Form1').fooo.disabled = true;
		//document.Form1.scboLengthOfStaySelector.disabled = false;
		alert('Please enterrrrr a name that is 8 characters or less');
		//document.forms("Form1").scboLengthOfStaySelector.disabled = false;
		//alert('Please enterrrrr a name that is 8 characters or less');
		
	}
	

	//<SCRIPT>document.forms('Form1').TextBox1.disabled = true;</SCRIPT>"
	
	*/
	//This function Creates form element ,adds hiden element with name elementName with value and post the form
	//This function is added in integratedlogin to post the form with encrypyed key
/*function PostIntegratedLoginData(Target, ElementName, Value)
{
    var frm = document.createElement('form');
    var hidden = document.createElement('input');
    hidden.name = ElementName;
    hidden.type='hidden';
    hidden.value = Value;
    frm.action = Target;
    frm.method = 'post';
    frm.appendChild(hidden);
    document.body.appendChild(frm);
    frm.submit();
}*/