
function init() {
	
	var btns = [
			{
				id:'btnEnter',
				overSrc:'btn_enter_on.gif',
				outSrc:'btn_enter_off.gif',
				upFunction:showSite
			},
			{
				id:'btnContact',
				overSrc:'btn_contact_on.gif',
				outSrc:'btn_contact_off.gif',
				upFunction:sendEmail
			}
	];
	
	
	var img,i;
	for( i in btns ) {
		img = document.getElementById( btns[i].id );
		
		img.overSrc = new Image();
		img.overSrc.src = 'content/splash/' + btns[i].overSrc;
		
		img.outSrc = new Image();
		img.outSrc.src = 'content/splash/' + btns[i].outSrc;
		
		img.onmouseover = btnOver;
		img.onmouseout = btnOut;
		
		if( btns[i].upFunction ) {
			img.style.cursor = 'pointer';
			img.onmouseup = btns[i].upFunction;
		}
		
	}
	
}

function showSite() {
	document.location = 'stuross.html';
}

function sendEmail() {
	var addr = 'sjtjuj@jjsjtjujrjosjsj.jcja';
	var re = /j/g;
	document.location = 'mailto:' + addr.replace( re, '' );
}

function btnOver() {
	imgSwap( this, this.overSrc );
}

function btnOut() {
	imgSwap( this, this.outSrc );
}

function imgSwap( btn, img ) {
	if( img.src ) btn.src = img.src;
	else alert( 'no img src specified.' );
}

