// JavaScript Document



//opens a new window with the music player in it
function openPlayer() {
		window.open('player.html', null, "height=200,width=300,status=no,toolbar=no,menubar=no,location=no");
}

//Says thankyou for subscribing to the mailing list
function thankYou() {
		document.getElementById('subscribe').style.visibility = 'hidden';
		document.getElementById('thanks').style.visibility = 'visible';
}

//Clears contents of an input element when it is in focus and makes the text black
function focuser(element) {
	element.value='';
	element.style.color='#000';
}

function setSizes() {
	//Sets the sizes of content boxes by subtracting widths from the window size
	//thanks to http://www.howtocreate.co.uk/tutorials/javascript/browserwindow for the IE workaround
	var windowWidth = 0, windowHeight = 0;
	 if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		//windowWidth = window.innerWidth;
		//windowHeight = window.innerHeight;
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}
	
	var contentWidth = windowWidth - 212
	var contentHeight = windowHeight - 160
	var content = document.getElementById('content')
	var contentBox = document.getElementById('contentBox')
	
	contentBox.style.height = contentHeight + 20 + 'px'
	contentBox.style.width = contentWidth + 'px'
	content.style.width = contentWidth + 'px'
	content.style.height = contentHeight + 'px'
}


//Stuff to do when the page is loaded
window.onload = setSizes
window.onresize = setSizes