
var is
is=new browserHandling()
function browserHandling(){
	this.IE=0
	this.NS=0
	this.element=(document.getElementById) ? 1 : 0
	this.NSapp=(navigator.appName=="Netscape") ? 1 : 0
	this.IEapp=(navigator.appName=="Microsoft Internet Explorer") ? 1 : 0
	var ual=navigator.userAgent.toLowerCase()
	this.OPERAapp=(ual.indexOf("opera") != -1)
	this.MAC=(ual.indexOf("mac") != -1)
	this.WIN=(ual.indexOf("windows") != -1)
	this.appver=navigator.appVersion
	if(this.IEapp)
		this.IE=(document.all) ? 1 : 0
	else if(this.NSapp && !this.element)
		this.NS=(document.layers) ? 1 : 0
	if(this.NSapp)
		this.version=parseFloat(this.appver)
	else
		this.version=parseFloat(this.appver.substr(this.appver.indexOf("MSIE") + 5, 3))
	this.GECKO=(ual.indexOf("gecko") != -1)
	this.FIREFOX=(ual.indexOf("firebird") != -1||ual.indexOf("firefox") != -1)
	this.NS6=(ual.indexOf("netscape6/6") != -1)
	this.MEDIAPLAYER=(this.GECKO && ual.indexOf("(ax") != -1) || (this.IE && this.version >= 5 && !this.OPERAapp)
}

function getObj(id){
	if(is.NS) 
		return document.layers[id]
	else if(is.element)
		return document.getElementById(id)
	else if(is.IE)
		return document.all[id]
	else
		return -1
}

function popper(link,w,h){
		var winLeft = (screen.width - w) / 2;
		var winUp = (screen.height - h) / 2;
		var wind=open(link,"D","toolbar=no,directories=no,menubar=no,scrollbars=yes,status=no,left="+winLeft+",top="+winUp+",resizable=0,width="+w+",height="+h);
	}

function height_fix () {

	var menu = getObj("menu");
	var main = getObj("main_content");
	var right = getObj("right");
	
	var heights = [menu.offsetHeight,main.offsetHeight,right.offsetHeight];
	heights.sort(descending);
	
	var heights_string = new String(heights);
	var max_height = heights_string.split(",");

	main.style.height = max_height[0] + "px";
}

function ascending(a,b){
return a-b;
}

function descending(a,b){
return b-a;
}
