function isEmpty(textcontrol)
         {
         str = textcontrol.value
         for (i = 0; i < str.length; i++)
             {
             chr = str.substring(i, i + 1);
             if (chr != ' ')
                {
                return false;
                }
             }
         return true;
         }

function isEmail(textcontrol)
         {
         str = textcontrol.value;
         re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

         return (re.test(str));
         }

function getSelected(object)
         {
         for (var i = 0; i < object.length; i++)
             {
             if (object[i].selected) return(object[i].value);
             }
         }

function popUp(url,id,width, height)
         {
         var left = (screen.width / 2) - (width / 2);
         var top = (screen.height / 2) - (height / 2);

         window1 = open(url,id,'status=no,menubar=no,scrollbars=yes,width='+width+',height='+height+',resizable=no,left='+left+',top='+top);
         window1.focus();
         }

function popUp1(url,id,width, height)
         {
         var left = (screen.width / 2) - (width / 2);
         var top = (screen.height / 2) - (height / 2);

         window1 = open(url,id,'status=no,menubar=no,scrollbars=no,width='+width+',height='+height+',resizable=no,left='+left+',top='+top);
         window1.focus();
         }

function Enterhit()
         {
         if (window.event.keyCode == 13) return true;
         else return false;
         }

function submitOnEnter()
         {
         if (Enterhit()) doSubmit();
         }