	var saleRange=new Array(new Array("Below 2 Lacs","0~200000"),
								new Array("Between 2 Lacs and 5 Lacs","200000~500000"),
								new Array("Between 5 Lacs and 10 Lacs","500000~1000000"),
								new Array("Between 10 Lacs and 15 Lacs","1000000~1500000"),
								new Array("Between 15 Lacs and 20 Lacs","1500000~2000000"),
								new Array("Between 20 Lacs and 30 Lacs","2000000~3000000"),
								new Array("Between 30 Lacs and 50 Lacs","3000000~5000000"),
								new Array("Between 50 Lacs and 75 Lacs","5000000~7500000"),
								new Array("Between 75 Lacs and 1 Crore","7500000~10000000"),
								new Array("Between 1 Crore and 1.5 Crore","10000000~15000000"),
								new Array("Between 1.5 Crore and 2.5 Crore","15000000~25000000"),
								new Array("Between 2.5 Crore and 3.5 Crore","25000000~35000000"),
								new Array("Between 3.5 Crore and 5 Crore","35000000~50000000"),
								new Array("Between 5 Crore and 10 Crore","50000000~100000000"),
								new Array("Between 10 Crore and 20 Crore","100000000~200000000"),
								new Array("20 Crore and above","200000000~0"));
	var leaseRange=new Array(new Array("Below 2 Thousand","0~2000"),
								new Array("2,001 - 4,000","2001~4000"),
								new Array("4,001 - 6,000","4001~6000"),
								new Array("6,001 - 8,000","6001~8000"),
								new Array("8,001 - 10,000","8001~10000"),
								new Array("10,001 - 15,000","10001~15000"),
								new Array("15,001 - 25,000","15001~25000"),
								new Array("25,001 - 35,000","25001~35000"),
								new Array("35,001 - 50,000","35001~50000"),
								new Array("50,001 - 75,000","50001~75000"),
								new Array("75,001 - 1,00,000","75001~100000"),
								new Array("1,00,001 - 1,50,000","100001~150000"),
								new Array("1,50,001 - 2,00,000","150001~200000"),
								new Array("2,00,001 - 2,50,000","200001~250000"),
								new Array("2,50,001 - 3,00,000","250001~300000"),
								new Array("3 Lacs and Above","300001~0"));
	var rangeArray=new Array();
	rangeArray["sale"]=saleRange;
	rangeArray["lease"]=leaseRange;

	var index=1;
	function clearList(dropdown)
	{
		if(dropdown != null)
		{
			for(var x=dropdown.options.length-1;x>=0;x--)
			{
				if(dropdown.options[x] != null)
				{
					dropdown.options[x]=null;
				}
			}
			dropdown.options[0]=new Option("--Select Range--","");
			index=1;
		}
		
	}

	function populateList(dropdown,type)
	{
		if(rangeArray != null)
		{
			var arr=rangeArray[type];
			if(arr != null)
			{
				for(i=0;i<arr.length;i++)
				{
					var arr1=arr[i];
					if(arr1 != null)
					{
						dropdown.options[index]=new Option(arr1[0],arr1[1]);
						index++;
					}
				}
			}
		}
	}

	function doDisp(dropdown,tbox)
	{
		if(dropdown != null)
		{
			if(tbox != null)
			{
				tbox.value=dropdown.options[dropdown.selectedIndex].value;
			}
		}
	}

	function doCheckbox(frm,checkBoxFieldName,dropdown)
	{
		clearList(dropdown);
		var arrayIndex=-1;
		var checkCount=0;
		var ckeckBoxInd=0;
		if(frm != null)
		{
			var finishedCheckboxes=false;
			while(!finishedCheckboxes)
			{
				checkBoxObj = eval(frm.name+"."+checkBoxFieldName+ckeckBoxInd);
				if(checkBoxObj != null)
				{
					if(checkBoxObj.checked)
					{
						arrayIndex=ckeckBoxInd;
						checkCount++;
					}
				}
				else
				{
					finishedCheckboxes=true;
				}
				ckeckBoxInd++;
			}

			if(checkCount == 1)
			{
				checkBoxObj = eval(frm.name+"."+checkBoxFieldName+arrayIndex);
				populateList(dropdown,checkBoxObj.value);
			}

		}
	}

	function validate(frm)
	{
		if(frm == null)
		{
			return false;
		}
		else
		{
			if(frm.propertyType.value == null || frm.propertyType.value == "")
			{
				alert("Type of Property is Required");
				frm.propertyType.focus();
				return false;
			}
			else
			{
				frm.propertyName.value=frm.propertyType.options[frm.propertyType.selectedIndex].text;
				return true;
			}
		}
		return false;
	}