// JavaScript Document
function hoverImg(img){
	if (img.id == 'prev'){
		img.style.background = "url('http://beta.visuale.com.au/images/ImgBtnLeft.png') no-repeat 5% 50%";
		$('prev').className = "halves imgPrev";
	}
	if (img.id == 'next'){
		img.style.background = "url('http://beta.visuale.com.au/images/ImgBtnRight.png') no-repeat 90% 50%";
		$('next').className = "halves left imgNext";
	}
}
function imgOver(m){
m.childNodes[0].className='shown';
}
function imgOut(m){
m.childNodes[0].className='hidden';

}
function outImg(img){
	img.style.background = '';
}

function seeMars()
{
window.location = "web/mars";
}

function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;
      }

function o(menu){
		var test = $(menu);
		var slice = test.childNodes[0].style.display;
		
		if (slice == '' | 'none'){
		test.childNodes[0].style.display = 'block';
		test.className = 'overlayShade';
		$('bannerText').className = 'hidden';
		}else{
		test.childNodes[0].style.display = '';
		test.className = '';
		$('bannerText').className = 'shown';
		}
		
	}
	function menuItem(mi){
		if (mi.className == ''){
			mi.className = 'menuItemOverlay';
		}else{
			mi.className = '';	
		}
			
	}
function switchTabs(tab){
	if (tab.className == 'here'){}
	else{
		if (tab.id == 'newsTab'){
			tab.className = 'here';
			$('eventsTab').className = '';
			$('newsTabContent').childNodes[0].className = 'sideList';
			$('eventsTabContent').childNodes[0].className = 'sideList hidden';
			//TODO: Add effects for tabs here
			
		}
		if (tab.id == 'eventsTab'){
			tab.className = 'here';
			$('newsTab').className = '';
			$('newsTabContent').childNodes[0].className = 'sideList hidden';
			$('eventsTabContent').childNodes[0].className = 'sideList';
		//TODO: Add effects for tabs here
		}
		
	}
}

