//Open pop-up window - Centered
function openWin(url, type, height, width) {
  var setup = "";
  var top = ((screen.height-height)/2);
	var left = ((screen.width-width)/2);
  if (type=='Win') {
    setup = "resizable=1,statusbar=1,menubar=1,toolbar=1,location=1";
    top = screen.height-(height+150);
    left = (screen.width-width)-10;
  }
  if (type=='Pop')
    setup = "resizable=0,statusbar=0,menubar=0,toolbar=0,location=0";
  if (type=='WinCenter') {
    setup = "resizable=1,statusbar=1,menubar=1,toolbar=1,location=1";
    top = top - 25; 
  }
  var win1 = window.open(url, "pupupWin", setup+",scrollbars=1,height="+height+",width="+width+",top="+top+",screeny="+top+",left="+left+",screenx="+left);
  win1.focus();
}

function moreInfo(url, width, height) {
  document.write('<A HREF="javascript:openWin(\''+url+'\', \''+width+'\', \''+height+'\', \'Pop\')">');
  document.write('  <IMG SRC="/common/images/infoIcon.gif" WIDTH="14" HEIGHT="14" ALT="More Infomation" BORDER="0">');
  document.write('</A>');
  
}

//Close/keep focus Popup Window
var flag1=false
function doOnLoad(){
	flag1=false
	if((navigator.appName.indexOf("Netscape")!=-1)&&(navigator.appVersion.indexOf("Mac")==-1)){
		window.captureEvents(Event.MOUSEDOWN);
		window.onmousedown=windowClicked;
	}
}

function windowClicked(ev){
	if(ev.which!=0) flag1=true;
}
function doOnBlur(state){
	if(flag1==false){
		if((navigator.appName.indexOf("Netscape")!=-1)&&(navigator.appVersion.indexOf("Mac")==-1))
			window.releaseEvents(Event.MOUSEDOWN);
		if (state == "close")	
			self.close();
		if (state == "focus")
      self.focus();
	}
	else {
		flag1=false;
	}
}
//End close/keep focus Popup Window


