// bc site scripts -->
// preload images -->

story = new Image;
story.src = "/images/story_d.gif";
story_h = new Image;
story_h.src = "/images/story_s.gif";

events = new Image;
events.src = "/images/events_d.gif";
events_h = new Image;
events_h.src = "/images/events_s.gif";

inspiration = new Image;
inspiration.src = "/images/inspiration_d.gif";
inspiration_h = new Image;
inspiration_h.src = "/images/inspiration_s.gif";

press = new Image;
press.src = "/images/press_d.gif";
press_h = new Image;
press_h.src = "/images/press_s.gif";

partners = new Image;
partners.src = "/images/partners_d.gif";
partners_h = new Image;
partners_h.src = "/images/partners_s.gif";

contact = new Image;
contact.src = "/images/contact_d.gif";
contact_h = new Image;
contact_h.src = "/images/contact_s.gif";

donate = new Image;
donate.src = "/images/donate_d.gif";
donate_h = new Image;
donate_h.src = "/images/donate_s.gif";

function roll(imgDocID,imgObjName)
	{
document.images[imgDocID].src = eval(imgObjName + ".src")
	}

function swap1(changeTo, loadingImage) {
	document.getElementById("bigpic1").src = loadingImage;
	document.getElementById("bigpic1").src = changeTo;
}

function swap2(changeTo, loadingImage) {
	document.getElementById("bigpic2").src = loadingImage;
	document.getElementById("bigpic2").src = changeTo;
}

function swap3(changeTo, loadingImage) {
	document.getElementById("bigpic3").src = loadingImage;
	document.getElementById("bigpic3").src = changeTo;
}

function swap4(changeTo, loadingImage) {
	document.getElementById("bigpic4").src = loadingImage;
	document.getElementById("bigpic4").src = changeTo;
}


// tabbed panel function -->
var ids = new Array('gall_1','gall_2','gall_3','gall_4');
var tabs = new Array('tab1','tab2','tab3','tab4');

function switchid(id,tab){
	hideallids();
	showdiv(id,tab);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i],tabs[i]);
	}		  
}

function hidediv(id,tab) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
		document.getElementById(tab).className = 'def';
	}
}

function showdiv(id,tab) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
		document.getElementById(tab).className = 'sel';
	}
}

// tabbed panel function -->
var bnr = new Array('awh2_bnr','skiffle_bnr','about_bnr','twist_bnr','space_bnr');
var homebtn = new Array('home_awh2','home_skiffle','home_about','home_twist','home_space');

function homeTabs(homebtn,bnr){
	hideall();
	showTab(homebtn,bnr);
}

function hideall(){
	//loop through the array and hide each element by id
	for (var i=0;i<homebtn.length;i++){
		hide(homebtn[i],bnr[i]);
	}		  
}

function hide(homebtn,bnr) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(homebtn).className = "paneltab";
		document.getElementById(bnr).style.display = "none";
	}
}

function showTab(homebtn,bnr) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(homebtn).className = "paneltab_sel";
		document.getElementById(bnr).style.display = "inline";
	}
}
