// JavaScript for Hot Opportunities
 function SelectHO_Res()
  {
	document.getElementById('residential').style.display="block";
    document.getElementById('commercial').style.display="none";
	document.getElementById('HO_Tab1').className="current";	
    document.getElementById('HO_Tab2').className="";	
  }
 function SelectHO_Comm()
  {
	document.getElementById('residential').style.display="none";
    document.getElementById('commercial').style.display="block";
	document.getElementById('HO_Tab1').className="";	
    document.getElementById('HO_Tab2').className="current";	
  }
 
// JavaScript for EMI cal & Live Chat
 function SelectEmiCal()
  {
	document.getElementById('EMI').style.display="block";
    document.getElementById('LiveChat').style.display="none";
	document.getElementById('Tab1').className="IndexBottomTab-Selected";	
    document.getElementById('Tab2').className="IndexBottomTab";	
  }
 function SelectLiveChat()
  {
    document.getElementById('EMI').style.display="none";
    document.getElementById('LiveChat').style.display="block";
	document.getElementById('Tab1').className="IndexBottomTab";	
    document.getElementById('Tab2').className="IndexBottomTab-Selected";	
  }
  

	function compare(propId_arr)
	{	
		var propId_counter = 0;
		for(i=0; i<propId_arr.length; i++)
		{						 
			 if(propId_arr[i].checked)
			  {
				propId_counter++;
				//alert(propId_arr[i].value);
				/*if(loc_id)
				  {	loc_id = loc_id+"_"+propId_arr[i].value; }
				else
				 { loc_id = propId_arr[i].value; }*/
			  }							
		  }
		  //alert(propId_counter);
		  
		  if(propId_counter < 2){ alert('Select Min 2 property');  return false; }
		  else if(propId_counter > 3){ alert('Max 3 property can be compared');  return false; }
		 
		 document.compare_form.submit();
		 return true;
	}
					
  
  function display_tab(div_id)
  {
		var arr = Array();
		arr[0] = 'facility';
		arr[1] = 'specific';
		arr[2] = 'plans';
		arr[3] = 'faq';
		arr[4] = 'flat';
		arr[5] = 'price';
		arr[6] = 'appli';
		arr[7] = 'current';
		
		for(var i=0; i<arr.length; i++)
		{
			document.getElementById(arr[i]).style.display = 'none';	
			var li_id = 'li_'+arr[i];
			document.getElementById(li_id).className = '';	
		}
		li_id = 'li_'+div_id;
		document.getElementById(div_id).style.display = 'block';
		document.getElementById(li_id).className = 'current';
  }