// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::			     Mega Popup Window Script       	  :::
// :::::			   Created by Justin Stephenson   		  :::
// :::::			 6/29/01; last revised 06/29/01 		  :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

var megaPopupWin = null;
lastName = null;

function megaPopup(URL,flexType,windowType,width,height,screenHorizPosition,screenVertPosition,stackOrder,temporaryName) {
	if	(screenHorizPosition == 'center')	{ leftPosition = (screen.width) ? (screen.width - width)/2:100; }
		else { leftPosition = screenHorizPosition; }
	if	(screenVertPosition == 'center')	{ topPosition = (screen.height) ? (screen.height - height)/2:100; }
		else { topPosition = screenVertPosition; }
	if (windowType == 'full') { styleAttributes = "toolbar=yes,location=yes,directories=yes,menubar=yes,status=yes"; } else if (windowType == 'basic') { styleAttributes = "toolbar=yes,location=no,directories=no,menubar=no,status=no"; } else if (windowType == 'bare') { styleAttributes = "toolbar=no,location=no,directories=no,menubar=no,status=no"; } else { styleAttributes = "toolbar=yes,location=yes,directories=yes,menubar=yes,status=yes"; }
	if (flexType == 'frozen') { flexAttributes = "scrollbars=no,resizable=no"; } else if (flexType == 'rigid') { flexAttributes = "scrollbars=yes,resizable=no"; } else if (flexType == 'loose') { flexAttributes = "scrollbars=yes,resizable=yes"; } else { flexAttributes = "scrollbars=yes,resizable=yes"; }
	if (width == 'total') { width = screen.width; }
	if (height == 'total') { height = screen.height; }
	// *** consider a browser sniff to serve screenX and screenY to Navigator 4 ***
	windowAttributes = 'width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',' + styleAttributes + ',' + flexAttributes;
	// if the temporary and last names match, the popup is repopulating an existing window; the existing window must be closed to allow its replacement to use new and different style, flexibility, and position attributes
	if (temporaryName == lastName) { if (megaPopupWin != null && !megaPopupWin.closed) { oldWin = megaPopupWin; oldWin.name = "oldWin"; oldWin.close(); } }
	lastName = temporaryName;
	megaPopupWin = window.open(URL,temporaryName,windowAttributes);
	if (stackOrder == 'top') { megaPopupWin.focus(); megaPopupWin.location = URL; }
		else if (stackOrder == 'bottom') { megaPopupWin.blur(); megaPopupWin.location = URL; megaPopupWin.blur(); self.focus(); }
}


// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::			   Picture Popup Window Script            :::
// :::::			  Created by Justin Stephenson            :::
// :::::			 09/21/01; last revised 09/21/01          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

var picPopupWin = null;

function picPopup(URL) {
	width=420;
	height=425;
	leftPosition = (screen.width) ? (screen.width - width)/2:100;
	topPosition = (screen.height) ? (screen.height - height)/2:100;
	picPopupWin = window.open(URL,'photo_loading','width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}


// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::				  Closewindow Script		          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

function closeWin()
	{
		this.close();
		PrintWindow = null;
	}
	
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::				 Streaming Player    		          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

if(navigator.appVersion.indexOf("AOL") > -1)
 {

 //AOL

 var opt1 = 'width=472,height=257';

 var opt2 = 'width=472,height=257';

 } else if(navigator.platform.indexOf("Win") > -1)

 {

 //IE and NS Windows

 var opt1 = 'width=472,height=257,top=420,left=520,screenY=420,screenX=520';

 var opt2 = 'width=472,height=257,top=250,left=300,screenY=250,screenX=300';

 } else if(navigator.platform.indexOf("Mac") > -1)

 {

 //IE and NS Mac

 if(navigator.appName.indexOf("Microsoft") > -1)


 {
 var opt1 = 'width=455,height=240,top=420,left=520,screenY=420,screenX=520';
 var opt2 = 'width=455,height=240,top=250,left=300,screenY=250,screenX=300';
 } else if(navigator.appName.indexOf("Netscape") > -1)
 {
var opt1 = 'width=472,height=257,top=420,left=520,screenY=420,screenX=520';
 var opt2 = 'width=472,height=257,top=250,left=300,screenY=250,screenX=300';
 }
 }
 function openPlayer(URL)
    {
    if(screen.width >= 1000)
 {
 window.open(URL,'Streamaudio_Player',opt1);
 }
    if(screen.width <= 800)
 {window.open(URL,'Streamaudio_Player',opt2);
 }
}	