function deschide(id)
{
  url='/source/disclaimer.php';
  opt='width=400, height=850, resizable=no, menubar=no, titlebar=no, personalbar=no, status=no, toolbar=no, location=no, scrollbars=no';
  target='_blank';
  window.open(url,target,opt);
}
function checksrc(f)
{
  sstr=''+f.tosearch.value;
  if (sstr.length<3) { alert('Introduceti cel putin un cuvant (minim 3 caractere)!'); return false; }
  else
    return true;
}

function displayStatusMsg(msgStr) { 
  status=msgStr;
}
function viewimg(img)
{
 window.open('showimg.php?id='+img,'mondo','scrollbars=no, menubar=no, adressbar=no, toolbar=no, directories=no, location=no, status=no');
 return true;
}

function conf_passch(f)
 {
	 err=0;
	 pass1=f.newpass.value+'';
	 pass2=f.newpassconf.value+'';
	 if ((pass1.length<5)||(pass1.length>20))
	  {
		 err=1;
		 alert('Introduceti o parola valida!\n(5~20 caractere)');
	  } else 
	  {
		perr=checkPassStr(pass1);
		if (perr==1)
		 {
		   err=1;
		   pass2='';
		   alert('Caractere invalide in parola!!( \', ", \\ - nu sunt admise )');
		 }
	  }
	if ((err==0)&&(pass2!=pass1)&&(pass1.length>=5)&&(pass1.length<=20))
	 {
		 err=1;
		 alert('Va rugam confirmati parola!');
	 }
	if (err==0) return true;
	else return false;
 }
 
function checkPassStr(str)
{
  tmp=0;
  str2=str.replace('"','');
  str3=str.replace('\'','');
  str4=str.replace('\\','');
  if ((str2!=str)||(str3!=str)||(str4!=str))
   {
	  tmp=1;
   }
  return tmp;
}

function switchmenu(el) {
	el=document.getElementById(el);
	if(el.style.display=="") {
		//hide menu
		el.style.display="none";
		document.getElementById('xmenu').innerHTML='<a href="#" onclick="javascript:void(switchmenu(\'submenu\'))" style="text-decoration:none">Arata meniu <img height="12px" src="/img/arr_dwn.gif" alt="Ascunde meniu" border="0" /></a>';
	}
	else {
		//show menu
		el.style.display="";
		document.getElementById('xmenu').innerHTML='<a href="#" onclick="javascript:void(switchmenu(\'submenu\'))" style="text-decoration:none">Ascunde meniu <img height="12px" src="/img/arr_up.gif" alt="Ascunde meniu" border="0" /></a>';
	}
}
