function open_in_popup_window(url, name, width, height) {
	window.open(url.href,name,'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	return false;
}
function open_in_new_window(url) {
	window.open(url.href,'external_link','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
	return false;
}

function switchTab(trigger, targetId, openPanel) {
	target = document.getElementById(targetId);
	//showHide = document.getElementById('showHide'); // stops bar from working in ie
	targetParent = target.parentNode;
	triggerParent = trigger.parentNode;
	for(i=0; i<targetParent.childNodes.length; i++) {
		targetParent.childNodes[i].className = "hidden";
	}
	
	target.className = "";
	for(i=0; i<triggerParent.childNodes.length; i++) {
		triggerParent.childNodes[i].className = "";
	}
	trigger.className = 'current';
	if(openPanel) {
		if (!$("#tabs_nav a#showHide").hasClass('hide')) {
			$("#content_tabs").slideDown('400');
			$("#tabs_nav a#showHide").addClass("hide");
		}
	}
}

$(document).ready(function () {
	
	//code for applying alternating row classes for tables
	table = $("table.data_table tbody");
	row = table.find('tr:first').next();
	num = 0;
	
	for (i=0;i<=50;i++) {
		num++;
		if(num==1) row.addClass('even');
		else if(num==2) {
			num=0;
		}
		row = row.next();
	}
	
	//code adding slide control to bottom panels
	$("#tabs_nav a#showHide").click(function()
	{
   		$("div#content_tabs").slideToggle(500);
		if ($(this).hasClass('hide')) {
				$(this).removeClass('hide').addClass('show');
		}
		else $(this).removeClass('show').addClass('hide');
	});

});