function verifica(f)
{
  if(!f.nume.value.replace(/\s/g, ''))
  {
    alert("Trebuie sa completati campul 'Nume'");
    f.nume.focus();
    return;
  }
  
  if(!f.email.value.match(/^([^@<>]+)\@([^.<>]+\.)?[^.<>]+\.([a-z]){2,4}$/i))
  {
    alert("Adresa de email introdusa de dumneavoastra este invalida");
    f.email.focus();
    return;
  }
  
  if(!f.telefon.value.replace(/\s/g, ''))
  {
    alert("Trebuie sa completati campul 'Telefon'");
    f.telefon.focus();
    return;
  }
  
  f.submit();
}

function getPageSize()
{
   var yScroll;
   
   if (window.innerHeight && window.scrollMaxY)
   {
     yScroll = window.innerHeight + window.scrollMaxY;
   }
   else if (document.body.scrollHeight > document.body.offsetHeight)
   { // all but Explorer Mac
     yScroll = document.body.scrollHeight;
   }
   else
   { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
     yScroll = document.body.offsetHeight;
   }
   
   var windowHeight;
   
   if (self.innerHeight)
   {	// all except Explorer
     windowHeight = self.innerHeight;
   }
   else if (document.documentElement && document.documentElement.clientHeight)
   { // Explorer 6 Strict Mode
     windowHeight = document.documentElement.clientHeight;
   }
   else if (document.body)
   { // other Explorers
     windowHeight = document.body.clientHeight;
   }
   
   // for small pages with total height less then height of the viewport
   if(yScroll < windowHeight)
   {
     pageHeight = windowHeight;
   }
   else
   {
     pageHeight = yScroll;
   }
  
   return pageHeight;
}

function showDiv(f, flv, w, h, type)
{
  f.className = "partiallyTransparent";
  f.style.display='';
  f.style.height = getPageSize() + "px";
  
  if(type == "swf")
  {
    f.innerHTML = "<div id=\"flvDiv\" align=\"center\" valign=\"middle\" style=\"position: absolute; background-color: #FFFFFF; top: 40px; left: " + (document.body.clientWidth - w)/2 + "px; width: " + (w + 8) + "px;height:" + (h + 30) + "px;\"><div style=\"height:4px;\">&nbsp;</div><object width=\"" + w + "\" height=\"" + h + "\"><param name=\"movie\" value=\"" + flv + "\"><embed src=\"" + flv + "\" width=\"" + w + "\" height=\"" + h + "\"></embed></object><br><div align=\"right\" style=\"padding-right:8px;padding-top:4px;\"><a href=\"javascript:closeDiv(document.getElementById('show'))\" class=closediv>Close</a></div></div>";
  }
  else
  {
    f.innerHTML = "<div align=\"center\" valign=\"middle\" style=\"position: absolute; background-color: #FFFFFF; top: 40px; left: " + (document.body.clientWidth - w)/2 + "px; width: " + (w + 8) + "px;height:" + (h + 30) + "px;\" id=\"flvDiv\"></div>";
    
    var s1 = new SWFObject('http://www.zeppelindesign.ro/player.swf','player',w,h,'9');
    s1.addParam('allowfullscreen','true');
    s1.addParam('allowscriptaccess','always');
    s1.addParam('flashvars','file=' + flv);
    s1.write('flvDiv');
  }
}

function closeDiv(f)
{
  f.innerHTML = "";
  f.style.zIndex = 0;
  f.style.display = "none";
}
