jQuery.noConflict();

function gotoURL(sLink){
	window.location.href=sLink;
}
function swapClass(e,className){
	document.getElementById(e).className=className;	
}
function showSubMenu(menu, station){
	positionMenu(menu,station);
	document.getElementById(menu).style.display='block';	
}
function hideSubMenu(menu){
	document.getElementById(menu).style.display='none';		
}
function positionMenu(menu, station){
	var obj = document.getElementById(station)
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	document.getElementById(menu).style.top=curtop+10+"px"
	document.getElementById(menu).style.left=curleft-300+"px"
	document.getElementById(menu).style.display='block';
}
function showLarge(imgNo){
	document.getElementById("mainTHimg").src='images/gallery/LP_'+imgNo+'.jpg';
}

var clientWidth = 0; var clientHeight = 0;

function getdims() {
	if( typeof( window.innerWidth ) == 'number' ) { 
		//Non-IE 
			clientWidth = window.innerWidth;
			clientHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			clientWidth = document.documentElement.clientWidth;
			clientHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible 
			clientWidth = document.body.clientWidth; clientHeight = 
			document.body.clientHeight;
	}
}

function checkResolution() {
	getdims();
	if (clientWidth < 960) {
		jQuery("#mainContainer").css({"margin-left":"0px"});
		jQuery("#mainContainer").css({left:"0px"});
	} else {
		var newleftmargin = (clientWidth/2)+"px";
		jQuery("#mainContainer").css({"margin-left":"-490px"});
		jQuery("#mainContainer").css({left:"50%"});
	}
}

jQuery(document).ready(function() {
	checkResolution();
	jQuery(window).resize(checkResolution);
});
