<!--
/* deal with file upload - Hui Zhou erg */
extArray = new Array(".doc", ".pdf", ".wpd");
function LimitAttach(form, file) {
allowSubmit = false;
if (file =="")
	{
		alert("Please attach a file first.");
		return false;
	}	
if (!file) return;
while (file.indexOf("\\") != -1)
	file = file.slice(file.indexOf("\\") + 1);
	ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (extArray[i] == ext) { allowSubmit = true; break; }
}
if (allowSubmit) form.submit();
else
	alert("Please only upload files that end in types:  " 
+ (extArray.join("  ")) + "\nPlease select a new "
+ "file to upload and submit again.");
	return false;
}
/* deal with pop-up window - Hui Zhou erg for special loaction of popup window 
var popup_window=null
	var w = 0;
	var h = 0;
function PopupWindow_dep(url,w,h)
	{
	if (window.screen) {
	var srnwidth = screen.availWidth;
	var srnmount = screen.availHeight;

	popup_window = window.open(url, "Important", 'width=250,height=30' + ',left=' + ((srnwidth - w - 10) * .5) + ',top=' + ((srnmount - h - 30) * .5));
	}
}
*/
var popup_window=null
function MM_openBrWindow(theURL,winName,features) { //v2.0
  popup_window=window.open(theURL,winName,features);
}  
function blowOut() {
  if (popup_window != null && popup_window.open) popup_window.close();
}
window.onfocus=blowOut;


//  End -->
