function fnValidateSearch(){
	//alert(document.frmsearch.SearchCity.value);
	if (isNull(document.frmsearch.SearchCity,"city")) { return false; }	
	
	if(notWeight(document.frmsearch.price,"Budget..!")){ return false; }
	
}


<!-- For Search in index Page-->
function fnValidateSearch1(){
if(notSelected(document.frmsearch1.s_city,"City..!")){ return false; }
}

function setBudget4search1(chooser){
// ON selection of category this function will work
var selected = chooser.options[chooser.selectedIndex].value;
//alert(selected);
//alert(document.frmsearch.s_budget.value);

removeAllOptions(document.frmsearch1.s_budget);
	
	if (selected==1 || selected == 3){
		ChangeBudget4buy1();
	}else{
		ChangeBudget4rent1();
	}
}

function setBudget4search(chooser){
// ON selection of category this function will work
var selected = chooser.options[chooser.selectedIndex].value;

//alert(document.frmsearch.s_budget.value);

removeAllOptions(document.frmsearch.s_budget);
	
	if (selected==1 || selected==3)   {
		ChangeBudget4buy();
	}else{
		ChangeBudget4rent();
	}
}

function setBudget4advsearch(chooser){
	
// ON selection of category this function will work
var selected = chooser.options[chooser.selectedIndex].value;

//alert(document.frmsearch.s_budget.value);

removeAllOptions(document.myform.budget);
	
	if (selected==1 || selected==3)   {
		ChangeBudget4buyadvsearch();
	}else{
		ChangeBudget4rentadvsearch();
	}
}


function ChangeBudget4buyadvsearch(){

	addOption(document.myform.budget,"999999","Below 10 Lacs");
	addOption(document.myform.budget,"1499999","10 to 15 Lacs");
	addOption(document.myform.budget,"1999999","15 to 20 Lacs");
	addOption(document.myform.budget,"2999999","20 to 30 Lacs");
	addOption(document.myform.budget,"3999999","30 to 40 Lacs");
	addOption(document.myform.budget,"4999999","40 to 50 Lacs");
	addOption(document.myform.budget,"5999999","50 to 60 Lacs");
	addOption(document.myform.budget,"7499999","60 to 75 Lacs");
	addOption(document.myform.budget,"9999999","75 Lacs to 1 Cr.");
	addOption(document.myform.budget,"14999999","1 to 1.5 Cr.");
	addOption(document.myform.budget,"19999999","1.5 to 2 Cr.");
	addOption(document.myform.budget,"29999999","2 to 3 Cr.");
	addOption(document.myform.budget,"49999999","3 to 5 Cr.");
	addOption(document.myform.budget,"99999999","5 to 10 Cr.");
	addOption(document.myform.budget,"199999999","10 to 20 Cr.");
	addOption(document.myform.budget,"200000000","More than 20 Cr.");
}

function ChangeBudget4rentadvsearch(){
	
	addOption(document.myform.budget,"4999","Below 5000");
	addOption(document.myform.budget,"9999","5000 to 10000");
	addOption(document.myform.budget,"14999","10000 to 15000");
	addOption(document.myform.budget,"19999","15000 to 20000");
	addOption(document.myform.budget,"24999","20000 to 25000");
	addOption(document.myform.budget,"39999","25000 to 40000");
	addOption(document.myform.budget,"69999","40000 to 70000");
	addOption(document.myform.budget,"99999","70000 to 1 Lac");
	addOption(document.myform.budget,"149999","1 to 1.5 Lacs");
	addOption(document.myform.budget,"199999","1.5 to 2 Lacs");
	addOption(document.myform.budget,"499999","2 to 5 Lacs");
	addOption(document.myform.budget,"999999","5 to 10 Lacs");
	addOption(document.myform.budget,"1000000","More than 10 Lacs");

}

