<!--
//
var myWidth = 0, myHeight = 0;

function popup(mylink, windowname) {
  alertSize();

  if (myWidth > 1000) { w = myWidth*0.4 }
                 else { w = 370 };
  h        = 370;
  posLeft  = 400;
  posTop   = 50;
        
  params = 'width='+w+',height='+h+',left='+posLeft+',top='+posTop;
  params = params+',screenX='+posLeft+',screenY='+posTop;
  params = params+',location=no,scrollbars=yes,toolbar=no,menubar=no,resizable=yes,status=no'; 
  window.open(mylink,windowname,params);
 }

function alertSize() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
}

// -->
