function sortNumber(a,b){
	setSortOrder = b - a;
	return setSortOrder
}

/**	Set allar kolonnir til somu hædd eftir teirri kolonnu við mesta innihaldinum
*	Dávur Eyðunsson Sørensen
*	24-06-2004
*/

function adjustColHeights(cols){ 
	var col = cols.split("*"), colheights = new Array(col.length),defaultHeight=400; 
	for(s = 0; s < col.length; s++){
		colheights.push(document.getElementById(col[s]).offsetHeight);
	}
	x = colheights.sort(sortNumber);
	setHeight = x[0];
	setHeight = (setHeight< defaultHeight)?defaultHeight:setHeight;
	for(t in col){
		document.getElementById(col[t]).style.height = setHeight+"px";
	}
	document.getElementById("content-body").style.height=(setHeight+10) + "px";
	document.getElementById("content-body").style.minHeight=(setHeight+4) + "px";
}

/** Tillaga breiddina av innihaldinum eftir breiddini á skíggjanum
*	Dávur Eyðunsson Sørensen
*	14-01-2006
*/
function adjustDisplayWidth()
{
	if(document.getElementById)
	{
		displayWidth = screen.width;
		setWrapperWidth = (displayWidth<=1024)?980:1024;
		document.getElementById("wrapper").style.width=setWrapperWidth+"px";
	}
}

function openFOB(url)
{
	sw = screen.width;
	newPosX = ((sw-700)/3)*2;
	window.open(url,Math.floor(Math.random()*1000),"width=700,height=420,scrollbars=yes,left="+newPosX+",screenX="+newPosX+",top=25,screenX=25");
}
