/*

function preloadMusic() {
imageLoader(preloadMusArray);
// turn zip (tab and content) on explicitly, has to be on page loan event 
document.getElementById(wagnerContent).style.visibility = "visible";
document.getElementById(wagnerTab).style.visibility = "hidden";
}

var preloadMusArray = [
	"../_img/place/music_wagner_mo.gif",
	"../_img/place/music_zimmerman_mo.gif"
];


if (window.addEventListener) {window.addEventListener("load", preloadMusic, true);} 
else if (window.attachEvent) {window.attachEvent("onload", preloadMusic);} 
else {window.onload = preloadMusic;}
*/

/* global find inspector vars */
/* ************************** */

isClick = false;
isOver = false;
isOut = false;

wagnerTab = "fiTabWagner";
wagnerContent = "fiContentWagner";
zimmermanTab = "fiTabZimmerman";
zimmermanContent = "fiContentZimmerman";

currentTab = "";
currentContent = "";

function findIns(tab,eventType) {
	currentTab = tab;

	if (currentTab == wagnerTab) {currentContent = wagnerContent;}
	if (currentTab == zimmermanTab) {currentContent = zimmermanContent;}

	if (eventType == "click") {isClick=true;}
	if (eventType == "mouseover") {isOver=true;}
	if (eventType == "mouseout") {isOut=true;}

	//alert('eventType: ' + eventType);
	
	if (isClick) {

		//alert('current tab: ' + currentTab);
		
		// flip the content divs. all off, current on
		document.getElementById(wagnerContent).style.visibility = "hidden";
		document.getElementById(zimmermanContent).style.visibility = "hidden";
		
		document.getElementById(currentContent).style.visibility = "visible";
		
		tabImageLocation = "../_img/place/";
		
		//flip the tabs. all off, current on
		document.getElementById(wagnerTab).style.visibility = "visible";
		document.getElementById(zimmermanTab).style.visibility = "visible";
		
		document.getElementById(currentTab).style.visibility = "hidden";

		isClick = false;

	} else {
	
		//alert('curent tab: ' + currentTab);
		if (document.getElementById(currentContent).style.visibility != "visible") {swap(tab);}
		if (isOver){isOver = false;}
		if (isOut){isOut = false;}

	}

}
