function updateFields(selectObj) {

   var VISIBLE = "visible";
   var HIDDEN = "hidden";
   // get the index of the current selection
   var index= selectObj.selectedIndex;
   // use the index to determine the value of the current selection
   var pick = selectObj.options[index].value; 
   var vTime = VISIBLE; 
   if ((pick == 7) || (pick == 8)) {  
	 vTime =HIDDEN;  
   }
   else if (pick < 7) {  
     vTime =VISIBLE; 	      
   }  
   var timeElem = document.getElementById("hideElement");  
   if (timeElem != null) {
     timeElem.style.visibility = vTime;
   } 
}


function display(myimage,alt) {
 html = "<HTML><HEAD><TITLE>"+alt+"</TITLE>" +
  "</HEAD><BODY LEFTMARGIN=0 " 
  + "MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER>" 
  + "<IMG SRC='" + myimage + "' BORDER=0 NAME=image " 
  + "onload='window.resizeTo(document.image.width*1.2,document.image.height*1.2)'>"
  + "</CENTER>" 
  + "</BODY></HTML>";
 popup=
 window.open
  ('','image',
  'toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
 popup.document.open();
 popup.document.write(html);
 popup.document.focus();
 popup.document.close()
 };
 
 
 function check_contact_firma () { 
 	
 		var mesaj = ''; 
 		
 		
 		if  ((document.contact_firma.numePren.value=='')||(document.contact_firma.numePren.value=='numele tau*'))
 		{
 			mesaj += "Completati campul: numele tau *!\n";
 		}

 		
 		if  ((document.contact_firma.adresaEmail.value=='')||(document.contact_firma.adresaEmail.value=='e-mail-ul tau*'))
 		{
 			mesaj += "Completati campul: e-mail-ul tau*!\n";
 		}
 		else{
 			var x = document.contact_firma.adresaEmail.value;
 			var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
 			if (!filter.test(x)) {
 				mesaj += "Campul: e-mail-ul tau*  - nu este valid! \n";

 			}
 		}
 		
 		
 		if  ((document.contact_firma.mesajRec.value=='')||(document.contact_firma.mesajRec.value=='mesajul tau *'))
 		{
 			mesaj += "Completati campul: mesajul tau *!\n";
 		}
 	 		
 	
 		if(mesaj!='')
 		{
 			alert(mesaj);
 			return false;
 		}
 		else {
 			//tempConfirm = confirm_entry();
 			//if(tempConfirm == true) { 				
 				document.contact_firma.submit();
 			
 			//else {
 			//	alert('Modificati campurile care nu sunt corecte si apasati trimite din nou!');
 			//}
 		}


 }
 
 // Meniu rulant judete
 window.onload=show;
function show(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
// --- Sfarsit meniu rulant judete ---
