<!--
function emptystr(theElement) {
	if  ((theElement==null) || (theElement.length == 0))
		return true;
	else
		return false;
}

function isEmail(theElement, theElementName) {
  str = theElement.value;
  if (!(result = ((str != "") && (str.indexOf("@") != -1) && (str.indexOf(".") != -1)))) {
    alert( theElementName + " trebuie sa fie de forma:\nex: nume@domeniu.ro" );
    theElement.focus();
  } 
  return result;
}

function isString(theElement, theElementName) {
   var newValue = theElement.value;
   var newLength = newValue.length;
   var extraChars=new String(",.- ");
   var search;
   for(var i = 0; i != newLength; i++) {
      aChar = newValue.substring(i,i+1);
      search = extraChars.indexOf(aChar);
      aChar = aChar.toUpperCase();
      if(search == -1 && (aChar < "A" || aChar > "Z") ) {
        alert( "ATENTIE!\n" + theElementName +  " trebuie să contină doar litere!" );
	    theElement.focus(); 
	 	return false;
      }
   }
   return true;
}

function isNumber(theElement, theElementName)
{
  s = theElement.value;
  if ( (s == "") || (isNaN(Math.abs(s)) && (s.charAt(0) != '#')))
  {
      if ( isNumber.arguments.length  == 1 ) 
         alert( " Valoarea trebuie sa fie un număr." );
      else  
         alert( theElementName +  " trebuie să fie de tip numeric!\nex: 0740123456 pentru mobil\nsau 0264123456 pentru fix" );
    theElement.focus(); 
    return false;
  }
  return true;
}

function verify(){
	if (emptystr(document.all.item("nume").value)){
		alert('Vă rugăm să vă introduceti numele!');
		document.newform.nume.focus();
		return false;
	}
	else 
	if(!isString(document.all.item("nume"),'Numele')) return false;	
	
	if (emptystr(document.all.item("email").value)){
		alert('Vă rugăm  să vă introduceti adresa de e-mail!');
		document.newform.email.focus();
		return false;
	}
	else 
	if(!isEmail(document.all.item("email"), 'Emailul'))	return false;
	
	if (emptystr(document.all.item("telefon").value)){
		alert('Vă rugăm  să vă introduceti numărul de telefon!');
		document.newform.telefon.focus();
		return false;
	}
	else 
	if(!isNumber(document.all.item("telefon"), 'Telefonul')) return false;
			
	if (emptystr(document.all.item("mesaj").value)){
		alert('Vă rugăm  să vă introduceti mesajul!');
		document.newform.mesaj.focus();
		return false;
	}
	
	document.newform.submit();
} 

function toggleMenu(ids)
{
eln = (document.getElementById) ? document.getElementById(ids) : document.all.ids;
if (eln.style.display == '')
{
eln.style.display = 'none';
}
else if (eln.style.display == 'none')
{
eln.style.display = '';
}
}

function toggleBody()
{
eln = (document.getElementById) ? document.getElementById("body") : document.all.body;
if (eln.style.display == '')
{
eln.style.display = 'none';
}
else if (eln.style.display == 'none')
{
eln.style.display = '';
}
}

function toggle(ids,img1,img2,ext)
{
eln = (document.getElementById) ? document.getElementById(ids) : document.all.ids;
if ((""+eln.src+"").search(img1) > 0)
{
eln.src = img2+"."+ext;
}
else if ((""+eln.src+"").search(img2) > 0)
{
eln.src = img1+"."+ext;
}
}



function QueryString(key)
    {
         /* Parse querystring     */
         QueryString.keys = new Array();
         QueryString.values = new Array();
         var query = window.location.search.substring(1);
         var pairs = query.split("&");
         
         
         for (var i=0; i < pairs.length; i++)
         {
              var pos = pairs[i].indexOf('=');
              if (pos >= 0)
              {
                   var argname = pairs[i].substring(0,pos);
                   var value = pairs[i].substring(pos+1);
                   QueryString.keys[QueryString.keys.length] = argname;
                   QueryString.values[QueryString.values.length] = value;          
              }
         }          
         
         /* Get value from querystring collection     */
         var value = null;
         for (var i=0; i < QueryString.keys.length; i++)
         {
              if (QueryString.keys[i].toUpperCase() == key.toUpperCase())
              {
                   value = QueryString.values[i];
                   break;
              }
         }
         return value;
    }


function openPictureWindow(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

function sarila(pagina)
{
 location.href= pagina;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() {
 var i,x,a=document.MM_sr;
 for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
  x.src=x.oSrc;
}
function MM_swapImage() {
 var i,j=0,x,a=MM_swapImage.arguments;
 document.MM_sr=new Array;
 for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null)
   {document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function netscape(){
isNS = (navigator.appName == "Netscape");
if (isNS) {
if(window.confirm("Această pagină nu a fost optimizată pentru Netscape! Doriți închiderea ei?")) window.close();
}
}
function redirect (url){
tmp = '/'+url+'/i';
if (location.href.search(eval(tmp))!=-1) location.href='http://www.sedoparking.com/'+url;
}
function referrer (url){
tmp = '/'+url+'/i';
if (document.referrer.search(eval(tmp))!=-1) location.href='http://firefox.oceanus.ro';
}
//-->