function disable()
{
LenVal=0
if(document.frm.proptype[2].checked==0)
{
document.frm.bedrooms.disabled=false
document.frm.sqfoot1.disabled=true
document.frm.sqfoot2.disabled=true
document.frm.unit.disabled=true
document.frm.propstatus.disabled=false
document.frm.status.disabled=false
}
else
{
document.frm.bedrooms.disabled=true
document.frm.sqfoot1.disabled=false
document.frm.sqfoot2.disabled=false
document.frm.unit.disabled=false
document.frm.propstatus.disabled=true
document.frm.status.disabled=true
}
}

function validate()
{
TypeLen=document.frm.proptype.length
	for(i=1;i<TypeLen;i++)
	{
		if(document.frm.proptype.options[i].selected==1) LenVal=LenVal+1
	}

	alert(LenVal)

	if(document.frm.proptype.value=="")
	{
		alert("Please specify the property type")
		document.frm.proptype.focus()
		return false
	}
a=document.frm.sqfoot.value
b=a.length
for(i=0;i<b;i++)
{
	if(a.charAt(i)>="0" && a.charAt(i)<="9")
	{}
	else
	{
		alert("Please enter numeric values")
		document.frm.sqfoot.focus()
		document.frm.sqfoot.select()
		return false
	}
}
c=document.frm.bedrooms.value
d=c.length
e=document.frm.budget.value
f=e.length
for(i=0;i<f;i++)
{
	if((e.charAt(i)>="0" && e.charAt(i)<="9") && e!="")
	{}
	else
	{
		alert("Please enter numeric values")
		document.frm.budget.focus()
		document.frm.budget.select()
		return false
	}
}
}

function leasechg()
{
	with(document.frm.leaseval)
	{
		if(document.frm.propfor.options[1].selected)
		{
			var optionName = new Option("Sq.Ft","Sq.Ft")
			options[1]= optionName
			var optionName = new Option("Sq.Mt","Sq.Mt")
			options[2]= optionName
			var optionName = new Option("Sq.Yd","Sq.Yd")
			options[3]= optionName
			var optionName = new Option("Acre","Acre")
			options[4]= optionName
			var optionName = new Option("Total","total")
			options[5]= optionName
		}

		if(document.frm.propfor.options[2].selected)
		{
			var optionName = new Option("Month","month")
			options[1]= optionName
			var optionName = new Option("Year","year")
			options[2]= optionName
			options[3]= null
			options[3]= null
			options[3]= null
		}
	}
}