function ChangeBudget4buy1(){
	
	addOption(document.frmsearch1.s_budget,"999999","Below 10 Lacs");
	addOption(document.frmsearch1.s_budget,"1499999","10 to 15 Lacs");
	addOption(document.frmsearch1.s_budget,"1999999","15 to 20 Lacs");
	addOption(document.frmsearch1.s_budget,"2999999","20 to 30 Lacs");
	addOption(document.frmsearch1.s_budget,"3999999","30 to 40 Lacs");
	addOption(document.frmsearch1.s_budget,"4999999","40 to 50 Lacs");
	addOption(document.frmsearch1.s_budget,"5999999","50 to 60 Lacs");
	addOption(document.frmsearch1.s_budget,"7499999","60 to 75 Lacs");
	addOption(document.frmsearch1.s_budget,"9999999","75 Lacs to 1 Cr.");
	addOption(document.frmsearch1.s_budget,"14999999","1 to 1.5 Cr.");
	addOption(document.frmsearch1.s_budget,"19999999","1.5 to 2 Cr.");
	addOption(document.frmsearch1.s_budget,"29999999","2 to 3 Cr.");
	addOption(document.frmsearch1.s_budget,"49999999","3 to 5 Cr.");
	addOption(document.frmsearch1.s_budget,"99999999","5 to 10 Cr.");
	addOption(document.frmsearch1.s_budget,"199999999","10 to 20 Cr.");
	addOption(document.frmsearch1.s_budget,"200000000","More than 20 Cr.");
}

function ChangeBudget4rent1(){
	
	addOption(document.frmsearch1.s_budget,"4999","Below 5000");
	addOption(document.frmsearch1.s_budget,"9999","5000 to 10000");
	addOption(document.frmsearch1.s_budget,"14999","10000 to 15000");
	addOption(document.frmsearch1.s_budget,"19999","15000 to 20000");
	addOption(document.frmsearch1.s_budget,"24999","20000 to 25000");
	addOption(document.frmsearch1.s_budget,"39999","25000 to 40000");
	addOption(document.frmsearch1.s_budget,"69999","40000 to 70000");
	addOption(document.frmsearch1.s_budget,"99999","70000 to 1 Lac");
	addOption(document.frmsearch1.s_budget,"149999","1 to 1.5 Lacs");
	addOption(document.frmsearch1.s_budget,"199999","1.5 to 2 Lacs");
	addOption(document.frmsearch1.s_budget,"499999","2 to 5 Lacs");
	addOption(document.frmsearch1.s_budget,"999999","5 to 10 Lacs");
	addOption(document.frmsearch1.s_budget,"1000000","More than 10 Lacs");

}

<!-- Ends-->
/*
function setBudget4search(chooser){
// ON selection of category this function will work
var selected = chooser.options[chooser.selectedIndex].value;
//alert(selected);
//alert(document.frmsearch.s_budget.value);

removeAllOptions(document.frmsearch.s_budget);
	
	if (selected==1){
		ChangeBudget4buy();
			else if(selected==2)
		ChangeBudget4rent();
			else if(selected==3)
		ChangeBudget4sell();
		else
		ChangeBudget4rentout();
	}
		
			
}

*/
function GetLocality(chooser){
// ON selection of category this function will work
var selected = chooser.options[chooser.selectedIndex].value;
//alert(document.frmsearch.s_budget.value);

removeAllOptions(document.myform.locality);
	
Addlocality(selected);

}

function Addlocality(){
	
	addOption(document.myform.locality,"","-- Select Locality --");
	addOption(document.myform.locality,'1','test');
	//addOption(document.myform.locality,"1499999","10 to 15 Lacs");
//	addOption(document.myform.locality,"1999999","15 to 20 Lacs");
	addOption(document.myform.locality,"other_1","Other");
}

function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}

function change_bedroom_options()
{
	
	var selected = document.frmsearch.s_property.value;
	
	if(selected < 10)
	{
		document.frmsearch.s_bedroom.value = '0';
		document.frmsearch.s_bedroom.disabled = false;
	}
	else if(selected >= 10)
	{
		document.frmsearch.s_bedroom.value = '0';
		document.frmsearch.s_bedroom.disabled = true;
	}
}


