
function NewWindow(mypage, myname, w, h, scroll, hOff, vOff) {
	if (NewWindow.arguments.length < 2 || NewWindow.arguments[1] == "")
		myname		= "uploader";
	if (NewWindow.arguments.length < 3 || NewWindow.arguments[2] == "")
		w			= 500;
	if (NewWindow.arguments.length < 4 || NewWindow.arguments[3] == "")
		h			= 400;
	if (NewWindow.arguments.length < 5 || NewWindow.arguments[4] == "")
		scroll		= "yes";
	if (NewWindow.arguments.length < 6 || NewWindow.arguments[5] == "")
		hOff		= 0;
	if (NewWindow.arguments.length < 7 || NewWindow.arguments[6] == "")
		vOff		= 0;

	var winl = (screen.width - w) / 2;
	if (hOff)
		winl = winl + hOff;
	var wint = (screen.height - h) / 2;
	if (vOff)
		wint = wint + vOff;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no';
	alert(mypage);
	
	win = window.open(mypage, myname, winprops)

	if (parseInt(navigator.appVersion) >= 4) { 
		win.window.focus();
	}
}

function openWin(url, winName, w, h){
	OpenChildWindow(url, winName, "width="+w+",height="+h+",top=50,left=220,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=no,location=0,scrollbars=1,copyhistory=0");
}

function OpenChildWindow(childURL, childName, childFeatures){
	g_childWindow = window.open(childURL, childName, childFeatures);
}

function openVideoWin(url) {
	openWin(url, "VideoWindow", 380, 300);
}
