function checkEnter(e)
{
  var characterCode; 
  if(e && e.which)
  { 
    e = e;
    characterCode = e.which;
  }
  else
  {
    e = event;
    characterCode = e.keyCode;
  }
  if(characterCode == 13) return true; 
  else return false; 
}

<!-- * Return Index No of the This Str from the options -->
function js_pickIndex(opts,str)
{
  for(var i=0;i<opts.length;i++)
     if( opts.options[i].text == str) return i;
  return 0;   
}

function enlarge_image(imageName) 
{
  var args;
  newWindow = window.open("","_blank","width=0,height=0,resizable=1,scrollbars=no,left=50,top=120");
  newWindow.document.open();
  newWindow.document.write('<html><title>Enlarge Image</title><body bgcolor="#FFFFFF" leftmargin="5" topmargin="5" '+ 
                           'marginheight="0" marginwidth="0" onBlur="self.close()"  ' +
                           'onload="window.resizeTo(document.image.width+20,document.image.height+70)"' +
                           '>');
  newWindow.document.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no">');
  args  = '<center><img name="image" src="' + imageName + '" ';
  args += ' /></center>';
  newWindow.document.write(args); 
  newWindow.document.write('</body></html>');
  newWindow.document.close();
  newWindow.focus();
}