<!-- For Search in index Page-->
function change_options()
{
	
	var selected = document.frmsearch1.s_property.value;
	
	if(selected < 10)
	{
		document.frmsearch1.s_bedroom.value = '0';
		document.frmsearch1.s_bedroom.disabled = false;
	}
	else if(selected >= 10)
	{
		document.frmsearch1.s_bedroom.value = '0';
		document.frmsearch1.s_bedroom.disabled = true;
	}
}
/*

function change_options()
{
	
	var selected = document.myform.s_property.value;
	
	if(selected < 10)
	{
		document.myform.s_bed.value = '0';
		document.myform.s_bed.disabled = false;
	}
	else if(selected >= 10)
	{
		document.myform.s_bed.value = '0';
		document.myform.s_bed.disabled = true;
	}
}


<!-- Ends-->

*/
function ChangeBudget4buy(){
	
	addOption(document.frmsearch.s_budget,"999999","Below 10 Lacs");
	addOption(document.frmsearch.s_budget,"1499999","10 to 15 Lacs");
	addOption(document.frmsearch.s_budget,"1999999","15 to 20 Lacs");
	addOption(document.frmsearch.s_budget,"2999999","20 to 30 Lacs");
	addOption(document.frmsearch.s_budget,"3999999","30 to 40 Lacs");
	addOption(document.frmsearch.s_budget,"4999999","40 to 50 Lacs");
	addOption(document.frmsearch.s_budget,"5999999","50 to 60 Lacs");
	addOption(document.frmsearch.s_budget,"7499999","60 to 75 Lacs");
	addOption(document.frmsearch.s_budget,"9999999","75 Lacs to 1 Cr.");
	addOption(document.frmsearch.s_budget,"14999999","1 to 1.5 Cr.");
	addOption(document.frmsearch.s_budget,"19999999","1.5 to 2 Cr.");
	addOption(document.frmsearch.s_budget,"29999999","2 to 3 Cr.");
	addOption(document.frmsearch.s_budget,"49999999","3 to 5 Cr.");
	addOption(document.frmsearch.s_budget,"99999999","5 to 10 Cr.");
	addOption(document.frmsearch.s_budget,"199999999","10 to 20 Cr.");
	addOption(document.frmsearch.s_budget,"200000000","More than 20 Cr.");
}

function ChangeBudget4rent(){
	
	addOption(document.frmsearch.s_budget,"4999","Below 5000");
	addOption(document.frmsearch.s_budget,"9999","5000 to 10000");
	addOption(document.frmsearch.s_budget,"14999","10000 to 15000");
	addOption(document.frmsearch.s_budget,"19999","15000 to 20000");
	addOption(document.frmsearch.s_budget,"24999","20000 to 25000");
	addOption(document.frmsearch.s_budget,"39999","25000 to 40000");
	addOption(document.frmsearch.s_budget,"69999","40000 to 70000");
	addOption(document.frmsearch.s_budget,"99999","70000 to 1 Lac");
	addOption(document.frmsearch.s_budget,"149999","1 to 1.5 Lacs");
	addOption(document.frmsearch.s_budget,"199999","1.5 to 2 Lacs");
	addOption(document.frmsearch.s_budget,"499999","2 to 5 Lacs");
	addOption(document.frmsearch.s_budget,"999999","5 to 10 Lacs");
	addOption(document.frmsearch.s_budget,"1000000","More than 10 Lacs");

}

