<!-- $Id: global_functions.js,v 1.4 2003/07/23 10:09:09 alex Exp $ //-->

<!-- Global functions //-->
function openWindow(url,params) {
        window.open(url,'',params)
}
function write_spacer() {
	screen_height = (document.all) ? document.body.offsetHeight : window.innerHeight;
	temp = (screen_height / 2)-35;
	screen_height = (temp > 0) ? temp : 0	;
	document.write('<img src="/gfx/spacer.gif" width=1 height='+screen_height+' border=0');
}

function write_td(valign, align) {
	screen_width = (document.all) ? document.body.offsetWidth : window.innerWidth;
	temp = (screen_width / 2);
	screen_width = (temp > 0) ? temp : 0	;
	document.write('<td width="'+screen_width+'" valign="'+valign+'" align="'+align+'">');
}

function mainWindow(url) {
	parent.opener.location.href=url;
	self.close();
}

function sw_open_centered_window (u, n, w, h, p) {
	lp = (screen.width) ? (screen.width - w) / 2 : 100;
	tp = (screen.height) ? (screen.height - h) / 2 : 100;
	return window.open (u, n, 'width='+w+',height='+h+',top='+tp+',left='+lp+','+p);
}

