/* Cufon font replacement
---------------------------------------- */
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('h4');



/* Tab Select 
---------------------------------------- */
function preloadImages() {
	if (document.images) {
		for (var i = 0; i < preloadImages.arguments.length; i++) {
			(new Image()).src = preloadImages.arguments[i];
		}
	}
}
function roll(img_name, img_src){document[img_name].src = img_src;}



/* Tab Select 
---------------------------------------- */
var isNav4, isIE4, isNav6 = false;
var range = "";
var styleObj = "";

if (navigator.appVersion.charAt(0) >= 4) {
	if (navigator.appName == "Netscape") {
		if (navigator.appVersion.charAt(0) >= 5) {isNav6 = true;}
		else {isNav4 = true;}
	}
	else {
		isIE4 = true;
		range = "all.";
		styleObj = ".style";
	}
}

function getObject(obj) {
	var theObj;
	if (typeof obj == "string") {
		if (isNav6) {
			theObj = document.getElementById(obj);
			if (theObj != null) theObj = theObj.style;
		}
		else {
			theObj = eval("document." + range + obj);
			if (theObj != null) theObj = eval("theObj" + styleObj);
		}
	}
	else {theObj = obj;}
	return theObj;
}

function show() {
	var theObj;
	for (var i = 0; i < show.arguments.length; i++) {
		theObj = getObject(show.arguments[i]);
		if (theObj != null) {
			theObj.display = "block";
			theObj.visibility = "visible";
		}
	}
}

function hide() {
	var theObj;
	for (var i = 0; i < hide.arguments.length; i++) {
		theObj = getObject(hide.arguments[i]);
		if (theObj != null) {
			theObj.display = "none";
			theObj.visibility = "hidden";
		}
	}
}

function tabSelect(tabBox,numberOfTabs) {
	var tabCount = numberOfTabs;
	for (var i = 1; i <= tabCount; i++)
	{
		var tabID = i;
		var tabName = "tab0" + tabID;
		var tabAreaName = "tabsetContentBody0" + tabID;
		if (tabBox == tabID)
		{
			document.getElementById(tabName).className = "tabIsSelected";
			show(tabAreaName);
		}
		else
		{
			document.getElementById(tabName).className = "tabNotSelected";
			hide(tabAreaName);
		}
	}
}


