

var winReference = null;
function openWindow(url, name, properties, openerName){
	// ie4.x pc can't give focus to windows containing documents from a different domain
   // in this case, initially load a local interstisial page to allow focussing before loading final url
   
	var agent = navigator.userAgent.toLowerCase();
	if (agent.indexOf("msie 4") != -1 && agent.indexOf("win") != -1 && url.indexOf('http://') == 0) {
		winReference = window.open('about:blank', name, properties);
		setTimeout('if (winReference && !winReference.closed) winReference.location.replace("' + url + '")', 300);
	} else {
		winReference = window.open(url, name, properties);
	}
	
	// ie doesn't like giving focus immediately (to new window in 4.5 on mac; to existing ones in 5 on pc)
	setTimeout('if (winReference && !winReference.closed) winReference.focus()', 200);
	if (openerName) self.name = openerName;
	return winReference;
}

function doReset()
{
	document.forms[0].reset();
}

function doSubmit()
{
	document.form1.submit();
}