function CheckEnter(e) 
{
  var keynum;


if(window.event) // IE
  {
  keynum = e.keyCode;
  }
else if(e.which) // Netscape/Firefox/Opera
  {
  keynum = e.which;
  }
 if (keynum==13) 
  
   return true;
 else
   return false;
}
function ChangeTypeOFTheTb(obj,toPassword) 
{
  if (navigator.appName =='Microsoft Internet Explorer') 
    {
       if (toPassword)
       {
          iType='password';
          blankValue= true;
          noFocus=false;
       }
      // else 
       //{
        // iType='text'; 
         //blankValue= false;
          //noFocus=true;

       //}
       //ChangeTypeOFTheTbIE (obj,iType,'Password',blankValue,noFocus);
    }
    else 
    {
 if (toPassword) 
 {
   var newO=document.createElement('input');
    newO.setAttribute('type','password');
     if(obj.value=='Password') 
           newO.value='';
        else 
          newO.value=obj.value;
       
    newO.setAttribute('name',obj.getAttribute('name'));
     newO.setAttribute('id',obj.getAttribute('id'));
    //newO.setAttribute('onblur','ChangeTypeOFTheTb(this,false);');
    obj.parentNode.replaceChild(newO,obj); 
  

      newO.focus();
    
    
  }
 //else 
 //{
   // if (obj.value=='') 
   //{
     // var newO=document.createElement('input');
     // newO.setAttribute('type','text');
      //newO.value='Password';
      //newO.setAttribute('name',obj.getAttribute('name'));
     //newO.setAttribute('id',obj.getAttribute('id'));
     // newO.setAttribute('onfocus','ChangeTypeOFTheTb(this,true);');
      
    //  obj.parentNode.replaceChild(newO,obj); 
   //}
    
  //}
 }
}




function  ChangeTypeOFTheTbIE (
  oldElm, // a reference to the input element
  iType, // value of the type property: 'text' or 'password'
  iValue, // the default value, set to 'password' in the demo
  blankValue, // true if the value should be empty, false otherwise
  noFocus) // set to true if the element should not be given focus 
{  
  if(!oldElm || !oldElm.parentNode || (iType.length<4) || 
    !document.getElementById || !document.createElement) return;
  
  
    var newElm=document.createElement('input');
    newElm.type=iType;
   
  var props=['name','id','className','size','tabIndex','accessKey'];
  for(var i=0,l=props.length;i<l;i++){
    if(oldElm[props[i]]) newElm[props[i]]=oldElm[props[i]];
  }
  newElm.onfocus=function(){return function(){
    if(this.hasFocus) return;
    var newElm=ChangeTypeOFTheTbIE (this,'password',iValue,
      (this.value.toLowerCase()==iValue.toLowerCase())?true:false);
    if(newElm) newElm.hasFocus=true;
  }}();
  newElm.onblur=function(){return function(){
    if(this.hasFocus)
    if(this.value=='' || (this.value.toLowerCase()==iValue.toLowerCase())) {
     // ChangeTypeOFTheTbIE (this,'text',iValue,false,true);
    }
  }}();
 // hasFocus is to prevent a loop where onfocus is triggered over and over again
  newElm.hasFocus=false;
  // some browsers need the value set before the element is added to the page
  // while others need it set after
  if(!blankValue) newElm.value=iValue;
  oldElm.parentNode.replaceChild(newElm,oldElm);
  if( !blankValue) newElm.value=iValue;
  if(!noFocus || typeof(noFocus)=='undefined') {
    window.tempElm=newElm;
    setTimeout("tempElm.hasFocus=true;tempElm.focus();",1);
  }
  return newElm;
}
