 function measurewindow()
 {
    var x= 640, y= 480; // defaults 
    if (self.innerHeight) 
    // all except Explorer 
    { 
    x= self.innerWidth; 
    y= self.innerHeight; 
    }
    else if (document.documentElement && document.documentElement.clientHeight) 
    // Explorer 6 Strict Mode 
    { 
    x= document.documentElement.clientWidth; 
    y= document.documentElement.clientHeight; 
    }
    else if (document.body) 
    // other Explorers 
    { 
    x= document.body.clientWidth; 
    y= document.body.clientHeight; 
    }
    return new Array(x,y);
} 
function popupWindow(url) {
  pos = measurewindow();
  posx = (pos[0] / 2) - 300;
  posy = (pos[1] / 2);
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=700,height=500,screenX='+ posx +',screenY='+ posy +',top='+ posx +',left='+ posy +'')
}
