if(screen.width=="800")
{
	var tablewidths = "762";
}
else
{
	var tablewidths = "972";
	var tableborder= "#51BAEF;"
}
function chr_replace123(str){
		str = str.replace('#040;','\'');
		str = str.replace('#039;','&');
		return unescape(str);
	}
function prevHomeProject(arr)
{
	var html = "";
	var stloop = edloop = "";
	var len = arr.length - 1;
	var start = document.slide.stslide.value;
	var end = document.slide.edslide.value;
	edloop = parseInt(start)-1;
	if(edloop < 0)
		edloop = len;
	stloop = edloop;
	for (y=0; y<3; y++)
	{
		stloop--;
		if(stloop < 0)
			stloop = len;
	}
	document.slide.stslide.value = parseInt(stloop);
	document.slide.edslide.value = parseInt(edloop);

	start = stloop;
	html += "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
	for (y=0; y<4; y++)
	{
		var text1 = text2 = "";
		if(arr[start][3] != "")
			text1 = chr_replace123(arr[start][3])
		if(arr[start][4] != "")
			text2 = chr_replace123(arr[start][4])
		if(start > len)
			start = 0;
		html += "<td width='25%' valign='top' align='center'";
		if(y != 0)
			html += " style='background: url("+IMG_SERVER+"/images/citypage/white.gif) no-repeat;'";
		html += "><table width='175px' border='0' cellspacing='0' cellpadding='0' style='font-family:Verdana;font-size:12px; background:#FFFFFF;' class='cursor'>";
		html +="<tr><td align='center'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank'><img src='"+IMG_SERVER+"/images/banners/"+arr[start][0]+"' alt='"+arr[start][5]+"' title='"+arr[start][5]+"'></a></td></tr>";
		html +="<tr><td align='center' style='padding-left:7px;height:30px;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks' style='color:#000000;text-decoration:none;'><b>"+text1+"</b></a></td></tr>"; 
		html += "<tr><td align='left' style='text-align: justify; color: #4470A1' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span style='text-align: justify;'>"+text2+"</span></td></tr>";
		html += "<tr><td align='right' style='color: #4470A1' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span class='textnopad'><u>more &gt;&gt;</u></a></span></td></tr>";
		html += "</table></td>";
		start++;
		if(start > len)
			start = 0;
	} 
	
	html += "</tr></table>";
	document.getElementById('fp').innerHTML = html;
}
function nextHomeProject(arr)
{
	var html = "";
	var stloop = edloop = "";
	var len = arr.length - 1;
	if(document.slide.stslide.value == "" || document.slide.edslide.value == "")
	{
		var start = 0;
		var end = 3;
		stloop = 0;
		edloop = 3;
		document.slide.stslide.value = '0';
		document.slide.edslide.value = '3';
	}else{
		var start = document.slide.stslide.value;
		var end = document.slide.edslide.value;
		stloop = parseInt(end)+1;
		if(stloop > len)
			stloop = 0;
		edloop = stloop;
		for (y=0; y<3; y++)
		{
			edloop++;
			if(edloop > len)
				edloop = 0;
		}
		document.slide.stslide.value = parseInt(stloop);
		document.slide.edslide.value = parseInt(edloop);
	}

	start = stloop;
	html += "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
	for (y=0; y<4; y++)
	{
		var text1 = text2 = "";
		if(arr[start][3] != "")
			text1 = chr_replace123(arr[start][3])
		if(arr[start][4] != "")
			text2 = chr_replace123(arr[start][4])
		if(start > len)
			start = 0;
		html += "<td width='25%' valign='top' align='center'";
		if(y != 0)
			html += " style='background: url("+IMG_SERVER+"/images/citypage/white.gif) no-repeat;'";
		html += "><table width='175px' border='0' cellspacing='0' cellpadding='0' style='font-family:Verdana;font-size:12px; background:#FFFFFF;' class='cursor'>";
		html +="<tr><td align='center'><a href='"+arr[start][1]+"' onclick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' ><img src='"+IMG_SERVER+"/images/banners/"+arr[start][0]+"' alt='"+arr[start][5]+"' title='"+arr[start][5]+"'></a></td></tr>";
		html +="<tr><td align='center' style='padding-left:7px;height:30px;' class='textnopad'><a href='"+arr[start][1]+"' onclick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='texttitle hrefheader cursor' style='color:#000000;text-decoration:none;'><b>"+text1+"</b></a></td></tr>"; 
		html += "<tr><td align='left' style='text-align: justify;' class='textnopad'><a href='"+arr[start][1]+"' onclick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span style='text-align: justify;'>"+text2+"</span></td></tr>";
		html += "<tr><td align='right' style='color: #4470A1' class='textnopad'><a href='"+arr[start][1]+"' onclick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span class='textnopad'><u>more &gt;&gt;</u></a></span></td></tr>";
		html += "</table></td>";
		start++;
		if(start > len)
			start = 0;
	} 
	html += "</tr></table>";
	document.getElementById('fp').innerHTML = html;
}
	
