<!--
//#### BORDERLESS POP-UP WINDOW SCRIPT ####
//#### Opens a borderless pop-up window for speaker bio's and abstracts. ####
//#### Works in IE only, title bar and border appear in other browsers. ####

//BROWSER DETECTION INFO
browserVer = parseInt(navigator.appVersion);
var opera = (window.opera ? true : false);
if ((navigator.appName.indexOf("Microsoft") != -1) && (opera == false)){
	var IE = true;
} 
var NN = (navigator.appName.indexOf("Netscape") != -1);
var NN4	=(NN==true && browserVer >=4 && browserVer <5 );
var NN6	=(NN==true && browserVer >=5);

//SET POP-UP WINDOW'S DIMENSIONS AND POSITION
if (browserVer >= 4){
    var ScreenWidth=window.screen.width;
    var ScreenHeight=window.screen.height;
	popupWidth=250;
	popupHeight=ScreenHeight/2+50;
	if (opera) {popupHeight=ScreenHeight/2} //because Opera places the pop-up lower than other browsers

	if (ScreenWidth >= 1024){
		popupPosX=ScreenWidth-popupWidth-30;
	    popupPosY=ScreenHeight/4;
	} else {
	   popupPosX=6;
	   popupPosY=ScreenHeight/4;
	}
} else {
	   popupWidth=250;
	   popupHeight=300;
   	   popupPosX=6;
	   popupPosY=200;
}

//SET POP-UP WINDOW'S TOP FRAME HEIGHT
var topFrameHeight = 25;
if (IE){ topFrameHeight = 23 };
if (NN4){ topFrameHeight = 27 };
if (NN6){ topFrameHeight = 25 };
//if (opera){ topFrameHeight = 26 };


//OPEN BORDERLESS POP-UP WINDOW & WRITE FRAMESET
function openPopUp(popUpURL, popUpTitle){
	//Bug in Opera browser fails to display vertical scrollbar, 
	//so if Opera, load document directly into pop-up window:
	if (opera){ 
		popUp = window.open(popUpURL,"speakerWindow","fullscreen,width="+popupWidth+",height="+popupHeight) ;
	} else {
		popUp = window.open("","speakerWindow","fullscreen,width="+popupWidth+",height="+popupHeight) ;
	}

	popUp.blur()
	window.focus() 
	popUp.resizeTo(popupWidth,popupHeight)
	popUp.moveTo(popupPosX,popupPosY)
	var frameString=""+
	"<html>"+
	"<head>"+
	"<title>"+popUpTitle+"</title>"+
	"</head>"+
	"<frameset rows='"+topFrameHeight+",*' framespacing=0 border=0 frameborder=0>"+
	"<frame name='topFrame' src='popup-TopFrame.htm' scrolling='no'>"+
	"<frame name='contentFrame' src='"+popUpURL+"' scrolling=auto>"+
	"</frameset>"+
	"</html>"
	
	//bug in Opera browser fails to display vertical scrollbar,
	//so if Opera, don't write the frameset into the pop-up window
	if (opera==false){ 
		popUp.document.open();
		popUp.document.write(frameString);
		popUp.document.close();
	}
	
	popUp.focus();

//CLOSE POP-UP WHEN THIS WINDOW IS CLOSED
	window.onunload = function(){popUp.close()}
}
//-->
