
function popUp(URL,width,height)
{
	day = new Date();
	id = day.getTime();
	var winLeft = (screen.width - width) / 2;
	var winUp = (screen.height - height) / 2;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left='+winLeft+',top='+winUp);");
}

function contact_by_mail(user, domain, suffix, content) {
	if (!content) {
		document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');
	} 
	else {
		document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + content + '</a>');
	}
	return true;
}

function resizeColumns() {
	var left_column = document.getElementById("layout_column_left").offsetHeight;
	var center_column = document.getElementById("layout_column_center").offsetHeight;
	var right_column = document.getElementById("layout_column_right").offsetHeight;
	var center_hor = document.getElementById("center_hor").offsetHeight;
	
	var header_height = document.getElementById("layout_header").offsetHeight;
	var bottom_height = document.getElementById("layout_bottom").offsetHeight;
	
	if(center_hor > left_column && center_hor > center_column && center_hor > right_column) {
		document.getElementById("layout_column_left").style.height = center_hor - header_height - bottom_height + "px";
		document.getElementById("layout_column_center").style.height = center_hor - header_height - bottom_height + "px";
		document.getElementById("layout_column_right").style.height = center_hor - header_height - bottom_height + "px";
	}
}

