/* Original:  Eric King (eric_andrew_king@hotmail.com)
   Web Site:  http://redrival.com/eak/
   Mods    :  Sarah Houck (Elmer@lindenashby.org)
   Web Site:  The Linden Ashby Worshiping Page
 The type variable refers to how big the window is
 filmography = popups for the filmography */

function NewWindow(mypage, type, width, height) {

var ua=navigator.userAgent;
var myname='name';

if (ua.indexOf('Opera')!=-1) { 
	var screenw=screen.width; 
	var screenh=screen.height - 199; 
}
else { 
	var screenw=screen.width; 
	var screenh=screen.height; 
}

if (type == 'filmography') { 
	var winw = screenw * .5;
	var winh = screenh * .65;
	var scroll='yes';
}
else if (type == 'smallnews') { 
	var winw = screenw * .5;
	var winh = screenh * .65;
	var scroll='yes';
}
else if (type == 'bignews') { 
	var winw = screenw * .75;
	var winh = screenh * .65;
	var scroll='yes';
}
else if (type == 'picture') {
	width = width + 110;
	height = height + 150;
	
	if (screenw > width) { var winw = width; }
	else { var winw = screenw * .75; }
	
	if (screenh > height) { var winh = height; }
	else { var winh = screenh * .75; }
	
	var scroll='yes';
}	
else { 
	var winw = screenw * .5;
	var winh = screenh * .65;
	var scroll='yes';
}


var winl=(screenw - winw) / 2;
var wint=(screenh - winh) / 2;

winprops = 'height='+winh+',width='+winw+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'

win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}