function tabs(x)
  {
    var lis=document.getElementById("searchtabs").childNodes; //gets all the LI from the UL
 
    for(i=0;i<lis.length;i++)
    {
      lis[i].className=""; //removes the classname from all the LI
    }
    x.className="selected"; //the clicked tab gets the classname selected
    var tab=x.id;
    switch(tab) //this switch case replaces the tabContent
    {
      case "tab2":
		document.getElementById("sb-search-rents").style.display = '';
		document.getElementById("sb-search-sells").style.display = 'none';
        break;
	  case "tab1":
        document.getElementById("sb-search-sells").style.display = '';
		document.getElementById("sb-search-rents").style.display = 'none';
        break;
      default:
               document.getElementById("sb-search-sells").style.display = '';
		document.getElementById("sb-search-rents").style.display = 'none';
        break;
 
    }
  }