function prevCityProject(arr)
{
	var html = "";
	var stloop = edloop = "";
	var len = arr.length - 1;
	var start = document.slide.stslide.value;
	var end = document.slide.edslide.value;
	edloop = parseInt(start)-1;
	if(edloop < 0)
		edloop = len;
	stloop = edloop;
	for (y=0; y<1; y++)
	{
		stloop--;
		if(stloop < 0)
			stloop = len;
	}
	document.slide.stslide.value = parseInt(stloop);
	document.slide.edslide.value = parseInt(edloop);

	start = stloop;
	html += "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
	for (y=0; y<2; y++)
	{
		var text1 = text2 = "";
		if(arr[start][3] != "")
			text1 = chr_replace123(arr[start][3])
		if(arr[start][4] != "")
			text2 = chr_replace123(arr[start][4])
		if(start > len)
			start = 0;
		html += "<td width='25%' valign='top' align='center'";
		if(y == 1)
			html += " style='background: url("+IMG_SERVER+"/images/citypage/white.gif) no-repeat;'";
		html += "><table width='175px' border='0' cellspacing='0' cellpadding='0' style='font-family:Verdana;font-size:12px; background:#FFFFFF;' class='cursor'>";
		html +="<tr><td align='center'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank'><img src='"+IMG_SERVER+"/images/banners/"+arr[start][0]+"' alt='"+arr[start][5]+"' title='"+arr[start][5]+"'></a></td></tr>";
		html +="<tr><td align='center' style='padding-left:7px;height:25px;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='texttitle hrefheader cursor' style='color:#000000;text-decoration:none;'><b>"+text1+"</b></a></td></tr>"; 
		html += "<tr><td align='left' style='text-align: justify;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span style='text-align: justify;'>"+text2+"</span></td></tr>";
		html += "<tr><td align='right' style='padding-left:7px;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span class='textnopad'><u>more &gt;&gt;</u></a></span></td></tr>";
		html += "</table></td>";
		start++;
	} 
	
	html += "</tr></table>";
	document.getElementById('fp').innerHTML = html;
}
function nextCityProject(arr)
{
	var html = "";
	var stloop = edloop = "";
	var len = arr.length - 1;
	if(document.slide.stslide.value == "" || document.slide.edslide.value == "")
	{
		var start = 0;
		var end = 1;
		stloop = 0;
		edloop = 1;
		document.slide.stslide.value = '0';
		document.slide.edslide.value = '1';
		
	}else{
		var start = document.slide.stslide.value;
		var end = document.slide.edslide.value;
		stloop = parseInt(end)+1;
		if(stloop > len)
			stloop = 0;
		edloop = stloop;
		for (y=0; y<1; y++)
		{
			edloop++;
			if(edloop > len)
				edloop = 0;
		}
		document.slide.stslide.value = parseInt(stloop);
		document.slide.edslide.value = parseInt(edloop);
	}

	start = stloop;
	html += "<table width='100%' cellpadding='0' cellspacing='0' border='0'><tr>";
	for (y=0; y<2; y++)
	{
		var text1 = text2 = "";
		if(arr[start][3] != "")
			text1 = chr_replace123(arr[start][3])
		if(arr[start][4] != "")
			text2 = chr_replace123(arr[start][4])
		if(start > len)
			start = 0;
		html += "<td width='25%' valign='top' align='center'";
		if(y != 0)
			html += " style='background: url("+IMG_SERVER+"/images/citypage/white.gif) no-repeat;'";
		html += "><table width='175px' border='0' cellspacing='0' cellpadding='0' style='font-family:Verdana;font-size:12px; background:#FFFFFF;' class='cursor'>";
		html +="<tr><td align='center'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank'><img src='"+IMG_SERVER+"/images/banners/"+arr[start][0]+"' alt='"+arr[start][5]+"' title='"+arr[start][5]+"'></a></td></tr>";
		html +="<tr><td align='center' style='padding-left:7px;height:25px;' class='textnopad'><a href='"+arr[start][1]+"' target='_blank' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' class='texttitle hrefheader cursor' style='color:#000000;text-decoration:none;'><b>"+text1+"</b></a></td></tr>"; 
		html += "<tr><td align='left' style='text-align: justify;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span style='text-align: justify;'>"+text2+"</span></td></tr>";
		html += "<tr><td align='right' style='padding-left:7px;' class='textnopad'><a href='"+arr[start][1]+"' onClick='javascript: update_banner_hits("+arr[start][2]+",\"2\")' target='_blank' class='hrefhomelinks'><span class='textnopad'><u>more &gt;&gt;</u></a></span></td></tr>";
		html += "</table></td>";
		start++;
	} 
	html += "</tr></table>";
	
	document.getElementById('fp').innerHTML = html;
}

