var gregWind;
function fnRegWind(url,hashAnchor,htpx,widpx){
var regWind;
var locationStr;
var htpx,widtx;
if (!hashAnchor=="")
   {locationStr = url + "#" + hashAnchor;}
else
   { locationStr = url;}   
if ( htpx == "")
   { htpx = "HEIGHT = 375";}
else
   { htpx = "HEIGHT = " + htpx;}   
if ( widpx == "")
   { widpx = "WIDTH = 400";}   
else
   { widpx = "WIDTH =" + widpx;}
           
if (regWind)
   {
       regWind.focus();
       regWind.location.hash = hashAnchor;
   }
   else
   {
   regWind = window.open(locationStr,"regWindow",htpx+","+widpx+" top=50,left=0,dependent,resizable,status=no,scrollbars=yes,alwaysRaised");
// this is to declare a global object variable so that the window can be closed using onunload function in the body tag
   gregWind = regWind;
   regWind.focus();
   }

}

