	var PropertyType="";
	var listingType = "single";
	var contactdetails = new Array();
	ip.pageFrom="createlisting";
	var tempContact = {
		name:"",email : "",areacode : "",landline : "",mobilenumber : "",
		nameUpdated : false, emailUpdated : false, areacodeUpdated : false, landlineUpdated : false , mobilenumberUpdated: false
	};
	var ipFields = new Array("newstrname","strusername","strpassword","con_password","newstremail",
										"newintstdcode","newstrphone","newstrmobile",
					"property","category","country","state","city","locality","locality_others",
					"streetadd1","streetadd2","title","roomswanted","propertyage",
					"propertyownership","area","plotarea","plotmeasure","occupants","bedrooms",
					"rentpricevalue","depositpricevalue","sellrent_price",
					"builtuparea1","builtuparea2","builtuparea3","builtuparea4","builtuparea5","builtuparea6","builtuparea7","builtuparea8","builtuparea9","builtuparea10",
					"plotarea1","plotarea2","plotarea3","plotarea4","plotarea5","plotarea6","plotarea7","plotarea8","plotarea9","plotarea10",
					"bedrooms1","bedrooms2","bedrooms3","bedrooms4","bedrooms5","bedrooms6","bedrooms7","bedrooms8","bedrooms9","bedrooms10",
					"parking1","parking2","parking3","parking4","parking5","parking6","parking7","parking8","parking9","parking10",
					"rate1","rate2","rate3","rate4","rate5","rate6","rate7","rate8","rate9","rate10",
					"propertyfloor1","propertyfloor2","propertyfloor3","propertyfloor4","propertyfloor5","propertyfloor6","propertyfloor7","propertyfloor8","propertyfloor9","propertyfloor10",
					"name","areacode","landline","mobilenumber","besttime","email","totalfloors",
					"propertyfloors","retailfrontagearea","noofshops","bathrooms","numberofcars",
					"nobikeparking","flooring","occupants","lifts","rentincome",
					"annualdue","electricity","watersupply","fencing","appoarchroad",
					"landmark","landmarknearby","schoolsnearby","hospitalnearby","airportnearby","railwaynearby","railwaystationdistance",
					"description","agree"
	);
	var temp={
		ObjPropTypeValue : null,
		ObjPropTypeInnerHTML : null
	};
	var multiple={ 		row1:false, 		row2:false, 		row3:false, 		row4:false, 		row5:false, 		row6:false, 		row7:false, 		row8:false, 		row9:false, 		row10:false 	};
	var newstrname = { 		blank:"Please enter your name", 		Focus	:"Please enter your name", 		min3:"Min. 3 characters. Numbers and Special Characters not allowed", 		special:"Invalid format. Numbers and Special Characters not allowed" 	};
	var strusername = { 		blank:"Please enter a username", 		Focus:"Please enter a Username of min. 6 characters.", 		min6:"Min. 6 characters. Please use only alphabets, numerals and underscore '_'.", 		special:"Username should not have any Spaces or Special Characters not allowed", 		useravailability:"username not available", 		useravailability_yes:"username available" 	};
	var strpassword = { 		blank:"Please enter a password", 		Focus:"Please enter a Password of min. 6 characters.", 		min6:"Password should be of min 6 characters", 		special:"Min. 6 characters. Spaces and Special Characters not allowed" 	};
	var con_password = { 		blank:"Re-type the password", 		Focus:"Re-type the password", 		min6:"Password should be of min 6 characters", 		special:"Min. 6 characters.  Please do not use spaces", 		notmatch:"Passwords do not match", 		usernamematch:"Username and password should not be the same" 	};
	var newstremail = { 		blank:"Please enter a valid email id", 		Focus:"Please enter a valid email id", 		invalid:"Invalid format", 		special:"Enter valid email id to receive email enquiries" 	};
	var newintstdcode = { 		invalid:"Please enter a valid Area code. Code shoud be of min 2 characters", 		blank:"Please enter your Area code", 		Focus:"Please enter your Area code" 	};
	var newstrphone = { 		stdAvail:"Please provide landline no", 		invalid:"Please enter a valid phone number", 		Focus:"Please enter a valid phone number", 		min6:"Landline should be of min 6 characters", 		blank:"Mandatory to enter either a landline or mobile no." 	};
	var newstrmobile = { 		invalid:"Your mobile no should be numeric of min 10 digits.", 		blank:"Mandatory to enter either a landline or mobile no.", 		Focus:"Please enter your Mobile Number. Do not prefix +" 	}; 		var rate={ 		focus:"Please enter property price amount", 		blank:"Please enter property price amount", 		min6:"Are you sure you have entered the total price of property?", 		invalid:"Please enter valid property price amount" 	};
	var avilable={ 		focus:"Please select type of Accommodation", 		blank:"Please select type of Accommodation" 	};
	var property={ 		blank:"Please select a property category", 		focus:"Please select a property category" 	};
	var category={ 		blank:"Please select a property type", 		focus:"Please select a property type" 	};
	var country={ 		blank:"Please select a Country", 		focus:"Please select a Country" 	};
	var state={ 		blank:"Please select a State", 		focus:"Please select a State" 	};
	var city={ 		blank:"Please select a City", 		focus:"Please select a City" 	};
	var locality={ 		blank:"Please select a Locality", 		focus:"Please select a Locality" 	};
	var locality_others={ 		focus:"Please enter a locality", 		blank:"Please enter a locality", 		invalid:"Please avoid use of special characters", 		min2:"Locality should be minimum of 2 character" 	};
	var streetadd1={ 		blank:"Please enter the property address", 		focus:"Please enter the property address", 		invalid:"Please avoid use of Special characters" 	};
	var streetadd2={ 		blank:"Please enter the property address", 		focus:"Please enter the property address", 		invalid:"Please avoid use of Special characters" 	};
	var title={ 		blank:"Please enter a Title for your property listing", 		focus:"Please enter a Title for your property listing", 		invalid:"Please avoid use of Special characters" 	};
	var roomswanted={ 		blank:"Please select no. of Paying Guests/Roommates", 		focus:"Please select no. of Paying Guests/Roommates" 	};
	var gender={ 		blank:"Please select the gender of paying guests and roommates required", 		focus:"Please select the gender of paying guests and roommates required" 	};
	var occupantsgender={ 		blank:"Please select the gender of occupants", 		focus:"Please select the gender of occupants" 	};
	var additionalfeatures={ 		blank:"Please select additional rooms", 		focus:"Please select additional rooms" 	};
	var monthlyrent={ 		blank:"Please select your monthly rent per person", 		focus:"Please select your monthly rent per person" 	};
	var deposittype={ 		blank:"Please select your deposit details", 		focus:"Please select your deposit details" 	};
	var stayperiod={ 		blank:"Please select your duration of stay", 		focus:"Please select your duration of stay", 		invalid:"Please select year & month of your duration stay" 	};
	var propertyage={ 		blank:"Please select age of property", 		focus:"Please select age of property" 	};
	var propertyownership={ 		blank:"Please select property ownership", 		focus:"Please select property ownership" 	};
	var area={ 		blank:"Please enter Built up area", 		focus:"Please enter Built up area in Numerals", 		invalid:"Please enter valid Built up area", 		min3:"Built up area should be minimum of 3 digits" 	};
	var areameasure={ 		blank:"Please select Built up area measurement", 		focus:"Please select Built up area measurement" 	};
	var plotarea={ 		blank:"Please enter Plot area", 		focus:"Please enter Plot area in Numerals", 		invalid:"Invalid Format. Plot area must be Numeric", 		min3:"Plotarea should be minimum of 3 digits" 	};
	var plotmeasure={ 		blank:"Please select Plot area measurement", 		focus:"Please select Plot area measurement" 	};
	var bedrooms={ 		blank:"Please select total number of bedrooms", 		focus:"Please select total number of bedrooms" 	};
	var sellingprice={ 		blank:"Please select property price", 		focus:"Please select property price", 		invalid:"Please select the price" 	};
	var rentprice={ 		blank:"Please select rent price", 		focus:"Please select rent price" 	};
	var rentpricevalue={ 		focus:"Please enter monthly rent amount", 		blank:"Please enter monthly rent amount", 		invalid:"Invalid Format. Please use only numerals" 	};
	var depositprice={ 		blank:"Please select deposit price", 		focus:"Please select deposit price" 	};
	var depositpricevalue={ 		focus:"Please enter deposit amount", 		blank:"Please enter deposit amount", 		invalid:"Invalid Format. Please use only numerals" 	};
	var rentperiod={ 		blank:"Please select rent period", 		focus:"Please select rent period", 		invalid:"Please select the year & month of rent period" 	};
	var possesion={ 		blank:"Please select property availability", 		focus:"Please select property availability", 		invalid:"Please select the month & year of property availability", 		priordate:"Selected date is invalid or may be prior date" 	};
	var name={ 		blank:"Please enter Contact person's name", 		focus:"Please enter Contact person's name", 		invalid:"Name must be of min 3 characters & avoid use of Special characters", 		min3:"Contact person's name should be min 3 characters" 	};
	var areacode={ 		invalid:"Please enter a valid Area code. Code should be of min 2 characters", 		blank:"Please enter your Area code", 		focus:"Please enter your Area code" 	};
	var landline={ 		stdAvail:"Please provide landline no", 		invalid:"Please enter a valid phone number", 		focus:"Please enter a valid phone number", 		min6:"Landline should be of min 6 characters", 		blank:"Mandatory to enter either a landline or mobile no." 	};
	var mobilenumber={ 		min10:"Your mobile no should be numeric of min 10 digits.", 		invalid:"Please enter a valid mobile number", 		blank:"Mandatory to enter either a landline or mobile no.", 		focus:"Please enter your Mobile Number. Do not prefix +" 	};
	var besttime={ 		blank:"Please enter a preferred time of contact", 		focus:"Please enter a preferred time of contact", 		invalid:"Please avoid use of Special characters" 	};
	var email={ 		blank:"Please enter a valid email id", 		focus:"Please enter a valid email id", 		invalid:"Invalid format", 		special:"Enter valid email id to receive email enquiries" 	};
	var contactby={ 		blank:"Please select contacted by", 		focus:"Please select contacted by" 	};
	var totalfloors={ 		blank:"Please select total no. of floors", 		focus:"Please select total no. of floors" 	};
	var propertyfloors={ 		blank:"Please select floor on which property is located", 		focus:"Please select floor on which property is located", 		invalid:"Total no. of floors should be greater than floor on which property is located", 		invalid_multiple:"Property on floor should be less than the Total no. of floors" 	};
	var restrooms={ 		blank:"Please select no. of restrooms", 		focus:"Please select no. of restrooms" 	};
	var retailfrontagearea={ 		blank:"Please enter frontage width", 		focus:"Please enter frontage width", 		invalid:"Invalid Format. Please use only numerals" 	};
	var noofshops={ 		blank:"Please enter no. of shops in the complex", 		focus:"Please enter no. of shops in the complex", 		invalid:"Invalid Format. Please use only numerals" 	};
	var bathrooms={ 		blank:"Please select no. of bathrooms", 		focus:"Please select no. of bathrooms" 	};
	var flooring={ 		blank:"Please select Flooring type", 		focus:"Please select Flooring type" 	};
	var occupants={ 		blank:"Please enter no. of seats", 		focus:"Please enter no. of seats", 		invalid:"Invalid Format. Please use only numerals" 	};
	var acc_occupants={ 		blank:"Please select no. of current occupants", 		focus:"Please select no. of current occupants" 	};
	var numberofcars={ 		blank:"Please enter parking alotted to property", 		focus:"Please enter parking alotted to property", 		invalid:"Invalid Format. Please use only numerals" 	};
	var nobikeparking={ 		blank:"Please enter parking alotted to property", 		focus:"Please enter parking alotted to property", 		invalid:"Invalid Format. Please use only numerals" 	};
	var lifts={ 		blank:"Please select no. of lifts", 		focus:"Please select no. of lifts" 	};
	var rentincome={ 		blank:"Please enter rental income if applicable", 		focus:"Please enter rental income if applicable", 		invalid:"Invalid Format. Please use only numerals" 	};
	var annualdue={ 		blank:"Please enter annual dues if applicable", 		focus:"Please enter annual dues if applicable", 		invalid:"Invalid Format. Please use only numerals" 	};
	var electricity ={ 		blank:"Please select the electricity type", 		focus:"Please select the electricity type" 	};
	var watersupply ={ 		blank:"Please select the water supply type", 		focus:"Please select the water supply type" 	};
	var fencing ={ 		blank:"Please select fencing", 		focus:"Please select fencing" 	};
	var appoarchroad ={ 		blank:"Please select approach road", 		focus:"Please select approach road" 	};
	var landmark={ 		blank:"Please enter a nearby landmark", 		focus:"Please enter a nearby landmark", 		invalid:"Please avoid use of Special characters" 	};
	var schoolsnearby={ 		blank:"Please enter names of closest schools", 		focus:"Please enter names of closest schools", 		invalid:"Please avoid use of Special characters" 	};
	var hospitalnearby={ 		blank:"Please enter names of closest hospitals", 		focus:"Please enter names of closest hospitals", 		invalid:"Please avoid use of Special characters" 	};
	var airportnearby={ 		blank:"Please enter distance from airport", 		focus:"Please enter distance from airport", 		invalid:"Invalid Format. Please use only numerals" 	};
	var railwaynearby={ 		blank:"Please enter distance from nearest railway station", 		focus:"Please enter distance from nearest railway station", 		invalid:"Invalid Format. Please use only numerals" 	};
	var description={ 		blank:"Please use this space to provide additional information about the property", 		focus:"Please use this space to provide additional information about the property", 		invalid:"Please avoid use of Special characters <>", 		max1000:"Maximum limit for description is 1000 characters" 	};
	var agree= { 		blank:"Please accept the terms and condition" 	};

	function unitDetails_onChange(row){
		frm = d.ListingForm;
		var curRow = d.getElementById("ud_Row"+row);
		var ud_builtuparea = frm.elements["builtuparea"+row];
		var ud_plotarea = (listingType=="multiple" && frm.category.options[frm.category.selectedIndex].value=="bungalow_individualhouse") ? frm.elements["plotarea"+row] : frm.elements["builtuparea"+row];
		var ud_bedrooms = frm.elements["bedrooms"+row];
		var ud_parking = frm.elements["parking"+row];
		var ud_rate = frm.elements["rate"+row];
		var ud_rate_contact = frm.elements["sellingprice"+row];
		var ud_propertyfloor = frm.elements["propertyfloor"+row];

		if(IsEmptyNew(ud_builtuparea,"text") && IsEmptyNew(ud_plotarea,"text") && IsEmptyNew(ud_bedrooms,"select") &&
			IsEmptyNew(ud_parking,"select") && IsEmptyNew(ud_rate,"text") && IsEmptyNew(ud_rate_contact,"radio") &&
			(IsEmptyNew(ud_propertyfloor,"select") || listingType=="multiple") && parseInt(row)>1){
			eval("multiple.row"+row+" = true;");
			/*ip.print(row + " Row is ALL EMPTY & TRUE" );*/
			return;
		}
		if(!IsEmptyNew(ud_builtuparea,"text") && !IsEmptyNew(ud_plotarea,"text") && !IsEmptyNew(ud_bedrooms,"select") &&
			( !IsEmptyNew(ud_rate,"text") || !IsEmptyNew(ud_rate_contact,"radio") ) &&
			!IsEmptyNew(ud_propertyfloor,"select") ){
			eval("multiple.row"+row+" = true;");
			/*ip.print(row + " Row is ALL FILLED & TRUE" );*/
			if(parseInt(row)<10) enable_udRow(parseInt(row)+1);
		}else{
			/*ip.print(row + " Row is NOT COMPLETED & FALSE" );*/
			eval("multiple.row"+row+" = false;");
			return;
		}
	}
	function enable_udRow(row){
		frm = d.ListingForm;
		var curRow = d.getElementById("ud_Row"+row);
		curRow.className = "enableRow";
		var elemsArr = new Array();
		elemsArr[elemsArr.length] = frm.elements["builtuparea"+row];
		elemsArr[elemsArr.length] = (listingType=="multiple" && frm.category.options[frm.category.selectedIndex].value=="bungalow_individualhouse") ? frm.elements["plotarea"+row] : frm.elements["builtuparea"+row];
		elemsArr[elemsArr.length] = frm.elements["bedrooms"+row];
		elemsArr[elemsArr.length] = frm.elements["parking"+row];
		elemsArr[elemsArr.length] = frm.elements["rate"+row];
		elemsArr[elemsArr.length] = frm.elements["propertyfloor"+row];
		elemsArr[elemsArr.length] = frm.elements["sellingprice"+row];
		elemsArr[elemsArr.length] = frm.elements["units"+row];
		elemsArr[elemsArr.length] = frm.elements["bathrooms"+row];
		for (var i=0; i<elemsArr.length; i++) {elemsArr[i].disabled = false}
		eval("multiple.row"+row+" = true;");
	}
	function getMaxProperty(){
		try{
			var e=null;
			var Max=0;
			for (var i=1; i<=10; i++){
				e = d.getElementById("propertyfloor"+i);
				if(!e.disabled){
					if(Max < parseInt(e.options[e.selectedIndex].value)) Max = (parseInt(e.options[e.selectedIndex].value)==100) ? 1 : parseInt(e.options[e.selectedIndex].value);
				}
			}
		}catch(e){traceError(e,"getMaxProp");}
		return parseInt(Max) - 1;
	}
	function listingType_onChange(Obj){
		d.getElementById('Div_property').style.display='none';
		d.getElementById('Div_category').style.display='none';
		d.getElementById('Div_listingtype').style.display='none';
		listingType = Obj.value;
		ObjProperty  = d.ListingForm.property;
		if(Obj.value=="multiple"){
			ip.populateCatType(d.ListingForm.transaction,d.ListingForm,d.ListingForm.property,d.ListingForm.category,1,0,null,null,"listing"); /* Generate Property Category for multiple listing*/
			ObjProperty.selectedIndex = 1;
			ip.populateCatType(d.ListingForm.transaction,d.ListingForm,d.ListingForm.property,d.ListingForm.category,0,1,null,null,"listing"); /* Generate Property type based on PRoperty category for multiple listing*/
			d.ListingForm.category.selectedIndex = 0;
			ShowPropertyDetails(d.ListingForm.category);
			ObjProperty.disabled = true;
		}else{
			d.getElementById("PropertyDetails").style.display="none";
			ip.populateCatType(d.ListingForm.transaction,d.ListingForm,d.ListingForm.property,d.ListingForm.category,1); /* Generate Property Category */
			ip.populateCatType(d.ListingForm.transaction,d.ListingForm,d.ListingForm.property,d.ListingForm.category,0,1); /* Generate Property Type */
			ObjProperty.disabled = false;
			d.ListingForm.category.disabled = false;
			ShowPropertyDetails(d.ListingForm.category);
		}
	}
	function PropertyPrice_onChange(Obj,frm){
		d.getElementById("Div_sellingprice").style.display="none";
		var status = (Obj.value==0) ? 1 : 0;
		frm.sellingpricecrores.disabled=status;
		frm.sellingpricecrores.selectedIndex=0;
		frm.sellingpricelakhs.disabled=status;
		frm.sellingpricelakhs.selectedIndex=0;
		frm.sellingpricethousands.disabled=status;
		frm.sellingpricethousands.selectedIndex=0;

		/*frm.sellingpricecrores1.disabled=status;
		frm.sellingpricecrores1.selectedIndex=0;
		frm.sellingpricelakhs1.disabled=status;
		frm.sellingpricelakhs1.selectedIndex=0;
		frm.sellingpricethousands1.disabled=status;
		frm.sellingpricethousands1.selectedIndex=0;*/
	}
	function PropertyAvail_onChange(Obj,frm){
		d.getElementById("Div_possesion").style.display="none";
		var status = (Obj.value==0) ? 1 : 0;
		frm.possesionmonth.disabled=status;
		frm.possesionmonth.selectedIndex=0;
		frm.possesionyear.disabled=status;
		frm.possesionyear.selectedIndex=0;
	}
	function rent_pm_onChange(Obj){
		d.getElementById("Div_rentprice").style.display="none";
		d.getElementById("Div_rentpricevalue").style.display="none";
		d.ListingForm.rentpricevalue.disabled = (Obj.value=="0") ? true : false;
		d.ListingForm.rentpricevalue.value="";
		try{d.ListingForm.rentpricevalue.focus();}catch(e){traceError(e,"rent change");}
	}
	function deposit_pm_onChange(Obj){
		d.getElementById("Div_depositprice").style.display="none";
		d.getElementById("Div_depositpricevalue").style.display="none";
		d.ListingForm.depositpricevalue.disabled = (Obj.value=="0") ? true : false;
		d.ListingForm.depositpricevalue.value="";
		try{d.ListingForm.depositpricevalue.focus();}catch(e){traceError(e,"deposit change");}
	}
	function period_pm_onChange(Obj){
		d.getElementById("Div_rentperiod").style.display="none";
		d.ListingForm.rentmonth.disabled = (Obj.value=="0") ? 1 : 0 ;
		d.ListingForm.rentyear.disabled = (Obj.value=="0") ? 1 : 0;
		d.ListingForm.rentmonth.selectedIndex =0;
		d.ListingForm.rentyear.selectedIndex =0;
		try{if(Obj.value==0){d.ListingForm.rentyear.focus();}}catch(e){traceError(e,"period change");}
	}
	function monthlyRent_onChange(frm,Obj){
		d.getElementById("Div_monthlyrent").style.display="none";
		d.getElementById("Div_rentpricevalue").style.display="none";
		var status = (Obj.value==0) ? 1 : 0;
		frm.rentpricevalue.disabled=status;
		frm.rentpricevalue.value="";
		try{if(status==0){frm.rentpricevalue.focus();}}catch(e){traceError(e,"monthly rent change");}
	}
	function deposit_onChange(frm,Obj){
		d.getElementById("Div_deposittype").style.display="none";
		d.getElementById("Div_depositpricevalue").style.display="none";
		var status = (Obj.value==0) ? 1 : 0;
		frm.depositpricevalue.disabled=status;
		frm.depositpricevalue.value="";
		try{if(status==0){frm.depositpricevalue.focus();}}catch(e){traceError(e,"deposit");}
	}
	function stayPeriod_onChange(frm,Obj){
		d.getElementById("Div_stayperiod").style.display="none";
		frm.stayyear.disabled=(Obj.value==0) ? 1 : 0;
		frm.staymonth.disabled=(Obj.value==0) ? 1 : 0;
		frm.stayyear.selectedIndex = 0;
		frm.staymonth.selectedIndex = 0;
		try{if(Obj.value==0){frm.stayyear.focus();}}catch(e){traceError(e,"stayperiod");}
	}
	function meals_onChange(frm,Obj){
		if(Obj.value=="no"){
			d.getElementById("Breakfast").checked=false;
			d.getElementById("Lunch").checked=false;
			d.getElementById("Dinner").checked=false;
		}else{
			d.getElementById("meals_y").checked=true;
		}
	}
	function enable_default(){
		frm = d.ListingForm;
		for (i=0;i<frm.elements.length;i++){
			/*if(frm.elements[i].id=="Kitchen"){frm.Kitchen.checked=true;}*/
			if(frm.elements[i].id=="contactbyall"){frm.contactbyall.checked=true}
			if(frm.elements[i].name=="retaillevel"){frm.retaillevel[0].checked=true}
		}
	}
	function disable_default(Arr){
		frm = d.ListingForm;
		for (i=0;i<Arr.length;i++){
			try{frm.elements[Arr[i]].disabled=true;}catch(e){ip.traceErr(e,"disable_default","quicklistingforms.js" + Arr[i],1);}
		}
	}
	function age_property(Obj){
		var status = (Obj.value=="1") ? 0 : 1;
		try{
			d.getElementById("Used_Built").disabled=status;
			d.getElementById("Used_Built").checked=false;
		}catch(e){traceError(e,"age property");}
	}
	function contactBy(frm,CurrentObj){
		d.getElementById("Div_contactby").style.display="none";
		var Status =CurrentObj.checked;
		var Obj = new Array();
		Obj[0] = d.getElementById("contactbyagent");
		Obj[1] = d.getElementById("contactbybuilder");
		Obj[2] = d.getElementById("contactbyindividuals");
		Obj[3] = d.getElementById("contactbyall");
		if(Obj[0].checked && Obj[1].checked && Obj[2].checked) {
			for (var i=0; i<Obj.length-1; i++) {Obj[i].checked=false;}
			Obj[3].checked=true;
		}else if(Obj[3]==CurrentObj){
			for (var i=0; i<Obj.length-1; i++) {Obj[i].checked=false;}
		}else{
			Obj[3].checked=false;
		}
	}
	function displayRatePerSqFt(frm){
		ip.Hide(d.getElementById('Div_areameasure'));
		ip.Hide(d.getElementById('Div_sellingprice'));
		ip.Hide(d.getElementById('txtDisplayRate'));
		var Crores = frm.sellingpricecrores.options[frm.sellingpricecrores.selectedIndex].value;
		var Lakhs = frm.sellingpricelakhs.options[frm.sellingpricelakhs.selectedIndex].value;
		var Thousands = frm.sellingpricethousands.options[frm.sellingpricethousands.selectedIndex].value;
		if(Crores!="Select" || Lakhs!="Select" || Thousands!="Select") try{frm.sellingprice[1].checked=true;}catch(e){traceError(e,"display rate/sq");}
		if(!frm.ratepersquare.checked) return false;
		if(frm.area) Obj = frm.area; else Obj =frm.plotarea;
		if(Obj.value==""){
			frm.ratepersquare.checked=0;
			return ip.throwErr(Obj,"Please Enter the Built Up Area / Plot Area",1,"Div_area");
		}else if(Obj.value==0){
			frm.ratepersquare.checked=0;
			return ip.throwErr(Obj,"Please Enter a valid Built Up Area / Plot Area",1,"Div_area");
		}
		if(frm.area){
			if(Obj.value!="" &&  !frm.areameasure[0].checked && !frm.areameasure[1].checked) {
				frm.ratepersquare.checked=0;
				return ip.throwErr(frm.areameasure[0],"Please Select the Built Up Area Measurement",1,"Div_areameasure");
			}
		}
		if(!frm.sellingprice[1].checked){
			frm.ratepersquare.checked=0;
			return ip.throwErr(frm.sellingprice[1],"Please Select the Price",1,"Div_sellingprice");
		}
		if(Crores=="Select" && Lakhs=="Select" && Thousands=="Select"){
			frm.ratepersquare.checked=0;
			return ip.throwErr(frm.sellingpricecrores,"Please Select the Property Price",1,"Div_sellingprice");
		}
		try{frm.sellingprice[1].checked=true;}catch(e){traceError(e,"display rate/sq");}
		var factor = new Array();
		factor[0]=1;
		factor[1]=0.1111111111111000000;
		factor[2]=0.0930000000000000000;
		factor[3]=0.0000229566300000000;
		factor[4]=0.0000092904166000000;
		factor[5]=0.00041666667000000;
		factor[6]=0.00229600000000000;
		var Divider = (frm.area) ? frm.area.value : frm.plotarea.value;
		if(frm.area) var DividerMIndex = (frm.areameasure[0].checked) ? 0 : 1; else var DividerMIndex = frm.plotareameasure.selectedIndex;
		var Converted2SqFt = Divider / factor[DividerMIndex];
		Crores = (Crores=="Select") ? 0 : Crores;
		Lakhs = (Lakhs=="Select") ? 0 : Lakhs;
		Thousands = (Thousands=="Select") ? 0 : Thousands;
		StrLakhs  = String(  (Lakhs==0) ? "00" : Lakhs );
		StrThousands  = String(  (Thousands==0) ? "00000" : Thousands);
		Rupees = String(Crores) + String(StrLakhs) + String( StrThousands );
		Rupees = parseFloat(Rupees);
		RatePerSqFt = (Rupees / Converted2SqFt);
		RatePerSqFt = Math.round(RatePerSqFt*100)/100;
		d.getElementById("txtDisplayRate").style.display="";
		d.getElementById("txtDisplayRate").innerHTML = "Rs. <span style=\"color:#006eb1;\">" + RatePerSqFt + "</span> /- per Sq Ft";
	}
	function init(){
		var n=navigator.appName;
		var ns=(n=="Netscape");
		var ie=(n=="Microsoft Internet Explorer");
		TextObjs = new Array('area','plotarea');
		RadioObjs = new Array('areameasure');
		SelectObjs = new Array('plotareameasure');
		frm = d.ListingForm;
		if ( !d.getElementById || !d.createElement || !d.getElementsByTagName ) {return false;}
		var i=0;
		for (i=0; i<TextObjs.length; i++ ){
			Obj = frm.elements[TextObjs[i]] ? 1 : 0;
			if(Obj==1){
				var RObj = frm.elements[TextObjs[i]];
				Old = RObj.getAttribute("onblur");
				RObj.removeAttribute("onblur");
				if(ie){
					if(Old){RObj.onblur=function(){ Old  + ";"+  displayRatePerSqFt(d.ListingForm);}}
					else{RObj.onblur=function(){displayRatePerSqFt(d.ListingForm);}}
				}else{
					if(Old){RObj.setAttribute("onblur", Old + "displayRatePerSqFt(d.ListingForm);");}else{RObj.setAttribute("onblur", "displayRatePerSqFt(d.ListingForm);");}
				}
				Old=null;
				Old = RObj.getAttribute("onkeyup");
				RObj.removeAttribute("onkeyup");
				if(ie){
					if(Old){RObj.onkeyup=function(){ Old  + ";"+  displayRatePerSqFt(d.ListingForm);}}
					else{RObj.onkeyup=function(){displayRatePerSqFt(d.ListingForm);}}
				}else{
					if(Old){RObj.setAttribute("onkeyup", Old + "displayRatePerSqFt(d.ListingForm);");}else{RObj.setAttribute("onkeyup", "displayRatePerSqFt(d.ListingForm);");}
				}
			}
		}
		for (i=0; i<RadioObjs.length; i++ ) {
			Obj = frm.elements[RadioObjs[i]] ? 1 : 0;
			if(Obj==1){
				var RObj = frm.elements[RadioObjs[i]];
				for(j=0;j<RObj.length;j++){
					Old = RObj[j].getAttribute("onclick");
					RObj[j].removeAttribute("onclick");
					if(ie){
						if(Old){RObj[j].onclick=function(){ Old + ";"+ displayRatePerSqFt(d.ListingForm);}}
						else{RObj[j].onclick=function(){displayRatePerSqFt(d.ListingForm);}}
					}else{
						if(Old){RObj[j].setAttribute("onclick", Old + "displayRatePerSqFt(d.ListingForm);");}else{RObj[j].setAttribute("onclick", "displayRatePerSqFt(d.ListingForm);");}
					}
				}
			}
		}
		if(PropertyType=="land"){
			for (i=0; i<SelectObjs.length; i++ ) {
				Obj = frm.elements[SelectObjs[i]] ? 1 : 0;
				if(Obj==1){
					var SObj = frm.elements[SelectObjs[i]];
					Old = SObj.getAttribute("onchange");
					SObj.removeAttribute("onchange");
					if(Old){SObj.onchange=function(){ Old  + ";"+  displayRatePerSqFt(d.ListingForm);}}
					else{SObj.onchange=function(){displayRatePerSqFt(d.ListingForm);}}
				}
			}
		}
	}
	function clearValues(frm){
		if(!frm) frm=d.ListingForm;
		if(!d.getElementById("name")) ObjName = d.getElementById("strname"); else ObjName = d.getElementById("name");
		if(!d.getElementById("areacode")) ObjAreaCode = d.getElementById("stdcode"); else ObjAreaCode = d.getElementById("areacode");
		if(!d.getElementById("email")) ObjEmail = d.getElementById("stremail"); else ObjEmail = d.getElementById("email");
		if(!d.getElementById("landline")) ObjLandLine = d.getElementById("residence"); else ObjLandLine = d.getElementById("landline");
		if(!d.getElementById("mobilenumber")) ObjMobile = d.getElementById("mobile"); else ObjMobile = d.getElementById("mobilenumber");
		if(contactdetails.length>0){
			ObjName.value = contactdetails[0];
			ObjAreaCode.value = contactdetails[1];
			ObjEmail.value = contactdetails[2];
			ObjLandLine.value = contactdetails[3];
			ObjMobile.value = contactdetails[4];
		}else{
			ObjName.value = "";
			ObjAreaCode.value = "";
			ObjEmail.value = "";
			ObjLandLine.value = "";
			ObjMobile.value= "";
		}
	}
	function restoreValues(frm,StrName,std,phone,mobile,email){
		if(!frm) frm=d.ListingForm;
		if(!d.getElementById("name")) ObjName = d.getElementById("strname"); else ObjName = d.getElementById("name");
		if(!d.getElementById("areacode")) ObjAreaCode = d.getElementById("stdcode"); else ObjAreaCode = d.getElementById("areacode");
		if(!d.getElementById("email")) ObjEmail = d.getElementById("stremail"); else ObjEmail = d.getElementById("email");
		if(!d.getElementById("landline")) ObjLandLine = d.getElementById("residence"); else ObjLandLine = d.getElementById("landline");
		if(!d.getElementById("mobilenumber")) ObjMobile = d.getElementById("mobile"); else ObjMobile = d.getElementById("mobilenumber");
		contactdetails[0] = ObjName.value;
		contactdetails[1] = ObjAreaCode.value;
		contactdetails[2] = ObjEmail.value;
		contactdetails[3] = ObjLandLine.value;
		contactdetails[4] = ObjMobile.value;
		ObjName.value = StrName;
		ObjAreaCode.value = std;
		ObjEmail.value = email;
		ObjLandLine.value = phone;
		ObjMobile.value = mobile;
	}
	function showHideFeatures(){
		try{
			HideObj = d.getElementById("featureProperty_text");
			ShowObj = d.getElementById("featureProperty");
			if(ShowObj.style.display=="none"){
				ShowObj.style.display="";
				HideObj.style.display="none";
			}
		}catch(e){traceError(e,"showhide features");}
	}
	function ShowPropertyType(Obj){
		d.getElementById("PropertyDetails").style.display="none";
		d.getElementById("PropertyDetails").innerHTML = "";
		d.ListingForm.property_hidden.value  = Obj.options[Obj.selectedIndex].value;
		ip.populateCatType(d.ListingForm.transaction,d.ListingForm,Obj,d.ListingForm.category,0,1);
		ip.print("Obj.options[Obj.selectedIndex] = " + Obj.selectedIndex);
		d.getElementById("rowPropCategory").style.display ="";
		return false;
	}
	function ShowPropertyDetails(Obj){
		var propTypeArr = [
				[ ["apartment_flats","apartment_studio","apartment_penthouse","apartment_builderfloor","apartment_condominium","apartment_servicedapartment"], "apartment" ],
				[ ["apartment_villas","apartment_beachhouse","apartment_townhouse"],"bungalow"],
				[ ["officespace_commercial"],"officespace"],
				[ ["land_land"],"land"]
		];
		Obj.disabled=true;
		var val = Obj.options[Obj.selectedIndex].value;
		for (var i=0; i<propTypeArr.length; i++) {
			var tempArr = propTypeArr[i][0];
			for (var j=0; j<tempArr.length; j++) {
				if(val.toLowerCase() == tempArr[j]){
					PropertyType = propTypeArr[i][1];
					break;
				}
			}
		}
		ip.print("PropertyType =" + PropertyType );
		//PropertyType = val.substr(0,val.indexOf("_"));
		//if(temp.ObjPropTypeValue==PropertyType && PropertyType!="apartment") return;
		temp.ObjPropTypeValue = PropertyType;
		/*var transaction = (d.ListingForm.transaction[0].checked) ? d.ListingForm.transaction[0].value : d.ListingForm.transaction[1].value;*/
		var transaction = d.ListingForm.transaction.value;
		var tempcity=d.ListingForm.city.options[d.ListingForm.city.selectedIndex].value;
		listingType = (listingType=="") ? "single" : listingType;
		if(transaction=="accommodation") return;
		if(PropertyType=="" || PropertyType==null) return;
		var url=ip.host() +"/index.php?option=ajax&page=listing_"+PropertyType+"&transaction="+transaction+"&city="+tempcity+"&property="+PropertyType+"&listingtype="+listingType+"&notemplate=yes";
		ip.print("url = " + url);
		SendRequest4Property(url,Obj);
	}
	function SendRequest4Property(url,Obj){
		d.getElementById("PropertyDetails").style.display="";
		d.getElementById("PropertyDetails").innerHTML = ip.loading("Loading Property details...");
		try{
			Obj.disabled = true;
			var xmlHTTP4propertyDetails = new getHTTPObject();
			xmlHTTP4propertyDetails.open("GET", url, true);
			xmlHTTP4propertyDetails.onreadystatechange = function(){
				if (xmlHTTP4propertyDetails.readyState == 4){
					if(d.getElementById("PropertyDetails") && xmlHTTP4propertyDetails.responseText!=0){
						d.getElementById("PropertyDetails").innerHTML =xmlHTTP4propertyDetails.responseText;
						temp.ObjPropTypeInnerHTML = xmlHTTP4propertyDetails.responseText;
						d.getElementById("PropertyDetails").style.display="";
						window.setTimeout("toolTip.createAttributes()",500);
						enable_default();
						if(d.ListingForm.transaction.value=="sale" || d.ListingForm.transaction.value=="sell"){
							if(listingType=="single"){window.setTimeout("init()",500);}
						}
						ArrE = new Array("sellingpricecrores","sellingpricelakhs","sellingpricethousands","sellingpricecrores1","sellingpricelakhs1","sellingpricethousands1","rentpricevalue","depositpricevalue","rentyear","rentmonth","possesionmonth","possesionyear","stayyear","staymonth");
						disable_default(ArrE);
						ip.print( " d.ListingForm.property.selectedIndex = " + d.ListingForm.property.selectedIndex);
						Obj.disabled = false;
						 transferContactDetails();
					}else d.getElementById("PropertyDetails").style.display="none";
				}
			};
			xmlHTTP4propertyDetails.send(null);
		}catch(e){Obj.disabled = false;traceError(e,"send req 4 prop");}
	}
	function SendRequest4Features(url){
		try{
			var xmlHTTP4featureDetails = new getHTTPObject();
			xmlHTTP4featureDetails.open("GET", url, true);
			xmlHTTP4featureDetails.onreadystatechange = handleReq4Features;
			xmlHTTP4featureDetails.send(null);
		}catch(e){traceError(e,"send req 4 features");}
	}
	function handleReq4Features(){
		if (xmlHTTP4featureDetails.readyState == 4){
			if(d.getElementById("FeatureDetails") && xmlHTTP4featureDetails.responseText!=0){
				d.getElementById("FeatureDetails").innerHTML =xmlHTTP4featureDetails.responseText;
				d.getElementById("FeatureDetails").style.display="";
				window.setTimeout("toolTip.createAttributes()",500);
			}else d.getElementById("FeatureDetails").style.display="none";
		}
	}
	function tipShowError_OnSubmit(e){
		if(!e || e=="undefined" || e.name=="" || e.name=="undefined") return false;
		try{
			toolTip.obj = e;
			toolTip.DivObj = (d.getElementById("Div_"+e.name)) ? d.getElementById("Div_"+e.name) : new Object;
		}catch(e){ip.traceErr(e,"tipShowError");return false;}
		if(toolTip.DivObj.id=="undefined") return false;
		var scrX = Number(toolTip.xCord);
		var scrY = Number(toolTip.yCord);
		var tp = parseInt(scrY+15);
		var lt = parseInt(scrX+10);
		var status = tipStatus(toolTip.obj,"message");
		if(status!=0){
			toolTip.DivObj.innerHTML = '<img src="/images/icons/redarrow.gif" hspace="5" alt="" />' + status;
			toolTip.DivObj.style.display="";
			toolTip.DivObj.style.opacity = '.1';
			toolTip.DivFade(10);
			return false;
		}else{
			toolTip.DivObj.innerHTML = "";
			toolTip.DivObj.style.display="none";
			return true;
		}
	}
	function tipStatus(e,Statustype){
		var StrObj = e.name;
		var userStatus = d.getElementById("NewUserTable").style.display;
		if(!Statustype) Statustype="tooltip";
		switch (StrObj) {
			/* Login Validtions */
			case "newstrname":
				if(userStatus=="none") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? newstrname.Focus : newstrname.blank;
				if(IsMin(e.value,3))  return newstrname.min3;
				if(!IsValidCharacters(e.value, alphabets + ".-_ ",alphabets)) return newstrname.special;
				e.value = ip.toTitleCase(e.value);
				return 0;
			case "strusername":
				if(userStatus=="none") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? strusername.Focus : strusername.blank;
				if(IsMin(e.value,6))  return strusername.min6;
				if(!IsValidCharacters(e.value, alphabets + numbers + "'_'",alphabets)) return strusername.special;
				if(Statustype=="message"){
					url=ip.host() +"/index.php?option=ajax&page=ajax_registration&action=usercheck&uname="+e.value + "&notemplate=yes";
					SendRequest4UserName(url);
				}
				return 0;
			case "strpassword":
				if(userStatus=="none") return 0;
				if(IsEmpty(e,"text")) return  (Statustype=="tooltip") ? strpassword.Focus : strpassword.blank;
				if(IsMin(e.value,6))  return strpassword.min6;
				if(!IsValidCharacters(e.value, alphabets + numbers + "-'_'",alphabets+numbers)) return strpassword.special;
				return 0;
			case "con_password":
				if(userStatus=="none") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? con_password.Focus : con_password.blank;
				if(!IsValidCharacters(e.value, alphabets + numbers + "-'_'",alphabets+numbers)) return con_password.special;
				if(!IsMatch(d.getElementById("strpassword").value,e.value)){
					return con_password.notmatch;
				}
				if(IsMatch(d.getElementById("strusername").value,e.value)){
					return con_password.usernamematch;
				}
				return 0;
			case "newstremail":
				if(userStatus=="none") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? newstremail.Focus : newstremail.blank;
				if(!ip.IsValidEmail(e.value)) return newstremail.invalid;
				return 0;
			case "newintstdcode":
				if(userStatus=="none") return 0;
				if(d.getElementById("newstrmobile").value!="" && e.value=="" && d.getElementById("newstrphone").value=="") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? newintstdcode.Focus : newintstdcode.blank;
				if(!IsValidCharacters(e.value, numbers + " ,-/",numbers))  return newintstdcode.invalid;
				return 0;
			case "newstrphone":
				if(userStatus=="none") return 0;
				if(d.getElementById("newstrmobile").value!="" && e.value=="" && d.getElementById("newintstdcode").value=="") return 0;
				if(IsEmpty(e,"text")) if(d.getElementById("newstrmobile").value=="")  return  (Statustype=="tooltip") ? newstrphone.Focus : newstrphone.blank; else return newstrphone.stdAvail;
				if(IsMin(e.value,6))  return newstrphone.min6;
				if(!IsValidCharacters(e.value, numbers + " ,-/",numbers))  return newstrphone.invalid;
				if(e.value.substr(0,2)=="91" || e.value.substr(0,1)=="+")  return newstrphone.invalid;
				return 0;
			case "newstrmobile":
				if(userStatus=="none") return 0;
				if(d.getElementById("newintstdcode").value!="" && d.getElementById("newstrphone").value!="" && d.getElementById("newstrmobile").value=="") return 0;
				if(IsEmpty(e,"text")) return  (Statustype=="tooltip") ? newstrmobile.Focus : newstrmobile.blank;
				if(!IsValidCharacters(e.value, numbers,numbers))  return newstrmobile.invalid;
				if(e.value.length<10)  return newstrmobile.invalid;
				/*if(e.value.substr(0,1)!="9" || e.value.substr(0,2)=="91" || e.value.length<10)  return newstrmobile.invalid;*/
				d.getElementById("Div_newintstdcode").style.display="none";
				d.getElementById("Div_newstrphone").style.display="none";
				d.getElementById("Div_newstrmobile").style.display="none";
				return 0;
			/* End Login Validtions */
			case "property":
			case "category":
			case "country":
			case "state":
			case "city":
			case "locality":
				if(IsEmpty(e,"select")) return (Statustype=="tooltip") ? eval(StrObj + ".focus") : eval(StrObj + ".blank");
				return 0;
			case "locality_others":
				if(e.style.display!="none"){
					if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? locality_others.focus : locality_others.blank;
					if(!IsValidCharacters(e.value, alphabets + numbers + " ().",alphabets))  return locality_others.invalid;
					if(e.value.replace(/ /,"").length<=1) return locality_others.min2;
					e.value = ip.toTitleCase(e.value);
				}
				return 0;
			case "streetadd1":
			case "streetadd2":
				if(IsEmpty(e,"text")){
					if(Statustype!="message") return eval(StrObj + ".blank");
				}else{
					if(!IsValidCharacters(e.value, alphabets + numbers + ".,-_+/\)&(#[] " ,alphabets + numbers + "#"))  return eval(StrObj + ".invalid");
				}
				return 0;
			case "title":
				if(IsEmpty(e,"text")) return title.blank;
				if(!IsValidCharacters(e.value, alphabets + numbers + ".,-+/\)&(# ",alphabets + numbers))  return title.invalid;
				return 0;
			case "roomswanted":
			case "propertyage":
			case "propertyownership":
				if(IsEmpty(e,"select")) return eval(StrObj + ".blank");
				return 0;
			case "area":
				if(frm.listingtype[0].checked){
					if(IsEmpty(e,"text")) return area.blank;
					if(!IsValidCharacters(e.value, numbers , numbers))  return area.invalid;
					if(e.value.substr(0,1)=="0") return area.invalid;
				}
				return 0;
			case "plotarea":
				if(frm.listingtype[0].checked){
					if(IsEmpty(e,"text")) return plotarea.blank;
					if(!IsValidCharacters(e.value, numbers , numbers))  return plotarea.invalid;
					if(e.value.substr(0,1)=="0") return plotarea.invalid;
				}
				return 0;
			case "plotmeasure":
			case "bedrooms":
				if(frm.listingtype[0].checked){
					if(IsEmpty(e,"select")) return eval(StrObj + ".blank");
				}
				return 0;
			case "bathrooms":
				if(frm.transaction.value=="accommodation"){
					if(IsEmpty(e,"select") && Statustype!="message") return bathrooms.blank;
					return 0;
				}
			case "rentpricevalue":
				if(frm.transaction.value=="sell" || frm.transaction.value=="sale"){
					return 0;
				}else if(frm.transaction.value=="rent"){
					if(!frm.rentprice[1].checked) return 0;
				}else if(frm.transaction.value=="accommodation"){
					if(!frm.monthlyrent[1].checked) return 0;
				}
				if(IsEmpty(e,"text")) return rentpricevalue.blank;
				if(!IsValidCharacters(e.value, numbers + ".", numbers)) return rentpricevalue.invalid;
				return 0;
			case "depositpricevalue":
				if(frm.transaction.value=="sell" || frm.transaction.value=="sale"){
					return 0;
				}else if(frm.transaction.value=="rent"){
					if(!frm.depositprice[1].checked) return 0;
				}else if(frm.transaction.value=="accommodation"){
					if(!frm.deposittype[1].checked) return 0;
				}
				if(IsEmpty(e,"text")) return depositpricevalue.blank;
				if(!IsValidCharacters(e.value, numbers + ".", numbers)) return depositpricevalue.invalid;
				return 0;
			case "builtuparea1":
				if(IsEmpty(e,"text") && Statustype!="tooltip") return area.blank;
				if(!IsEmpty(e,"text") && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return area.invalid;
					if(e.value.substr(0,1)=="0") return area.invalid;
					if(IsMin(e.value,3)) return area.min3;
				}
				return 0;
			case "builtuparea2":
			case "builtuparea3":
			case "builtuparea4":
			case "builtuparea5":
			case "builtuparea6":
			case "builtuparea7":
			case "builtuparea8":
			case "builtuparea9":
				if(e.disabled)return 0;
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				selRow = eval("multiple.row" + parseInt(e.name.substr(e.name.length-1,e.name.length)));
				if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return area.blank;}
				if(!IsEmpty(e,"text")  && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return area.invalid;
					if(e.value.substr(0,1)=="0") return area.invalid;
					if(IsMin(e.value,3)) return area.min3;
				}
				return 0;
			case "builtuparea10":
				if(e.disabled)return 0;
				unitDetails_onChange(10);
				selRow = multiple.row10;
				if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return area.blank;}
				if(!IsEmpty(e,"text") && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return area.invalid;
					if(e.value.substr(0,1)=="0") return area.invalid;
					if(IsMin(e.value,3)) return area.min3;
				}
				return 0;
			case "plotarea1":
				if(IsEmpty(e,"text") && Statustype!="tooltip") return plotarea.blank;
				if(!IsEmpty(e,"text") && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return plotarea.invalid;
					if(e.value.substr(0,1)=="0") return plotarea.invalid;
					if(IsMin(e.value,3)) return plotarea.min3;
				}
				return 0;
			case "plotarea2":
			case "plotarea3":
			case "plotarea4":
			case "plotarea5":
			case "plotarea6":
			case "plotarea7":
			case "plotarea8":
			case "plotarea9":
				if(e.disabled) return 0;
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				selRow = eval("multiple.row" + parseInt(e.name.substr(e.name.length-1,e.name.length)));
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return plotarea.blank;}
				if(!IsEmpty(e,"text")  && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return plotarea.invalid;
					if(e.value.substr(0,1)=="0") return plotarea.invalid;
					if(IsMin(e.value,3)) return plotarea.min3;
				}
				return 0;
			case "plotarea10":
				if(e.disabled)return 0;
				unitDetails_onChange(10);
				selRow = multiple.row10;
				if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return plotarea.blank;}
				if(!IsEmpty(e,"text") && Statustype!="tooltip"){
					if(!IsValidCharacters(e.value, numbers , numbers))  return plotarea.invalid;
					if(e.value.substr(0,1)=="0") return plotarea.invalid;
					if(IsMin(e.value,3)) return plotarea.min3;
				}
				return 0;
			case "bedrooms1":
				if(IsEmpty(e,"select") && Statustype!="tooltip") return bedrooms.blank;
				return 0;
			case "bedrooms2":
			case "bedrooms3":
			case "bedrooms4":
			case "bedrooms5":
			case "bedrooms6":
			case "bedrooms7":
			case "bedrooms8":
			case "bedrooms9":
				if(e.disabled) return 0;
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				selRow = eval("multiple.row" + parseInt(e.name.substr(e.name.length-1,e.name.length)));
				if(IsEmpty(e,"select") && Statustype!="tooltip" && selRow==false){return bedrooms.blank;}
				return 0;
			case "bedrooms10":
				if(e.disabled) return 0;
				unitDetails_onChange(10);
				selRow = multiple.row10;
				if(IsEmpty(e,"select") && Statustype!="tooltip" && selRow==false){return bedrooms.blank;}
				return 0;
			case "rate1":
				if(!d.getElementById("sellingprice_contact1").checked){
					if(IsEmpty(e,"text") && Statustype!="tooltip") return rate.blank;
					if(!IsEmpty(e,"text") && Statustype!="tooltip"){
						if(!IsValidCharacters(e.value, numbers , numbers))  return rate.invalid;
						if(e.value.substr(0,1)=="0") return rate.invalid;
						if(IsMin(e.value,6)) return rate.min6;
					}
				}
				return 0;
			case "rate2":
			case "rate3":
			case "rate4":
			case "rate5":
			case "rate6":
			case "rate7":
			case "rate8":
			case "rate9":
				if(e.disabled) return 0;
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				selRow = eval("multiple.row" + parseInt(e.name.substr(e.name.length-1,e.name.length)));
				if(!d.getElementById("sellingprice_contact" + parseInt(e.name.substr(e.name.length-1,e.name.length))).checked){
					if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return rate.blank;}
					if(!IsEmpty(e,"text") && Statustype!="tooltip"){
						if(!IsValidCharacters(e.value, numbers + " ,.", numbers))  return rate.invalid;
						e.value = e.value.replace(/,/,"");
						if(!ip.infiniteCharInString(e.value,".")) return rate.invalid;
						if(e.value.substr(0,1)=="0") return rate.invalid;
						if(IsMin(e.value,6)) return rate.min6;
					}
				}
				return 0;
			case "rate10":
				if(e.disabled) return 0;
				unitDetails_onChange(10);
				selRow = multiple.row10;
				if(!d.getElementById("sellingprice_contact10").checked){
					if(IsEmpty(e,"text") && Statustype!="tooltip" && selRow==false){return rate.blank;}
					if(!IsEmpty(e,"text") && Statustype!="tooltip"){
						if(!IsValidCharacters(e.value, numbers , numbers))  return rate.invalid;
						if(e.value.substr(0,1)=="0") return rate.invalid;
						if(IsMin(e.value,6)) return rate.min6;
					}
				}
				return 0;
			case "propertyfloor1":
				if(IsEmpty(e,"select") && Statustype!="tooltip") return propertyfloors.blank;
				if(!IsEmpty(d.getElementById("totalfloors"),"select")){
					if(d.getElementById("totalfloors").options[d.getElementById("totalfloors").selectedIndex].value  < getMaxProperty()) return propertyfloors.invalid_multiple;
				}
				return 0;
			case "propertyfloor2":
			case "propertyfloor3":
			case "propertyfloor4":
			case "propertyfloor5":
			case "propertyfloor6":
			case "propertyfloor7":
			case "propertyfloor8":
			case "propertyfloor9":
				if(e.disabled) return 0;
				unitDetails_onChange(parseInt(e.name.substr(e.name.length-1,e.name.length)));
				selRow = eval("multiple.row" + parseInt(e.name.substr(e.name.length-1,e.name.length)));
				if(IsEmpty(e,"select") && Statustype!="tooltip" && selRow==false){return propertyfloors.blank;}
				if(!IsEmpty(d.getElementById("totalfloors"),"select")){
					if(d.getElementById("totalfloors").options[d.getElementById("totalfloors").selectedIndex].value  < getMaxProperty()) return propertyfloors.invalid_multiple;
				}
				return 0;
			case "propertyfloor10":
				if(e.disabled) return 0;
				unitDetails_onChange(10);
				selRow = multiple.row10;
				if(IsEmpty(e,"select") && Statustype!="tooltip" && selRow==false){return propertyfloors.blank;}
				if(!IsEmpty(d.getElementById("totalfloors"),"select")){
					if(d.getElementById("totalfloors").options[d.getElementById("totalfloors").selectedIndex].value  < getMaxProperty()) return propertyfloors.invalid_multiple;
				}
				return 0;
			case "name":
				if(IsEmpty(e,"text")) return name.blank;
				if(!IsValidCharacters(e.value, alphabets + "., ", alphabets)) return name.invalid;
				if(IsMin(e.value,3))  return name.min3;
				e.value = ip.toTitleCase(e.value);
				return 0;
			case "areacode":
				if(IsEmpty(e,"text") && Statustype=="tooltip") return areacode.focus;
				if(d.getElementById("mobilenumber").value!="" && e.value=="" && d.getElementById("landline").value=="") return 0;
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? areacode.focus : areacode.blank;
				if(IsMin(e.value,2))  return areacode.invalid;
				if(e.value.length>1 && e.value==0) return areacode.invalid;
				if(!IsValidCharacters(e.value, numbers + " ,-/",numbers))  return areacode.invalid;
				return 0;
			case "landline":
				if(IsEmpty(e,"text") && Statustype=="tooltip") return landline.focus;
				if(d.getElementById("mobilenumber").value!="" && e.value=="" && d.getElementById("areacode").value=="") return 0;
				if(IsEmpty(e,"text")) if(d.getElementById("mobilenumber").value=="")  return  (Statustype=="tooltip") ? landline.focus : landline.blank; else return landline.stdAvail;
				if(IsMin(e.value,6))  return landline.min6;
				if(!IsValidCharacters(e.value, numbers + " ,-/",numbers))  return landline.invalid;
				if(e.value.substr(0,2)=="91" || e.value.substr(0,1)=="+")  return landline.invalid;
				if(e.value.length>1 && e.value==0) return landline.invalid;
				d.getElementById("Div_mobilenumber").style.display="none";
				return 0;
			case "mobilenumber":
				if(IsEmpty(e,"text") && Statustype!="message") return mobilenumber.focus;
				if(d.getElementById("areacode").value!="" && d.getElementById("landline").value!="" && d.getElementById("mobilenumber").value=="") return 0;
				if(IsEmpty(e,"text")) return  (Statustype=="tooltip") ? mobilenumber.focus : mobilenumber.blank;
				if(!IsValidCharacters(e.value, numbers,numbers))  return mobilenumber.invalid;
				if(e.value.length<10)  return mobilenumber.invalid;
				if(e.value.length>1 && e.value==0) return mobilenumber.invalid;
				return 0;
			case "besttime":
				if(IsEmpty(e,"text")) return besttime.blank;
				if(!IsValidCharacters(e.value, alphabets + numbers + ".,\&/- ",alphabets + numbers))  return besttime.invalid;
				if(!ip.infiniteCharInString(e.value,"\/"))  return besttime.invalid;
				return 0;
			case "email":
				if(IsEmpty(e,"text")) return (Statustype=="tooltip") ? email.focus : email.blank;
				if(!ip.IsValidEmail(e.value)) return email.invalid;
				return 0;
			case "totalfloors":
				if(IsEmpty(e,"select") && Statustype!="message") return totalfloors.blank;
				try{
					if(frm.listingtype[0].checked){
						var Obj1 = d.getElementById('propertyfloors');
						if(!IsEmpty(e,"select") && Obj1.options[Obj1.selectedIndex].value!="101"){
							if( e.options[e.selectedIndex].value  < Obj1.options[Obj1.selectedIndex].value - 1) return propertyfloors.invalid;
						}
					}else if(frm.listingtype[1].checked){
						if(!IsEmpty(e,"select")){
							if(e.options[e.selectedIndex].value  < getMaxProperty()) return propertyfloors.invalid;
						}
					}
				}catch(e){traceError(e,"tipstatus");}
				return 0;
			case "propertyfloors":
				try{
					if(frm.listingtype[0].checked){
						if(IsEmpty(e,"select") && Statustype!="message") return propertyfloors.blank;
						var Obj1 = d.getElementById('totalfloors');
						if(!IsEmpty(e,"select") && e.options[e.selectedIndex].value!="101"){
							if(Obj1.options[Obj1.selectedIndex].value < e.options[e.selectedIndex].value -1  ) return propertyfloors.invalid;
						}
					}
				}catch(e){ip.traceErr(e,"tipStatus - propertyfloors","quicklistingforms.js");}
				return 0;
			case "bathrooms":
			case "restrooms":
				if(IsEmpty(e,"select") && Statustype!="message") return eval(StrObj + ".blank");
				return 0;
			case "retailfrontagearea":
			case "noofshops":
				if(IsEmpty(e,"text") && Statustype!="message") return eval(StrObj + ".blank");
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, numbers + ".", numbers)) return eval(StrObj + ".invalid");
				}
				return 0;
			case "flooring":
				if(IsEmpty(e,"select") && Statustype!="message") return flooring.blank;
				return 0;
			case "numberofcars":
				if(frm.transaction.value=="accommodation"){
					if(IsEmpty(e,"text") && IsEmpty(frm.nobikeparking,"text")){return numberofcars.blank;}
					if(!IsEmpty(e,"text")){if(!IsValidCharacters(e.value, numbers , numbers)){return numberofcars.invalid;}}
				}else{
					if(frm.listingtype[0].checked){
						if(IsEmpty(e,"text") && Statustype!="message") return numberofcars.blank;
						if(!IsEmpty(e,"text")){if(!IsValidCharacters(e.value, numbers , numbers)){return numberofcars.invalid;}}
					}
				}
				return 0;
			case "nobikeparking":
				if(IsEmpty(e,"text") && IsEmpty(frm.numberofcars,"text")){return nobikeparking.blank;}
				if(!IsEmpty(e,"text")){if(!IsValidCharacters(e.value, numbers , numbers)){return nobikeparking.invalid;}}
				return 0;
			case "lifts":
				if(IsEmpty(e,"select") && Statustype!="message") return lifts.blank;
				return 0;
			case "occupants":
				if(frm.transaction.value=="accommodation") return 0;
				if(IsEmpty(e,"text") && Statustype!="message") return occupants.blank;
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, numbers , numbers)) return occupants.invalid;
				}
				return 0;
			case "rentincome":
			case "annualdue":
				if(IsEmpty(e,"text") && Statustype!="message") return eval(StrObj + ".blank");
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, numbers + ".", numbers)) return eval(StrObj + ".invalid");
					if(e.value.substr(0,1)=="0") return eval(StrObj + ".invalid");
					if(!ip.infiniteCharInString(e.value,"."))  return eval(StrObj + ".invalid");
				}
				return 0;
			case "electricity":
			case "watersupply":
			case "fencing":
			case "appoarchroad":
				if(IsEmpty(e,"select") && Statustype!="message") return appoarchroad.blank;
				return 0;
			case "landmark":
			case "landmarknearby":
				if(IsEmpty(e,"text") && Statustype!="message") return landmark.blank;
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, alphabets + numbers + ".,/ \#@&()[]+_-", alphabets + numbers +"# ")) return landmark.invalid;
					if(!ip.infiniteCharInString(e.value,"/\@()[]+_-"))  return landmark.invalid;
				}
				return 0;
			case "schoolsnearby":
			case "hospitalnearby":
				if(IsEmpty(e,"text") && Statustype!="message") return eval(StrObj + ".blank");
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, alphabets + numbers + ".,/ \#@&()[]+_-", alphabets + numbers)) return eval(StrObj + ".invalid");
					if(!ip.infiniteCharInString(e.value,"/\@()[]+_-"))  return eval(StrObj + ".invalid");
				}
				return 0;
			case "airportnearby":
				if(IsEmpty(e,"text") && Statustype!="message") return airportnearby.blank;
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, numbers + ".- ", numbers)) return airportnearby.invalid;
					if(!ip.infiniteCharInString(e.value,".-"))  return airportnearby.invalid;
				}
				return 0;
			case "railwaynearby":
			case "railwaystationdistance":
				if(IsEmpty(e,"text") && Statustype!="message") return railwaynearby.blank;
				if(!IsEmpty(e,"text")){
					if(!IsValidCharacters(e.value, numbers + ".- ", numbers)) return railwaynearby.invalid;
					if(!ip.infiniteCharInString(e.value,".-"))  return railwaynearby.invalid;
				}
				return 0;
			case "description":
				if(IsEmpty(e,"textarea") && Statustype!="message") return description.blank;
				if(!IsEmpty(e,"textarea")){
					if(!IsNotFound(e.value,"<>")) return description.invalid;
					if(IsMax(e.value,1000)) return description.max1000;
				}
				return 0;
			case "agree":
				if(IsEmpty(e,"checkbox")) return agree.blank;
				return 0;
		}
		return 0;
	}
	function ValidateForm(frm){
		d.getElementById("submit_image").disabled = true;
		if(!advancedValidation(frm)){
			d.getElementById("submit_image").disabled = false;
			return false;
		}
		return true;
	}
	function advancedValidation(frm){
		try{
			if(!frm) return false;
			var ArrObjs  = ipFields;
			var temp1="",temp2="";
			var userStatus = d.getElementById("NewUserTable").style.display;
			if(userStatus!="none") if(!IsMandatory(frm.user_type, "radio",	"Please select a user type",	1,	"Div_user_type")) return false;
			if(frm.transaction.value=="accommodation"){if(!IsMandatory(frm.avilable,"radio",avilable.blank,1,"Div_avilable")) return false;}
			for(var i=0; i<ArrObjs.length; i++){
				var newObj = frm.elements[ArrObjs[i]] ? frm.elements[ArrObjs[i]] : null;
				if(newObj!=null){
					ip.print(newObj.name);
					if(!tipShowError_OnSubmit(frm.elements[ArrObjs[i]])){
						try{frm.elements[ArrObjs[i]].focus();}catch(e){traceError(e,"advanced Validate" + ArrObjs[i]);}
						return false;
					}
					switch (ArrObjs[i]){
						case "area":
							try{
								if(frm.listingtype[0].checked){
									if(!IsMandatory(frm.areameasure,"radio",areameasure.blank,1,"Div_areameasure")) return false;
								}
							}catch(e){traceError(e,"advanced Validate");}
							break;
						case "sellrent_price":
							if(frm.transaction.value=="sale" || frm.transaction.value=="sell"){
								if(frm.listingtype[0].checked){
									if(!IsMandatory(frm.sellingprice,"radio",sellingprice.blank,1,"Div_sellingprice")) return false;
									if(frm.sellingprice[1].checked){
										var Crores = frm.sellingpricecrores.options[frm.sellingpricecrores.selectedIndex].value;
										var Lakhs = frm.sellingpricelakhs.options[frm.sellingpricelakhs.selectedIndex].value;
										var Thousands = frm.sellingpricethousands.options[frm.sellingpricethousands.selectedIndex].value;
										if(Crores=="Select" && Lakhs=="Select" && Thousands=="Select") return ip.throwErr(frm.sellingpricecrores,sellingprice.invalid,1,"Div_sellingprice");

										/*var Crores1 = frm.sellingpricecrores1.options[frm.sellingpricecrores1.selectedIndex].value;
										var Lakhs1 = frm.sellingpricelakhs1.options[frm.sellingpricelakhs1.selectedIndex].value;
										var Thousands1 = frm.sellingpricethousands1.options[frm.sellingpricethousands1.selectedIndex].value;
										if(Crores1=="Select" && Lakhs1=="Select" && Thousands1=="Select") return ip.throwErr(frm.sellingpricecrores1,sellingprice.invalid,1,"Div_sellingprice");
										*/
									}
								}
							}else{
								if(!IsMandatory(frm.rentprice,"radio",rentprice.blank,1,"Div_rentprice")) return false;
								if(!IsMandatory(frm.depositprice,"radio",depositprice.blank,1,"Div_depositprice")) return false;
								if(!IsMandatory(frm.rentperiod,"radio",rentperiod.blank,1,"Div_rentperiod")) return false;
								if(frm.rentperiod[1].checked){
									temp1 = frm.rentyear.options[frm.rentyear.selectedIndex].value;
									temp2 = frm.rentmonth.options[frm.rentmonth.selectedIndex].value;
									if( (temp1=="Select" ||temp2=="Select") || (parseInt(temp1)==0 && parseInt(temp2)==0) ){
										return ip.throwErr(frm.rentyear,rentperiod.invalid,1,"Div_rentperiod");
									}
								}
							}
							if(!IsMandatory(frm.possesion,"radio",possesion.blank,1,"Div_possesion")) return false;
							if(frm.possesion[1].checked){
								temp1= frm.possesionmonth.options[frm.possesionmonth.selectedIndex].value;
								temp2= frm.possesionyear.options[frm.possesionyear.selectedIndex].value;
								if(temp1=="Select" || temp2=="Select") return ip.throwErr(frm.possesionmonth,possesion.invalid,1,"Div_possesion");
								var cYear = parseInt(d.getElementById("serveryear").value);
								var cMon = parseInt(d.getElementById("servermonth").value);
								if(cYear==parseInt(temp2) && parseInt(frm.possesionmonth.selectedIndex)<cMon){return ip.throwErr(frm.possesionmonth,possesion.priordate,1,"Div_possesion");}
							}
							/*for(var k=1; k<=10; k++){alert(eval("multiple.row"+k));}*/
							break;
						case "email":
							var ArrContactBy = new Array();
							ArrContactBy[0] = d.getElementById("contactbyagent");
							ArrContactBy[1] = d.getElementById("contactbybuilder");
							ArrContactBy[2] = d.getElementById("contactbyindividuals");
							ArrContactBy[3] = d.getElementById("contactbyall");
							if(!IsMandatory(ArrContactBy,"checkbox",contactby.blank,1,"Div_contactby")) return false;
							break;
						case "roomswanted":
							if(!IsMandatory(frm.gender,"radio",gender.blank,1,"Div_gender")) return false;
							if(!IsMandatory(frm.occupants,"select",acc_occupants.blank,1,"Div_occupants")) return false;
							if(!IsMandatory(frm.occupantsgender,"radio",occupantsgender.blank,1,"Div_occupantsgender")) return false;
							break;
						case "bedrooms":
							if(frm.transaction.value=="accommodation"){
								if(!IsMandatory(frm.bathrooms,"select",bathrooms.blank,1,"Div_bathrooms")) return false;
								var additionalfeatures_status=false;
								for(var j=1; j<5; j++) {
									additionalfeatures_status = (d.getElementById("additionalfeatures_"+j).checked) ? true : false;
									if(additionalfeatures_status) break;
								}
								if(!additionalfeatures_status) return ip.throwErr(d.getElementById("additionalfeatures_1"),additionalfeatures.blank,1,"Div_additionalfeatures");
								if(IsEmpty(frm.numberofcars,"text") && IsEmpty(frm.nobikeparking,"text")) return ip.throwErr(frm.numberofcars,numberofcars.blank,1,"Div_numberofcars");
								d.getElementById("Div_numberofcars").style.display="none";
								d.getElementById("Div_nobikeparking").style.display="none";
								if(!IsEmpty(frm.numberofcars,"text")){
									if(!IsValidCharacters(frm.numberofcars.value, numbers , numbers)){return ip.throwErr(frm.numberofcars,numberofcars.invalid,1,"Div_numberofcars");}
								}
								if(!IsEmpty(frm.nobikeparking,"text")){
									if(!IsValidCharacters(frm.nobikeparking.value, numbers , numbers)){return ip.throwErr(frm.nobikeparking,nobikeparking.invalid,1,"Div_nobikeparking");}
								}
								if(!IsMandatory(frm.monthlyrent,"radio",monthlyrent.blank,1,"Div_monthlyrent")) return false;
								if(!IsMandatory(frm.deposittype,"radio",deposittype.blank,1,"Div_deposittype")) return false;
							}
							break;
						case "depositpricevalue":
							if(frm.transaction.value=="accommodation"){
								if(!IsMandatory(frm.stayperiod,"radio",stayperiod.blank,1,"Div_stayperiod")) return false;
								if(frm.stayperiod[1].checked){
									temp1= frm.stayyear.options[frm.stayyear.selectedIndex].value;
									temp2= frm.staymonth.options[frm.staymonth.selectedIndex].value;
									if((temp1=="Select" || temp1=="00") && (temp2=="Select" || temp2=="0")) return ip.throwErr(frm.stayyear,stayperiod.invalid,1,"Div_stayperiod");
								}
							}
							break;
					}
				}
			}
			return true;
		}catch(e){d.getElementById("submit_image").disabled = false;traceError(e,"advanced Validate");}
	}
	function IsEmptyNew(obj, obj_type){
		if(!obj || obj=="undefined" || obj==null || obj=="null") return;
		if (obj_type == "text" || obj_type == "password" || obj_type == "textarea" || obj_type == "file"){
			var objValue;
			objValue = obj.value.replace(/\s+$/,"");
			objValue = ip.Trim(objValue);
			return (objValue.length==0) ? true : false;
		}else if (obj_type == "select"){
			if(obj.selectedIndex==-1 || obj.options[obj.selectedIndex].value=="0" ||
					obj.options[obj.selectedIndex].value=="00" || obj.options[obj.selectedIndex].value=="" ||
						(obj.options[obj.selectedIndex].value=="any" && obj.name=="state") ){
				return true;
			}else{return false;}
		}else if (obj_type == "radio" || obj_type == "checkbox"){
			if (!obj[0] && obj){
				return (obj.checked) ? false : true;
			}else{
				for (i=0; i < obj.length; i++){if(obj[i].checked) return false;}
				return true;
			}
		}else{return true;}
	}
	function ValidateUserLogin(frm){
		uname=frm.txtusername.value;
		passwd=frm.txtpassword.value;
		if(!IsMandatory(frm.txtusername,"text","Please enter a username",1,"DivLoginStatus")) return false;
		if(!IsMandatory(frm.txtpassword,"text","Please enter a password",1,"DivLoginStatus")) return false;
		xmlHTTP1 = new getHTTPObject();
		url=ip.host() + "/index.php?option=listing&page=ajax_quickrentin&uname="+uname+"&passwd="+passwd+"&action=login&notemplate=yes";
		SendRequest(url);
	}
	function SendRequest(url){
		try{
			xmlHTTP1.open("GET", url, true);
			xmlHTTP1.send(null);
			xmlHTTP1.onreadystatechange = function(){
				var Obj;
				d.getElementById("DivLoginStatus").style.display ="";
				d.getElementById("DivLoginStatus").innerHTML =ip.loading("Please wait... validating your login...");
				if (xmlHTTP1.readyState == 4) {
					if(xmlHTTP1.responseText==1){
						d.getElementById("div_ip_username").innerHTML ='<font class="bText">Welcome '+d.frmLogin.txtusername.value +' !</font> | <a href="index.php?option=member&amp;page=mypropertyhome">My Properties</a>&nbsp;|&nbsp;<a href="index.php?option=logout" class="Arw">Logout</a>';
						NavigateUser(d.frmLogin,d.ListingForm,"existinguser");
						Obj = d.getElementById("DivUserStatus");
						Obj.style.display="none";
						if(d.getElementById("submit_image")) d.getElementById("submit_image").disabled=false;
						toolTip.createAttributes();
						/*showUserPackage();*/
						/*ShowPackgeInfo();*/
						/* ShowHideContactDetails(1); */
					}else{
						Obj=d.getElementById("DivLoginStatus");
						Obj.innerHTML ="Username/Password is invalid";
					}
				}
			};
		}catch(e){}
	}
	function ShowPackgeInfo(){
		d.getElementById("packageInfo").innerHTML ="Please wait...";
		xmlHTTP3 = new getHTTPObject();
		url=ip.host() + "/index.php?option=listing&page=getpackage&notemplate=yes";
		try{
			xmlHTTP3.open("GET", url, true);
			xmlHTTP3.send(null);
			xmlHTTP3.onreadystatechange = function(){
				if (xmlHTTP3.readyState == 4) {
					 d.getElementById("packageInfo").innerHTML = xmlHTTP3.responseText;
				}
			};
		}catch(e){}
	}
	function showUserPackage(){
		d.getElementById("DivPackStatus").innerHTML ="Please wait...";
		xmlHTTP2 = new getHTTPObject();
		url=ip.host() + "/index.php?option=listing&page=packagedetails&notemplate=yes";
		try{
			xmlHTTP2.open("GET", url, true);
			xmlHTTP2.send(null);
			xmlHTTP2.onreadystatechange = function(){
				if (xmlHTTP2.readyState == 4){
					if(xmlHTTP2.responseText==0){
						window.location.href = "/index.php?option=advertise&page=advertise";return false;}
					 d.getElementById("DivPackStatus").innerHTML = '<span class=\"bText\">'+ xmlHTTP2.responseText+'</span> <br />';
				}
			};
		}catch(e){}
	}
	function NavigateUser(Disablefrm,Enablefrm,value) {
		for(i=0;i<Disablefrm.elements.length;i++) try{Disablefrm.elements[i].disabled=true;}catch(e){}
		for(i=0;i<Enablefrm.elements.length;i++) try{Enablefrm.elements[i].disabled=false;}catch(e){}
		if(d.getElementById("toolTip")) d.getElementById("toolTip").style.visibility="hidden";
		d.getElementById("listingContentDetails").style.display = (value=="existinguser") ? "" : "none";
		if(value=="existinguser"){
			d.getElementById("NewUserTable").style.display="none";
			if(d.getElementById("submit_image_login")) d.getElementById("submit_image_login").disabled=false;
			if(d.getElementById("submit_image")) d.getElementById("submit_image").disabled=true;
			d.getElementById("DivUserSelection").style.display="";
			toolTip.DivObj =d.getElementById("DivUserSelection");
			toolTip.DivObj.style.display="";
			toolTip.DivObj.style.opacity = '.1';
			toolTip.DivFade(1);
			try{Enablefrm.txtusername.focus();}catch(e){Enablefrm.transaction_new[0].focus();}
		}else{
			d.getElementById("NewUserTable").style.display="";
			if(d.getElementById("submit_image_login")) d.getElementById("submit_image_login").disabled=true;
			if(d.getElementById("submit_image")) d.getElementById("submit_image").disabled=false;
			d.getElementById("DivUserSelection").style.display="none";
			try{Enablefrm.user_type[0].focus();}catch(e){}
			for (var i=0; i<Enablefrm.user_type.length; i++) Enablefrm.user_type[i].checked=false;
		}
	}
	function navigateTrans(Obj){
		d.ListingForm.property.selectedIndex=0;
		/*d.getElementById('transHeadText').innerHTML= ip.toTitleCase(Obj.value) + ' a Property';*/
		d.getElementById('infoTxt').innerHTML= '<strong>INFORMATION OF THE PROPERTY YOU WISH TO '+ String(Obj.value).toUpperCase() + '</strong>';
		d.ListingForm.transaction.value = Obj.value;
		ShowPropertyType(d.ListingForm.property);
	}
	function SendRequest4UserName(url){
		try{
			var xmlHTTP = new getHTTPObject;
			d.getElementById("Div_strusername_availability").innerHTML = ip.loading("Checking username availability... Please wait...");
			d.getElementById("Div_strusername_availability").style.display ="";
			xmlHTTP.open("GET", url, true);
			xmlHTTP.onreadystatechange = function(){
				if (xmlHTTP.readyState == 4) {
					var res = xmlHTTP.responseText;
					res=parseInt(res);
					userNameAllow = (res==1) ? false : true;
					/*usArr[usArr.length-1][1] = userNameAllow;*/
					d.getElementById("Div_strusername_availability").innerHTML = (res==1) ? strusername.useravailability : strusername.useravailability_yes;
					d.getElementById("Div_strusername_availability").style.display = (res==1) ? "" : "none";
					try{if(res==1){d.ListingForm.strusername.focus();}}catch(e){ip.traceErr(e,"usernameValidate_Focus","quickreg");}
				}
			};
			xmlHTTP.send(null);
		}catch(e){ip.traceErr(e,"SendReq4UserName","quick rent");}
	}
	function navigateUserType(Obj){
		/*if(Obj.value!=1){
			ip.OpenPage(ip.host() + "/index.php?option=member&page=registerform&WT.si_n=REGISTRATION&WT.si_p=basicdetails&user_type="+Obj.value);
			return false;
		}*/
		//ip.print("comes");
		d.getElementById('Div_user_type').style.display = "none";
		d.getElementById("individualProfileDetails").style.display = "none";
		d.getElementById("agentProfileDetails").style.display = "none";
		d.getElementById("builderProfileDetails").style.display = "none";
		d.getElementById('optnristatus').checked=false;
		d.getElementById('optnristatus').disabled= (Obj.value==1) ? false : true;
		d.ListingForm.strnri.disabled = (Obj.value==1) ? false : true;
		d.getElementById('usertype_hint').style.display=(Obj.value==3) ? "": "none";
		d.getElementById('username_hint').style.display=(Obj.value==3) ? "" : "none";
		d.getElementById("lblName").innerHTML = (Obj.value==3) ? "Agent Name " : (Obj.value==4) ? "Builder Name" : "Name";
		d.getElementById("listingContentDetails").style.display = "";
		profileID = (Obj.value==1) ? "individualProfileDetails" : (Obj.value==2) ? "agentProfileDetails" : "builderProfileDetails";
		//d.getElementById(profileID).style.display = "";
	}
	function transferContactDetails(fromObj){
		tempContact.name=d.ListingForm.newstrname.value;
		tempContact.email=d.ListingForm.newstremail.value;
		tempContact.areacode=d.ListingForm.newintstdcode.value;
		tempContact.landline=d.ListingForm.newstrphone.value;
		tempContact.mobilenumber=d.ListingForm.newstrmobile.value;
		if(!ip.isObject(d.getElementById("name"))) return false;
		d.getElementById("name").value = (ip.Trim(d.getElementById("name").value)=="" && tempContact.nameUpdated==false) ? tempContact.name : d.getElementById("name").value;
		d.getElementById("email").value = (ip.Trim(d.getElementById("email").value)=="" && tempContact.emailUpdated==false) ? tempContact.email : d.getElementById("email").value;
		d.getElementById("areacode").value = (ip.Trim(d.getElementById("areacode").value)=="" && tempContact.areacodeUpdated==false) ? tempContact.areacode : d.getElementById("areacode").value;
		d.getElementById("landline").value = (ip.Trim(d.getElementById("landline").value)=="" && tempContact.landlineUpdated==false) ? tempContact.landline : d.getElementById("landline").value;
		d.getElementById("mobilenumber").value = (ip.Trim(d.getElementById("mobilenumber").value)=="" && tempContact.mobilenumberUpdated==false) ? tempContact.mobilenumber : d.getElementById("mobilenumber").value;
		/*ip.print(d.getElementById("name").value);
		ip.print(d.getElementById("email").value);
		ip.print(d.getElementById("areacode").value);
		ip.print(d.getElementById("landline").value);
		ip.print(d.getElementById("mobilenumber").value);*/
	}
	function fieldUpdated(Obj){
		if(Obj.id=="name") tempContact.nameUpdated=true;
		if(Obj.id=="email") tempContact.emailUpdated=true;
		if(Obj.id=="areacode") tempContact.areacodeUpdated=true;
		if(Obj.id=="landline") tempContact.landlineUpdated=true;
		if(Obj.id=="mobilenumber") tempContact.mobilenumberUpdated=true;
	}
	function traceError(e,func){ip.traceErr(e, ((func) ? func :"") , "quicklistingforms");}