function changecityid(val) {
	document.frm_search.city.value = val;
	document.frm_search.submit();
}

function changelocid(val) {
	document.frm_search.loc.value = val;
	document.frm_search.submit();
}
function setBudget2(chooser,def_sale,def_rent, find)
{
	if(find == 0) {
		chooser = chooser;
	} else {
		if(document.frm_first.property_for['0'].checked==true)
			chooser='1';
		else if(document.frm_first.property_for['1'].checked==true)
			chooser='2';
		else
			chooser='1';
	}
	var newElem;
	var where = (navigator.appName == 'Microsoft Internet Explorer') ? -1 : null;
	var cityChooser = document.frm_first.elements['budget_from'];
	if(find != 1) {
		while (cityChooser.options.length) {
			cityChooser.remove(0);
		}
		var choice = chooser;
		var db = budgetval[choice];
		newElem = document.createElement('option');
		if(chooser == '2') {
			newElem.text = "<5000";
			newElem.value = "4999";
		} else {
			newElem.text = "<10 Lacs";
			newElem.value = "999999";
		}
		cityChooser.add(newElem, where);
		if (choice != '') {
			for (var i = 0; i < db.length; i++) {
				newElem = document.createElement('option');
				newElem.text = db[i].text;
				newElem.value = db[i].value;
				if(i == (db.length-1)) {
					newElem.text = ">" + newElem.text;
				}
				cityChooser.add(newElem, where);
				if(chooser == 1 && db[i].value == '3000000') {
					newElem.selected = true;
				}else if(chooser == 2 && db[i].value == '15000'){
					newElem.selected = true;
				}
			}
		}
	}

	var cityChooser2 = document.frm_first.elements['budget_to'];
	while (cityChooser2.options.length) {
		cityChooser2.remove(0);
	}
	var choice = chooser;
	var db = budgetval[choice];
	var start = 0;
	if(find != 1) {
		if(chooser == 1) {
			start = 4;
		} else {
			start = 3;
		}
	} else {
		start = cityChooser.selectedIndex;
	}
	var maxoptions=cityChooser.options.length-1;

	if(start == 0 || start == maxoptions) {
		newElem = document.createElement('option');
		newElem.text = "Max Price";
		newElem.value = "";
		cityChooser2.add(newElem, where);
		cityChooser2.disabled = true;
	}else if (choice != '') {
		for (var i = start; i < db.length; i++) {
			newElem = document.createElement('option');
			newElem.text = db[i].text;
			newElem.value = db[i].value;
			cityChooser2.add(newElem, where);
			if(choice == 1 && db[i].value == def_sale) {
				newElem.selected = true;
			}else if(db[i].value == def_rent){
				newElem.selected = true;
			}
		}
		cityChooser2.disabled = false;
	}

}
function disable_combo(ctrl,frm_name) {
	if(ctrl==2 || ctrl==4 || ctrl==10 || ctrl==11 || ctrl==12 ||  ctrl==13 || ctrl==14 || ctrl==15 || ctrl==16) {
		val = (eval('document.' + frm_name + '.bedroom'));
		val.disabled =true;
	} else {
		val = (eval('document.' + frm_name + '.bedroom'));
		val.disabled=false;
	}
}
function validate_search(frm) {
	var bud = eval('document.'+frm+'.budget.value');
	if(bud == '') {
		alert('Please select your budget');
		eval('document.'+frm+'.budget.focus();');
		//return false;
	}
	return true;
}

