// JavaScript Document
function checkEmail(email) 
{
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   if(reg.test(email) == false) 
   {
      return false;
   }
   
}
function trim(str)
{
    if(!str || typeof str != 'string')
        return null;
    return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
}

hex=255 // Initial color value.
function fadetext() //function for blinking messages
{ 
  if(hex>0) 
  { //If color is not black yet
    hex-=17; // increase color darkness
    document.getElementById("msg").style.color=
                      "rgb("+hex+","+hex+","+hex+")";
    setTimeout("fadetext()",400); 
  }
  else
    hex=255 //reset hex value
} //function




