// Ties a set of tabs and content id's together, and switches between them
// <div id='tab_1'> and <div id="content_1"> for example
// Usage: tabswitch('1', 4, 'tab', 'panel') would switch on tab_1 and panel_1

function tabswitch(active, number, tab_prefix, content_prefix) {
	
	for (var i=1; i < number+1; i++) {
	  document.getElementById(content_prefix+'_'+i.toString()).style.display = 'none';
	  document.getElementById(tab_prefix+'_'+i.toString()).className = 'off';
	}
	document.getElementById(content_prefix+'_'+active).style.display = 'block';
	document.getElementById(tab_prefix+'_'+active).className = 'active';	
	
}

// Switch MENU
	<!--
	function switchMenu(obj) {
		var el = document.getElementById(obj);
		if ( el.style.display != "none" ) {
			el.style.display = 'none';
		}
		else {
			el.style.display = '';
		}
	}
	//-->
	

<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'images/banner1.jpg'
theImages[1] = 'images/banner2.jpg'
theImages[2] = 'images/banner3.jpg'
theImages[3] = 'images/banner4.jpg'
theImages[4] = 'images/banner5.jpg'
theImages[5] = 'images/banner6.jpg'
theImages[6] = 'images/banner7.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

function showImage1(){
document.write('<img src="../'+theImages[whichImage]+'">');
}

//  End -->