function change_citytype(val) {
	var msg;
	if(val=='' || val =='1') {		// Delhi
		document.getElementById('span_delhihighlight').style.display = '';
		document.getElementById('span_delhidim').style.display = 'none';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = '';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'M1';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/delhi-property" alt="Delhi Properties" title="Delhi Properties" class="hrefhomelinks cursor">More Properties in Delhi &gt;&gt;</a>';
		document.frm_search.city.value = 'M1';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M1','head_Delhi');
	} else if(val =='2') {		// Mumbai
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = '';
		document.getElementById('span_mumbaidim').style.display = 'none';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = '';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'M2';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/mumbai-property" alt="Mumbai Properties" title="Mumbai Properties" class="hrefhomelinks cursor">More Properties in Mumbai &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M2','head_Mumbai');
	} else if(val =='3') {		// Bangalore
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = '';
		document.getElementById('span_bangaloredim').style.display = 'none';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';
		document.frm_search.city.value = 'M3';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = '';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/bangalore-propertyp" alt="Bangalore Properties" title="Bangalore Properties" class="hrefhomelinks cursor">More Properties in Bangalore &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M3','head_Bangalore');
	}else if(val =='4') {		// Chennai
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = '';
		document.getElementById('span_chennaidim').style.display = 'none';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';
		document.frm_search.city.value = 'M5';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = '';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/chennai-property" alt="Chennai Properties" title="Chennai Properties" class="hrefhomelinks cursor">More Properties in Chennai &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M5','head_Chennai');
	}else if(val =='5') {		// Pune
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = '';
		document.getElementById('span_punedim').style.display = 'none';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = '';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'S299';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/pune-property" alt="Pune Properties" title="Pune Properties" class="hrefhomelinks cursor">More Properties in Pune &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=S299','head_Pune');
	}else if(val =='6') {		// Hyderabad
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = '';
		document.getElementById('span_hyderabaddim').style.display = 'none';
		document.frm_search.city.value = 'M6';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = '';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/hyderabad-property" alt="Hyderabad Properties" title="Hyderabad Properties" class="hrefhomelinks cursor">More Properties in Hyderabad &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M6','head_Hyderabad');
	}
}

function change_citytype_home(val) {
	var msg;
	if(val=='' || val =='1') {		// Delhi
		document.getElementById('span_delhihighlight').style.display = '';
		document.getElementById('span_delhidim').style.display = 'none';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = '';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'M1';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/delhi-property" alt="Delhi Properties" title="Delhi Properties" class="hrefhomelinks cursor">More Properties in Delhi &gt;&gt;</a>';
		document.frm_search.city.value = 'M1';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M1','head_Delhi');
	} else if(val =='2') {		// Mumbai
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = '';
		document.getElementById('span_mumbaidim').style.display = 'none';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = '';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'M2';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/mumbai-property" alt="Mumbai Properties" title="Mumbai Properties" class="hrefhomelinks cursor">More Properties in Mumbai &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M2','head_Mumbai');
	} else if(val =='3') {		// Bangalore
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = '';
		document.getElementById('span_bangaloredim').style.display = 'none';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';
		document.frm_search.city.value = 'M3';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = '';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/bangalore-propertyp" alt="Bangalore Properties" title="Bangalore Properties" class="hrefhomelinks cursor">More Properties in Bangalore &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M3','head_Bangalore');
	}else if(val =='4') {		// Chennai
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = '';
		document.getElementById('span_chennaidim').style.display = 'none';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';
		document.frm_search.city.value = 'M5';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = '';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/chennai-property" alt="Chennai Properties" title="Chennai Properties" class="hrefhomelinks cursor">More Properties in Chennai &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M5','head_Chennai');
	}else if(val =='5') {		// Pune
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = '';
		document.getElementById('span_punedim').style.display = 'none';
		document.getElementById('span_hyderabadhighlight').style.display = 'none';
		document.getElementById('span_hyderabaddim').style.display = '';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = '';
		document.getElementById('head_Hyderabad').style.display = 'none';
		document.frm_search.city.value = 'S299';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/pune-property" alt="Pune Properties" title="Pune Properties" class="hrefhomelinks cursor">More Properties in Pune &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=S299','head_Pune');
	}else if(val =='6') {		// Hyderabad
		document.getElementById('span_delhihighlight').style.display = 'none';
		document.getElementById('span_delhidim').style.display = '';
		document.getElementById('span_mumbaihighlight').style.display = 'none';
		document.getElementById('span_mumbaidim').style.display = '';
		document.getElementById('span_bangalorehighlight').style.display = 'none';
		document.getElementById('span_bangaloredim').style.display = '';
		document.getElementById('span_chennaihighlight').style.display = 'none';
		document.getElementById('span_chennaidim').style.display = '';
		document.getElementById('span_punehighlight').style.display = 'none';
		document.getElementById('span_punedim').style.display = '';
		document.getElementById('span_hyderabadhighlight').style.display = '';
		document.getElementById('span_hyderabaddim').style.display = 'none';
		document.frm_search.city.value = 'M6';

		document.getElementById('head_Delhi').style.display = 'none';
		document.getElementById('head_Mumbai').style.display = 'none';
		document.getElementById('head_Bangalore').style.display = 'none';
		document.getElementById('head_Chennai').style.display = 'none';
		document.getElementById('head_Pune').style.display = 'none';
		document.getElementById('head_Hyderabad').style.display = '';
		document.getElementById('span_more').innerHTML = '<a href="/real-estate/hyderabad-property" alt="Hyderabad Properties" title="Hyderabad Properties" class="hrefhomelinks cursor">More Properties in Hyderabad &gt;&gt;</a>';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city=M6','head_Hyderabad');
	}
}