function ChangeBudget4sell(){
	
	addOption(document.frmsearch.s_budget,"4999","Below 5000");
	addOption(document.frmsearch.s_budget,"9999","5000 to 10000");
	addOption(document.frmsearch.s_budget,"14999","10000 to 15000");
	addOption(document.frmsearch.s_budget,"19999","15000 to 20000");
	addOption(document.frmsearch.s_budget,"24999","20000 to 25000");
	addOption(document.frmsearch.s_budget,"39999","25000 to 40000");
	addOption(document.frmsearch.s_budget,"69999","40000 to 70000");
	addOption(document.frmsearch.s_budget,"99999","70000 to 1 Lac");
	addOption(document.frmsearch.s_budget,"149999","1 to 1.5 Lacs");
	addOption(document.frmsearch.s_budget,"199999","1.5 to 2 Lacs");
	addOption(document.frmsearch.s_budget,"499999","2 to 5 Lacs");
	addOption(document.frmsearch.s_budget,"999999","5 to 10 Lacs");
	addOption(document.frmsearch.s_budget,"1000000","More than 10 Lacs");

}

function ChangeBudget4rentout(){
	
	addOption(document.frmsearch.s_budget,"4999","Below 5000");
	addOption(document.frmsearch.s_budget,"9999","5000 to 10000");
	addOption(document.frmsearch.s_budget,"14999","10000 to 15000");
	addOption(document.frmsearch.s_budget,"19999","15000 to 20000");
	addOption(document.frmsearch.s_budget,"24999","20000 to 25000");
	addOption(document.frmsearch.s_budget,"39999","25000 to 40000");
	addOption(document.frmsearch.s_budget,"69999","40000 to 70000");
	addOption(document.frmsearch.s_budget,"99999","70000 to 1 Lac");
	addOption(document.frmsearch.s_budget,"149999","1 to 1.5 Lacs");
	addOption(document.frmsearch.s_budget,"199999","1.5 to 2 Lacs");
	addOption(document.frmsearch.s_budget,"499999","2 to 5 Lacs");
	addOption(document.frmsearch.s_budget,"999999","5 to 10 Lacs");
	addOption(document.frmsearch.s_budget,"1000000","More than 10 Lacs");

}
/*
function SetProperty(){
	
	addOption(document.frmsearch.property,"1","Buy");
	addOption(document.frmsearch.property,"2","Sell");
	
	}
*/

function postform()
{
var selected = document.frmsearch.property.value;

//alert(selected);

if((selected)!=0)
{

	document.frmsearch.action="mypostings.php";
	document.frmsearch.submit();
}
else
{
	//alert('asd');
	//document.frmsearch.action="mypostings.php";
	//document.frmsearch.submit();
}

}

function inboxform()
{
var selected = document.frminbox.property.value;

//alert(selected);

if((selected)!=0)
{
		
    document.frminbox.page.value = 0;
	document.frminbox.action="mail_inbox.php";
	document.frminbox.submit();
}
else
{
	//alert('asd');
	//document.frmsearch.action="mypostings.php";
	//document.frmsearch.submit();
}

}

function sentform()
{
var selected = document.frmsent.property.value;

//alert(selected);

if((selected)!=0)
{
document.frmsent.page.value=0;
	document.frmsent.action="mail_send.php";
	document.frmsent.submit();
}
else
{
	//alert('asd');
	//document.frmsearch.action="mypostings.php";
	//document.frmsearch.submit();
}

}

function postform1()
{
var selected = document.thisForm.property_type.value;

//alert(selected);

if((selected)!=0)
{

	document.thisForm.action="mybookmark.php?action=search";
	document.thisForm.submit();
}
else
{
	//alert('asd');
	//document.frmsearch.action="mypostings.php";
	//document.frmsearch.submit();
}

}

/*
function mybookmarkform1()
{
var selected = document.thisForm.property_type.value;

//alert(selected);

if((selected)!=0)
{

	document.thisForm.action="mybookmark.php";
	document.thisForm.submit();
}
else
{
	alert('asd');
	//document.frmsearch.action="mypostings.php";
	//document.frmsearch.submit();
}

}

*/

// select option for requirement

function requirementform()
{
var selected = document.frmsearch.property.value;

//alert(selected);


if((selected)==1)
{

	document.frmsearch.action="myrequirements.php";
	document.frmsearch.submit();
}
else
{
	//alert('asd');
	document.frmsearch.action="myrequirements.php";
	document.frmsearch.submit();
}

}



