

function go_to(mod){	
	document.frm_general.module.value=mod
	document.frm_general.submit()
}
						
						
function popup (picture) {
						//var newPop
						//newPop = window.open ('popup.php?pic_id='+picture+'','d',' scroolbars=yes, menubar=no, height=400, width=400, resizable=no, toolbar=no, location=no, status=no')
						//newPop.close()
						var newPop_elem
						//newPop_elem = window.open ('popup_elementi.php?pic_id='+picture+'','s',' scroolbars=yes, menubar=no, height=700, width=600, resizable=yes, toolbar=no, location=no, status=no')
						//newPop_elem.close()
						newPop_elem = window.open ('popup.php?pic_id='+picture+'','s',' scrollbars=yes, menubar=no, height=540, width=700,  resizable=yes, toolbar=no, location=no, status=no')
					    x = (screen.width-700)/2;
						x = x < 0 ? 0 : x;
						y = (screen.height-600)/2;
						y = y < 0 ? 0 : y;
						newPop_elem.moveTo(x,y);
					}
function popup2 (picture) {
						//var newPop
						//newPop = window.open ('popup.php?pic_id='+picture+'','d',' scroolbars=yes, menubar=no, height=400, width=400, resizable=no, toolbar=no, location=no, status=no')
						//newPop.close()
						var newPop_elem
						//newPop_elem = window.open ('popup_elementi.php?pic_id='+picture+'','s',' scroolbars=yes, menubar=no, height=700, width=600, resizable=yes, toolbar=no, location=no, status=no')
						//newPop_elem.close()
						newPop_elem = window.open ('popup2.php?pic_id='+picture+'','s',' scrollbars=yes, menubar=no, height=540, width=700,  resizable=yes, toolbar=no, location=no, status=no')
					    x = (screen.width-700)/2;
						x = x < 0 ? 0 : x;
						y = (screen.height-600)/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 page_next(pg)
  {
	document.frm_general.page.value=pg
	document.frm_general.submit()
  }

function page_goto(page)
  {
	document.frm_general.page.value=page
	document.frm_general.submit()
  }
  

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;	
}	