function change_locptype(val,city) {
	var msg;

	if(val=='' || val =='1') {
		document.getElementById('span_aparthighlight').style.display = '';
		document.getElementById('span_apartdim').style.display = 'none';
		document.getElementById('span_plothighlight').style.display = 'none';
		document.getElementById('span_plotdim').style.display = '';
		document.getElementById('span_villahighlight').style.display = 'none';
		document.getElementById('span_villadim').style.display = '';
		//document.getElementById('span_floorhighlight').style.display = 'none';
		//document.getElementById('span_floordim').style.display = '';
		document.frm_search.property_type.value = '3';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city='+city+'&property_type=3&page=citypage','head_city_locality');
	} else if(val =='2') {
		document.getElementById('span_aparthighlight').style.display = 'none';
		document.getElementById('span_apartdim').style.display = '';
		document.getElementById('span_plothighlight').style.display = '';
		document.getElementById('span_plotdim').style.display = 'none';
		document.getElementById('span_villahighlight').style.display = 'none';
		document.getElementById('span_villadim').style.display = '';
		//document.getElementById('span_floorhighlight').style.display = 'none';
		//document.getElementById('span_floordim').style.display = '';
		document.frm_search.property_type.value = '4';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city='+city+'&property_type=4&page=citypage','head_city_locality');
	} else if(val =='3') {
		document.getElementById('span_aparthighlight').style.display = 'none';
		document.getElementById('span_apartdim').style.display = '';
		document.getElementById('span_plothighlight').style.display = 'none';
		document.getElementById('span_plotdim').style.display = '';
		document.getElementById('span_villahighlight').style.display = '';
		document.getElementById('span_villadim').style.display = 'none';
		//document.getElementById('span_floorhighlight').style.display = 'none';
		//document.getElementById('span_floordim').style.display = '';
		document.frm_search.property_type.value = '6';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city='+city+'&property_type=6&page=citypage','head_city_locality');
	}
	/*else if(val =='4') {
		document.getElementById('span_aparthighlight').style.display = 'none';
		document.getElementById('span_apartdim').style.display = '';
		document.getElementById('span_plothighlight').style.display = 'none';
		document.getElementById('span_plotdim').style.display = '';
		document.getElementById('span_villahighlight').style.display = 'none';
		document.getElementById('span_villadim').style.display = '';
		document.getElementById('span_floorhighlight').style.display = '';
		document.getElementById('span_floordim').style.display = 'none';
		document.frm_search.property_type.value = '5';
		makeajaxrequest_homepagelocality('/ssi/ajax/featured-locality.php?city='+city+'&property_type=5&page=citypage','head_city_locality');
	}*/
}
function change_city(val) {
	if(val == '')
		return false
	var url;
	if(val == 'National'){
		url = "/index.php?bypass=1";
	} else if(val == 'Delhi'){
		url = "/real-estate/delhi-property.php";
	} else if(val == 'Ahmedabad'){
		url = "/real-estate/ahmedabad-property.php";
	} else if(val == 'Bangalore'){
		url = "/real-estate/bangalore-property.php";
	} else if(val == 'Chandigarh'){
		url = "/real-estate/chandigarh-property.php";
	} else if(val == 'Chennai'){
		url = "/real-estate/chennai-property.php";
	} else if(val == 'Hyderabad'){
		url = "/real-estate/hyderabad-property.php";
	} else if(val == 'Jaipur'){
		url = "/real-estate/jaipur-property.php";
	} else if(val == 'Kochi'){
		url = "/real-estate/kochi-property.php";
	} else if(val == 'Kolkata'){
		url = "/real-estate/kolkata-property.php";
	} else if(val == 'Mumbai'){
		url = "/real-estate/mumbai-property.php";
	} else if(val == 'Pune'){
		url = "/real-estate/pune-property";
	} 
	document.location = url;
}
function change_ptype(val, sel_ptype) {
	var msg;
	if(val=='' || val =='1') {
		msg = '<select name="property_type" class="txtComp" onchange="javascript:disable_combo(this.value,\'frm_first\');" style="width:170px;"><option value="1" style="background-color:#FDF6B5;" ';
		if(sel_ptype == '' || sel_ptype == '1') msg += ' selected';
		msg += '>Residential Property</option><option value="Apartment" ';
		if(sel_ptype == 'Apartment') msg += ' selected';
		msg += '>Apartment</option><option value="Plot/Land" ';
		if(sel_ptype == 'Plot/Land') msg += ' selected';
		msg += '>Plot/Land</option><option value="Builder Floor" ';
		if(sel_ptype == 'Builder Floor') msg += ' selected';
		msg += '>Builder Floor</option><option value="Bungalow/Villa" ';
		if(sel_ptype == 'Bungalow/Villa') msg += ' selected';
		msg += '>Bungalow/Villa</option><option value="Farm House" ';
		if(sel_ptype == 'Farm House') msg += ' selected';
		msg += '>Farm House</option><option value="Service/Studio Apartment" ';
		if(sel_ptype == 'Service/Studio Apartment') msg += ' selected';
		msg += '>Service/Studio Apartment</option><option value="Other Residential" ';
		if(sel_ptype == 'Other Residential') msg += ' selected';
		msg += '>Other Residential</option></select>';

		document.frm_first.bedroom.disabled = false;
		if (document.getElementById("span_resitab") != null && document.getElementById("span_resitab") != "undefined") {
			document.getElementById('span_resitab').style.background = 'url('+IMG_SERVER+'/images/src-tb-graditant.gif) top left';
			document.getElementById('span_resitab').style.top = '1px';
		}
		if (document.getElementById("span_commtab") != null && document.getElementById("span_commtab") != "undefined") {
			document.getElementById('span_commtab').style.background = 'url('+IMG_SERVER+'/images/src-tb-normal.gif) top left';
			document.getElementById('span_commtab').style.top = '0px';
		}
		if (document.getElementById("tab_search_main") != null && document.getElementById("tab_search_main") != "undefined")
			document.getElementById('tab_search_main').style.background = 'url('+IMG_SERVER+'/images/citypage/home-search-1.jpg) top left no-repeat';
	} else if(val == '2') {
		msg = '<select name="property_type" class="txtComp" onchange="javascript:disable_combo(this.value,\'frm_first\');" style="width:170px;"><option value="2" style="background-color:#FDF6B5;"';
		if(sel_ptype == '2') msg += ' selected';
		msg += '>Commercial Property</option><option value="Land" ';
		if(sel_ptype == 'Land') msg += ' selected';
		msg += '>Land</option><option value="Office" ';
		if(sel_ptype == 'Office') msg += ' selected';
		msg += '>Office</option><option value="Business Centre" ';
		if(sel_ptype == 'Business Centre') msg += ' selected';
		msg += '>Business Centre</option><option value="Warehouse/Godown" ';
		if(sel_ptype == 'Warehouse/Godown') msg += ' selected';
		msg += '>Warehouse/Godown</option><option value="Industrial setup" ';
		if(sel_ptype == 'Industrial setup') msg += ' selected';
		msg += '>Industrial setup</option><option value="Shop" ';
		if(sel_ptype == 'Shop') msg += ' selected';
		msg += '>Shop</option><option value="Other Commercial" ';
		if(sel_ptype == 'Other Commercial') msg += ' selected';
		msg += '>Other Commercial</option></select>';

		document.frm_first.bedroom.disabled = true;
	if (document.getElementById("span_resitab") != null && document.getElementById("span_resitab") != "undefined") {
			document.getElementById('span_resitab').style.background = 'url('+IMG_SERVER+'/images/src-tb-normal.gif) top left';
			document.getElementById('span_resitab').style.top = '0px';
		}
		if (document.getElementById("span_commtab") != null && document.getElementById("span_commtab") != "undefined") {
			document.getElementById('span_commtab').style.background = 'url('+IMG_SERVER+'/images/src-tb-graditant.gif) top left';
			document.getElementById('span_commtab').style.top = '1px';
		}
		if (document.getElementById("tab_search_main") != null && document.getElementById("tab_search_main") != "undefined")
			document.getElementById('tab_search_main').style.background = 'url('+IMG_SERVER+'/images/citypage/home-search-commercial.jpg) top left no-repeat';
	}
	document.getElementById('div_ptype').innerHTML = msg;
}

