  var win = "";

  function checknewwin() {
   if (win != "") {
      try {
         win.focus();
         return false;
      } catch(all) {
        //alert('checked');
         win = "";
      }
   }
   return(false);
  }

  function popup(href,scroll,resize){
   win = window.open(href, "_blank", "width=1, height=1, location=no, menubar=no, status=no, toolbar=no, scrollbars=1, resizable=1");
  return win;
  }


  function to_onclick(obj)
  {
    try
    {
      return hs.htmlExpand(obj, { objectType: 'iframe' ,minWidth: '700', minHeight: '640' ,dragByHeading: 'true' ,align: 'center' ,maxHeight :'640'} );
    }
    catch(all)
    {
      win= popup(obj.href,1,1);
    }
  }
  
  function closepopup()
  {
    if (opener)
    {
  window.close();
  }
else
  {
  try{
    parent.hs.close();
  }
  catch(all)
  {
    }
  
  }
  
}

  
  function GetElement(aID){
     return (document.getElementById) ? document.getElementById(aID)
                                      : document.all[aID];
   }


