function imgOn(imgEl) {
	imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
}

function imgOff(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
}


function imgOn(imgEl) {
	imgEl.src = imgEl.src.replace("_off.jpg", "_on.jpg");
}

function imgOff(imgEl) {
	imgEl.src = imgEl.src.replace("_on.jpg", "_off.jpg");
}

/*****************************************************************************************************************************************
	Tab_image
*****************************************************************************************************************************************/
function initTabMenu(tabContainerID, tabDefaultTabId) {
	var tabContainer = document.getElementById(tabContainerID);
	if(tabContainer.getElementsByTagName("ul")[0]==null){
		return;
	}
	var tabAnchor = tabContainer.getElementsByTagName("ul")[0].getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
			
			
			
			
			
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", "_off.gif");
				} else {
					currentmenu.className = currentmenu.className.replace("on", "");
				}
			}

			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace("_off.gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};
		if (tabAnchor.item(i).href.split("#")[1] == tabDefaultTabId) {
			thismenu.container.first = thismenu;
		} else if (!thismenu.container.first) {
			thismenu.container.first = thismenu;
		};
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}


/*****************************************************************************************************************************************
	Tab Over
*****************************************************************************************************************************************/
function TabMenuOver(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	if(tabContainer.getElementsByTagName("ul")[0]==null){
		return;
	}
	var tabAnchor = tabContainer.getElementsByTagName("ul")[0].getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onmouseover = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", "_off.gif");
				} else {
					currentmenu.className = currentmenu.className.replace("on", "");
				}
			}

			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace("_off.gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onmouseover();
}
function TabMenuOverJPG(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	if(tabContainer.getElementsByTagName("ul")[0]==null){
		return;
	}
	var tabAnchor = tabContainer.getElementsByTagName("ul")[0].getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onmouseover = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.jpg", "_off.jpg");
				} else {
					currentmenu.className = currentmenu.className.replace("on", "");
				}
			}

			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace("_off.jpg", "_on.jpg");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onmouseover();
}
