function openthefaq(a){
  
  for(x=0;x<15;x++){
    document.getElementById('viewMore'+x).style.display = 'none';
  }
  document.getElementById('viewMore'+a).style.display = 'block';
  
}
function switchDiv(x, cl){

  if( ( cl!='') && (cl!=null) ){
    document.getElementById(cl).style.display='none';
  }
  document.getElementById(x).style.display='block';
  
}

function validate(){
	if(document.login.username.value=="" || document.login.username.value=="Email"){
		alert("Enter the username");
		document.login.username.focus();
		return false;
	}
	if(document.login.password.value=="" || document.login.password.value=="Password"){
		alert("Enter the password");
		document.login.password.focus();
		return false;
	}
}

function searchvalidate(){
	var searchFrm=document.search_properties_formtop;
	if(searchFrm.city.value=="Location (City, Zip)"){
		searchFrm.city.value='';
		searchFrm.zip.value='';
	}
	else{
		var searchsplit=searchFrm.city.value.split(",");
		search.city.value=searchsplit[0];
		search.zip.value=searchsplit[1];
	}
}

function popupImage(filebasename,main_img){
	window.open("popupimage.php?main_img="+main_img+"&filebasename="+filebasename,"mywindow","resizable=0,scrollbars=0,status=0,titlebar=0,location=0,width=375,height=300"); 
}
