


/**
 * Set the height og the columns on load of the document not on DOM ready. If dom ready would have 
 * been used some pictures might not have been loaded yet and the height might be incorrect.
 */
window.onload = function() {
	setColumnHeight();	
}


/**
 * Sets the height of the three column layout equal for all of the columns.
 */
function setColumnHeight() {
	// find the height of the tallest of the three columns
	var height = $(".threeCol .left").height();
	var centerPadding = $(".threeCol .center").css("padding");
	// the center column has 10 pixels of padding on top and bottom
	height = height > $(".threeCol .center").height() + 20 ? height : $(".threeCol .center").height() + 20;
	height = height > $(".threeCol .right").height() ? height : $(".threeCol .right").height();

	// set all columns to the tallest height
	$(".threeCol .left").height(height);
	// the center column has 10 pixels of padding on top and bottom
	$(".threeCol .center").height(height - 20);
	$(".threeCol .right").height(height);
}

/**
 * Sets the height of the three column layout equal for all of the columns.
 * Used in pages showing articles containing a scroll image gallery.
 */
function setColumnHeightGallery() {
	// find the height of the tallest of the three columns
	var height = $(".threeCol .left").height();
	var centerPadding = $(".threeCol .center").css("padding");
	// the center column has 10 pixels of padding on top and bottom
	height = height > $(".threeCol .center").height() + 20 ? height : $(".threeCol .center").height() + 20;
	height = height > $(".threeCol .right").height() ? height : $(".threeCol .right").height();

	// set all columns to the tallest height
	$(".threeCol .left").height(height + 50);
	// the center column has 10 pixels of padding on top and bottom
	$(".threeCol .center").height(height + 30);
	$(".threeCol .right").height(height + 50);
}

/**
 * Sets the height of the three column layout equal for all of the columns.
 * Used in pages showing articles containing a scroll image gallery.
 */
function setColumnHeightImageCarousel() {
	// find the height of the tallest of the three columns
	var height = $(".threeCol .left").height();
	var centerPadding = $(".threeCol .center").css("padding");
	// the center column has 10 pixels of padding on top and bottom
	height = height > $(".threeCol .center").height() + 20 ? height : $(".threeCol .center").height() + 20;
	height = height > $(".threeCol .right").height() ? height : $(".threeCol .right").height();

	// set all columns to the tallest height
	$(".threeCol .left").height(height + 150);
	// the center column has 10 pixels of padding on top and bottom
	$(".threeCol .center").height(height + 130);
	$(".threeCol .right").height(height + 150);
}


function popup(Site,wName,wWidth,wHeight)
	{
		window.open(Site,wName,'toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=' + wWidth + ',height=' + wHeight);
	}
	
function popUpWin (obj,port) {
	obj.style.color='#999999';
	s = 'http://194.143.62.24/web/basic/hal_commoncontacts.nsf/Ports/'+ port +'?open';
	h = '500';
	w = '520';
	x = '150';
	y = '100';
  window.open(s, '','toolbar=no,width=' + w + ',height=' + h + ',directories=no,dependent=no,status=yes,scrollbars=auto,resizable=no,menubar=no,screenX=' + x + ',screenY=' + y +',left=' + x + ',top=' + y)
	  
}



