function window_open(url,name,left,top,width,height,form)
{
  if (height<0)
  {
    height = window.innerHeight+height;
    height = height<300?300:height;
  }
  wnd = window.open(url,name,'left='+left+',top='+top+',width='+width+',height='+height+',resizable=yes,scrollbars=yes,location=no');
  wnd.focus();
  if (form!=null)
    form.submit();
    //alert(form);
}

//common widow extents
function GetYScroll()
{
  if (document.documentElement && document.documentElement.scrollTop) // Explorer 6 Strict
    return document.documentElement.scrollTop;
  else if (document.body) // all other Explorers
    return document.body.scrollTop;
  else                    // gecko
    return window.pageYOffset;
}

function GetWindowHeight()
{
  if (self.innerHeight)         // all except Explorer
    return self.innerHeight;
  else if (document.documentElement && document.documentElement.clientHeight)  // Explorer 6 Strict Mode
    return document.documentElement.clientHeight;
  else if (document.body) // other Explorers
    return document.body.clientHeight;
}
