
jQuery(document).ready(function($) {
	
	
	checkBoxHeights(jQuery) ;
	
}) ;

function checkBoxHeights($) {
	var maxH ;
	if ($('#col2Left').is(':visible')) {
		maxH = Math.max($('#col2Left .medium-box-bottom').height(), $('#col2Right .medium-box-bottom').height()) ;
		$('#col2Left .medium-box-bottom').height(maxH + 'px') ;
		$('#col2Right .medium-box-bottom').height(maxH + 'px') ;
	} else if ($('#col3Left').is(':visible')) {
		maxH = Math.max($('#col3Left .small-box-bottom').height(), $('#col3Mid .small-box-bottom').height(), $('#col3Right .small-box-bottom').height()) ;
		$('#col3Left .small-box-bottom').height(maxH + 'px') ;
		$('#col3Mid .small-box-bottom').height(maxH + 'px') ;
		$('#col3Right .small-box-bottom').height(maxH + 'px') ;
	}
}

function popWinOpen(winW,winH,sUrl,sName,iResize,iScroll,iStatus) {
	var winX, winY ;
	if (screen) {
		if ((screen.height - winH) < 150) {
			winX = (screen.width - winW) / 2;
			winY = 0;
		} else {
			winX = (screen.width - winW) / 2;
			winY = (screen.height - winH) / 2;
		}
		var popWindow = window.open(sUrl,sName,"resizable=" + iResize + ",menubar=0,scrollbars=" + iScroll + ",status=" + iStatus + ",width=" + winW + ",height=" + winH + ",top=" + winY + ",left=" + winX + "");
		if (popWindow) popWindow.focus();
	} else {
		window.open(sUrl,sName,"resizable=" + iResize + ",menubar=0,scrollbars=" + iScroll + ",status=" + iStatus + ",width=" + winW + ",height=" + winH);
	}
}

function getElementTop(el) {
	try {
		if (!el && this) {
			el = this ;
		}
		var posTop = el.offsetTop ;
		var elPar = el.offsetParent ;
		while (elPar != null) {
			posTop += elPar.offsetTop ;
			elPar = elPar.offsetParent ;
		}
		return isNaN(posTop) ? -1 : posTop;
	} catch (e) {
		return -1 ;
	}
}
