function max(t1,t2){
	   if((t1.checked!=1)&&(t2.checked!=1))document.getElementById("max").style.visibility = "hidden";
	   if((t1.checked==1)&&(t2.checked!=1))document.getElementById("max").style.visibility = "visible";
	   if((t1.checked!=1)&&(t2.checked==1))document.getElementById("max").style.visibility = "visible";
	   if((t1.checked==1)&&(t2.checked)==1)document.getElementById("max").style.visibility = "visible";
	}
	function zone(){
	   var i
		if(document.getElementById("trimite1").style.display == "block"){
		   document.getElementById("trimite1").style.display = "none"
		   document.getElementById("click").style.display = "none"
		   document.getElementById("trimite2").style.display = "block"
		   document.getElementById("zone").style.display = "block"
		   document.getElementById("inapoi").style.display = "block"
		   i=1
		   for(i=1;i<=25;i++)document.getElementById("zone-default"+i).style.display = "none"
	   }else{
		   document.getElementById("trimite1").style.display = "block"
		   document.getElementById("click").style.display = "block"
		   document.getElementById("trimite2").style.display = "none"
		   document.getElementById("zone").style.display = "none"
		   document.getElementById("inapoi").style.display = "none"
		   i=1
		   for(i=1;i<=25;i++)document.getElementById("zone-default"+i).style.display = "block"
		}
	}
	function form(i){
	   var formular = document.getElementById("formular"+i);
	   if(formular.style.display == "block"){
	      formular.style.display = "none";
	   } else {
    	  formular.style.display = "block";
	   }
	}
	function selectare(cat,categorie,n){
	  var i;
	  if(cat)for(i=1;i<=n;i++)document.getElementById("zona"+i+"cat"+categorie).checked=true;
	  else for(i=1;i<=n;i++)document.getElementById("zona"+i+"cat"+categorie).checked=false;
	}
	function bifat(){
		var p=document.getElementById("mp").style;
		if(document.getElementById("tip7").checked||document.getElementById("tip9").checked)p.display="inline";
		else p.display="none";
	}
	function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
}
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
function setHome()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
}
function open_win(id)
{
 window.open("actualizare_anunturi/index.php?anunt="+id,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=500")
}
function open_wind(id)
{
 window.open("ist.php?anunt="+id,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=500")
}
function open_window(id)
{
 window.open("asoc.php?anunt="+id,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=500")
}
function open_windows(id)
{
 window.open("casoc.php?anunt="+id,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=500")
}
function open_cwin(id)
{
 window.open("actualizare_oferte/index.php?anunt="+id,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=800, height=500")
}
function form(i){
		   var formular = document.getElementById("formular"+i);
		   if(formular.style.display == "block"){
		      formular.style.display = "none";
		   } else {
		      formular.style.display = "block";
		   }
		}
function city(){
		if(!document.getElementById("oras1").checked&&document.getElementById("oras2").checked){
			document.getElementById("bucuresti").style.display="none";
			document.getElementById("ilfov").style.display="block";
			document.getElementById("buc").style.display="none";
			document.getElementById("ilf").style.display="block";
		}else{
			document.getElementById("bucuresti").style.display="block";
			document.getElementById("ilfov").style.display="none";
			if(!document.getElementById("oras1").checked&&!document.getElementById("oras2").checked){
				document.getElementById("buc").style.display="none";
				document.getElementById("ilf").style.display="none";
			}
			if(document.getElementById("oras1").checked&&document.getElementById("oras2").checked){
				document.getElementById("buc").style.display="block";
				document.getElementById("ilf").style.display="block";
			}
			if(document.getElementById("oras1").checked&&!document.getElementById("oras2").checked){
				document.getElementById("buc").style.display="block";
				document.getElementById("ilf").style.display="none";
			}
		}
}