
function inscriere() {
	if(!form_validation_inscriere()) {
			return;
	}
	document.frm_general.module.value='inscriere'
	document.frm_general.submit()
}

function form_validation_inscriere() {
				var a = document.frm_general;
				if(Trim(a.txt_email.value) == "") {
						alert("Completati va rugam campul !");
						a.txt_email.value='';
						a.txt_email.focus();
						return false;
					}
				
				return true;	
}	

function go_to(mod){	
	document.frm_general.module.value=mod
	document.frm_general.submit()
}
						
function show_supl_screen(vrr) {
	document.frm_general.detalii_locatie_info_suplim.value=vrr
	document.frm_general.submit()
}
						
function popup (vrr)
		{
			var newPop_elem
			newPop_elem = window.open ('popup.php?pic_id=' + vrr + '','d' , ' scrollbars=yes, menubar=no, height=550, width=812,  resizable=no, toolbar=no, location=no, status=no')
			x = (screen.width-812)/2;
			x = x < 0 ? 0 : x;
			y = (screen.height-560)/2;
			y = y < 0 ? 0 : y;
			newPop_elem.moveTo(x,y);
		}				


					
function Trim(s) 
			{
			  // Remove leading spaces and carriage returns
			  
			  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
			  {
				s = s.substring(1,s.length);
			  }
			
			  // Remove trailing spaces and carriage returns
			
			  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
			  {
				s = s.substring(0,s.length-1);
			  }
			  return s;
			}				
			


  
function newsletter_popup ()
	{
	if(!form_validation_news())
		{
			return;
		}
	var a = document.frm_general;
	var em= a.newsletter.value
	var newPop
	newPop = window.open ('newsletter_popup.php?&em='+em+'','d','scroolbars=no, menubar=no, height=400, width=600, resizable=no, toolbar=no, location=no, status=no')
	
	}		
	
								
function form_validation_cauta() {
	var a = document.frm_general;
	if(Trim(a.txt_cauta.value) == "") {
		alert("Va rugam Completati Campul!");
		a.txt_cauta.value='';
		a.txt_cauta.focus();
		return false;
	}
	return true;	
}





function showhide(id){ 
    if (document.getElementById){ 
        obj = document.getElementById(id); 
        if (obj.style.display == "none"){ 
            obj.style.display = ""; 
        } else { 
            obj.style.display = "none"; 
        } 
    } 
} 
function hide(id){
    if (document.getElementById){ 
        obj = document.getElementById(id);
        obj.style.display = "none";
    }
}


