var winReference = null;function openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName) {	var agent = navigator.userAgent.toLowerCase();	if (agent.indexOf("mac")!=-1 && agent.indexOf("msie") != -1 && agent.indexOf("msie 5.0")==-1) {		height += 2;		if (status) height += 15;	}	width += (scrollbars != '' && scrollbars != null && agent.indexOf("mac") == -1) ? 16 : 0;                if (!moreProperties || moreProperties == ''){ moreProperties = 'toolbar=1, status=1, resizable=1'; }	var properties = 'width=' + width + ',height=' + height +  ((status) ? ',status' : '') + ',scrollbars' + ((scrollbars) ? '' : '=no') + ((moreProperties) ? ',' + moreProperties : '');	var reference = openWindow(url, name, properties, openerName);	return reference;}function popout(url, width, height, name, scrollbars, status, moreProperties, openerName) {	var x = 0;	var y = 0;	if (screen) x = (screen.availWidth - width) / 2;	if (screen) y = (screen.availHeight - height) / 2;	if (!status) status == '';	if (!openerName) openerName == '';		var reference = openPositionedWindow(url, name, width, height, x, y, status, scrollbars, moreProperties, openerName);}	function openMaxedWindow(url, name, scrollbars, openerName) {	var width  = 600;	var height = 800;	if (screen) width  = screen.width - 10;	if (screen) height = screen.height - 30;	var reference = openPositionedWindow(url, name, width, height, 0, 0, false, scrollbars, openerName, moreProperties);	return reference;}function openFullChromeWindow(url, name, openerName) {	return openWindow(url, name, 'directories,location,menubar,resizable,scrollbars,status,toolbar');}function openWindow(url, name, properties, openerName) {	var agent = navigator.userAgent.toLowerCase();	if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) == 4 && agent.indexOf("msie 5") == -1 && agent.indexOf("msie5") == -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);	}	setTimeout('if (winReference && !winReference.closed) winReference.focus()', 200);		if (openerName) self.name = openerName;	return winReference;}function closeDialog(dialog) {	if (dialog && dialog.closed != true) dialog.close();}function closeParentDialog() {	if (top.opener && isWindowPopup(top.opener)) {		root = top.opener.top.opener;		top.opener.close();		top.opener = root;	}}function isWindowPopup(win) {	return ((win.opener) ? true : false);}function openInParent(location) {	if (window.opener == null) {		self.location.href = location;	} else {		if (!window.opener.closed) {			window.opener.focus();				window.opener.location.href = location; 		} else {			open(location);		};	};};