

twerkStopLink = false;

function updateHref(href){
	if(twerkStopLink==false){
		this.location.href= href;
	}
	twerkStopLink = false;
}

function openWindow(href, width, height){
	twerkStopLink = true;
	newWin = window.open(href, 'ticket', 'width=' + width + ', height=' + height + ', scrollbars=yes, resizable=yes');
	newWin.focus();
}



function checkColumnHeight(){
	var col1 = "infobox"; 
	var col2 = "content_main"; 
	var diff = 449;  
	var alienFactor = 31;

	col1Height = document.getElementById('infobox').offsetHeight;
	col2Height = document.getElementById('content_main').offsetHeight;
	
	if((col1Height + diff) > col2Height){ // col1 grösser col2
		addHeight =  (col1Height + diff) - col2Height;
		newHeight = col2Height + addHeight;
		document.getElementById(col2).style.height = (newHeight - alienFactor - 50 ) + 'px';
		document.getElementById(col1).style.height = (col1Height) + 'px';
		
	} else if ((col1Height + diff) < col2Height) { // col2 grösser col1
		addHeight = col2Height - (col1Height + diff);
		newHeight = col1Height + addHeight + alienFactor;
		document.getElementById(col1).style.height = newHeight + 'px';
		document.getElementById(col2).style.height = (col2Height - alienFactor - 20) + 'px';
	}
} 



