function checkMail(email,frm)
{
      var mail=document.getElementById(email).value;
      
      if(mail=="")
      {
         alert("Please, fill in valid e-mail address.");
	     return false;
      }
      
      if(mail.indexOf("@")<2||mail.indexOf(".")<5)
      {
         alert("Please, fill in valid e-mail address.");
	      return false;
      }

      document.getElementById(frm).submit();
}

function confirmAction(frm)
{
   if(confirm("Are you sure?"))
   {
      frm.submit();
   }
   return true;
}

function centerWin(filename,width,height,name)
{
   var x=(screen.availWidth-width)/2;
   var y=(screen.availHeight-height)/2-50;

   if(name="") name='win'

   newWin=window.open(filename, name,"width=10,height=10, scrollbars=yes");
   newWin.moveTo(x,y);
   newWin.resizeTo(width,height);
}
