<!--

flashfix = function() {
	theObjects = document.getElementsByTagName("object");
	for (var i = 0; i < theObjects.length; i++) {
		theObjects[i].outerHTML = theObjects[i].outerHTML;
	}
} 

if (window.attachEvent) {
	window.attachEvent("onload", flashfix)
}
else {
	window.onload=flashfix;
}

function windowit(theURL, winName, W, H, doscroll, doresize) {
	W = isNaN(W) ? 640 : W;
	H = isNaN(H) ? 480 : H;

	windowX = Math.ceil((window.screen.width - W) / 2);
	windowY = Math.ceil((window.screen.height - H) / 2)-20;

	var doscroll=(doscroll==1) ? "yes" : "no";
	var doresize=(doresize==1) ? "yes" : "no";
	var winName=String(winName);
	var popup=null;

	var settings ='height='+H+',';
		settings +='width='+W+',';
		settings +='top='+windowY+',';
		settings +='left='+windowX+',';
		settings +='scrollbars='+doscroll+',';
		settings +='resizable='+doresize+'';

	popop=window.open(theURL, winName, settings);
}

function closewindow() {
	if (window.opener && !window.opener.closed) {
		window.opener.location="../index.html";
		window.self.close();
	}
	else { // if there's no parent
		window.self.location="../index.html";

		//get current window size
		if (document.layers) {
		     w = window.innerWidth;
		     h = window.innerHeight;
		}
		if (document.all) {
		     w = document.body.clientWidth;
		     h = document.body.clientHeight;
		}
		//maximize if window is too small
		if (w < window.screen.availWidth || h < window.screen.availHeight) {
			window.moveTo(0,0);
			window.resizeTo(window.screen.availWidth, window.screen.availHeight);
		}
	}
}
//-->