function pproject(max) {
	if(max % 4 != 0) max= parseInt(max)+1;
	var startnum = parseInt(document.getElementById('span_num').innerHTML);
	if((startnum-1) >= 0) {
		document.getElementById('span_num').innerHTML = parseInt(startnum) - 1;
		for(i=0; i< max; i++) {
			if(i == (startnum-1) || i == (startnum-0) || i == (startnum+1) || i == (startnum+2)) {
				eval('document.getElementById(\'td_'+i+'\').style.display = ""');
			} else {
				eval('document.getElementById(\'td_'+i+'\').style.display = "none"');
			}
		}
		startnum = startnum - 1;
		if((startnum - 1) >= 0)
			document.img_back.src="http://img.makaan.com/images/fp-prev.gif";
		else
			document.img_back.src="http://img.makaan.com/images/fp-prev-disable.gif";
		if((startnum + 1) < max)
			document.img_next.src="http://img.makaan.com/images/fp-next.gif";
		else
			document.img_next.src="http://img.makaan.com/images/fp-next-disable.gif";
	} else {
		//alert('Already at start');
		document.img_back.src="http://img.makaan.com/images/fp-prev-disable.gif";
	}
}

function update_banner_clicks(bid,pos,type)
{
	var xmlhttp1 = false;
	//Check if we are using IE.
	try {
	//If the Javascript version is greater than 5.
		xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	//If not, then use the older active x object.
		try {
		//If we are using Internet Explorer.
			xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		//Else we must be using a non-IE browser.
			xmlhttp1 = false;
		}
	}
	//If we are using a non-IE browser, create a javascript instance of the object.
	if (!xmlhttp1 && typeof XMLHttpRequest != 'undefined') {
		xmlhttp1 = new XMLHttpRequest();
	}
	var serverPage = '/ssi/popup/clicks-counter.php?case='+pos+'&id=' + bid + '&type=' +type;
	xmlhttp1.open("GET",serverPage,true);
	xmlhttp1.onreadystatechange = function()
	{
		if (xmlhttp1.readyState==4)
		{
			//alert(xmlhttp1.responseText);
		}
	}
	xmlhttp1.send(null);
}
function update_banner_hits(id,type)
{
			//type 1 for update view or type 2 for update clicks
	var xmlhttp1 = false;
	//Check if we are using IE.
	try {
	//If the Javascript version is greater than 5.
		xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
	//If not, then use the older active x object.
		try {
		//If we are using Internet Explorer.
			xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		//Else we must be using a non-IE browser.
			xmlhttp1 = false;
		}
	}
	//If we are using a non-IE browser, create a javascript instance of the object.
	if (!xmlhttp1 && typeof XMLHttpRequest != 'undefined') {
		xmlhttp1 = new XMLHttpRequest();
	}
	var serverPage = '/ssi/popup/clicks-counter.php?case=sitebanner&id=' + id + '&type=' +type;
	xmlhttp1.open("GET",serverPage,true);
	xmlhttp1.onreadystatechange = function()
	{
		if (xmlhttp1.readyState==4)
		{
			//alert(xmlhttp1.responseText);
		}
	}
	xmlhttp1.send(null);
}
