function checkPasses(one,two)
{
   var pass=document.getElementById(one).value;
   var pass2=document.getElementById(two).value;

   if(pass!=pass2)
   {
    alert ("Passwords dont match!");
   }
}

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(".")<1)
      {
         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);
}


function validateCusip(fld)
{
	lines=fld.value.split(/\r?\n|\r/);
	numLines=lines.length;
	if(numLines>25)
	{
		lines=lines.slice(0,25);				
		fld.value=lines.join("\n");		
		return false;
	}
	return true;
}