// JavaScript Document
/**
* Change the currently chosen tab
* @param {DomNode} anchor The tab link the user clicked
* @returns {Boolean} Always FALSE
*/

document.write("<script type='text/javascript' src='../common/js/prototype.js'></script>");

function changeTab(anchor){

	var tabboxh = anchor;
	var target;

	// Get tabboxh container
	while(tabboxh != null && (tabboxh.className == null || tabboxh.className.indexOf("tabboxh") == -1)){
		tabboxh = tabboxh.parentNode;

		// Is H1 - Hx tag
		if(tabboxh.nodeName.search(/^h[0-9]$/i) == 0){
			target = tabboxh.parentNode;
		}
	}
	if(tabboxh == null || target == null){
		return false;
	}


	// Find and unselect Current Tab
	var tag;
	for(var i = 0; i < tabboxh.childNodes.length; i++){
		tag = tabboxh.childNodes[i];

		// chosen Div
		if(tag.nodeName.toLowerCase() == "div" && tag.className != null && tag.className.indexOf("chosen") > -1){
			tag.className = tag.className.replace("chosen", "");
			break;
		}
	}

	// Select Tag
	if(target != null){
		target.className = (target.className || "") +" chosen";
	}

	return false;



}




//for the inner vertical content tab1


function changeinTab(anchor){

	var inner_tabbox = anchor;
	var target;

	// Get inner_tabbox container
	while(inner_tabbox != null && (inner_tabbox.className == null || inner_tabbox.className.indexOf("inner_tabbox") == -1)){
		inner_tabbox = inner_tabbox.parentNode;

		// Is H1 - Hx tag
		if(inner_tabbox.nodeName.search(/^h[0-9]$/i) == 0){
			target = inner_tabbox.parentNode;
		}
	}
	if(inner_tabbox == null || target == null){
		return false;
	}


	// Find and unselect Current Tab
	var tag;
	for(var i = 0; i < inner_tabbox.childNodes.length; i++){
		tag = inner_tabbox.childNodes[i];

		// Selected_tab Div
		if(tag.nodeName.toLowerCase() == "div" && tag.className != null && tag.className.indexOf("selected_tab") > -1){
			tag.className = tag.className.replace("selected_tab", "");
			break;
		}
	}

	// Select Tag
	if(target != null){
		target.className = (target.className || "") +" selected_tab";
	}

	return false;
}



//for the inner vertical content tab2


function changeTaba(anchor){

	var tabboxa = anchor;
	var target;

	// Get tabboxa container
	while(tabboxa != null && (tabboxa.className == null || tabboxa.className.indexOf("tabboxa") == -1)){
		tabboxa = tabboxa.parentNode;

		// Is H1 - Hx tag
		if(tabboxa.nodeName.search(/^h[0-9]$/i) == 0){
			target = tabboxa.parentNode;
		}
	}
	if(tabboxa == null || target == null){
		return false;
	}


	// Find and unselect Current Tab
	var tag;
	for(var i = 0; i < tabboxa.childNodes.length; i++){
		tag = tabboxa.childNodes[i];

		// selecteda Div
		if(tag.nodeName.toLowerCase() == "div" && tag.className != null && tag.className.indexOf("selecteda") > -1){
			tag.className = tag.className.replace("selecteda", "");
			break;
		}
	}

	// Select Tag
	if(target != null){
		target.className = (target.className || "") +" selecteda";
	}

	return false;
}

//for the inner vertical content tab3


function changeTabb(anchor){

	var tabboxb = anchor;
	var target;

	// Get tabboxb container
	while(tabboxb != null && (tabboxb.className == null || tabboxb.className.indexOf("tabboxb") == -1)){
		tabboxb = tabboxb.parentNode;

		// Is H1 - Hx tag
		if(tabboxb.nodeName.search(/^h[0-9]$/i) == 0){
			target = tabboxb.parentNode;
		}
	}
	if(tabboxb == null || target == null){
		return false;
	}


	// Find and unselect Current Tab
	var tag;
	for(var i = 0; i < tabboxb.childNodes.length; i++){
		tag = tabboxb.childNodes[i];

		// selectedb Div
		if(tag.nodeName.toLowerCase() == "div" && tag.className != null && tag.className.indexOf("selectedb") > -1){
			tag.className = tag.className.replace("selectedb", "");
			break;
		}
	}

	// Select Tag
	if(target != null){
		target.className = (target.className || "") +" selectedb";
	}

	return false;
}


//for the inner vertical content tab4


function changeTabc(anchor){

	var tabboxc = anchor;
	var target;

	// Get tabboxc container
	while(tabboxc != null && (tabboxc.className == null || tabboxc.className.indexOf("tabboxc") == -1)){
		tabboxc = tabboxc.parentNode;

		// Is H1 - Hx tag
		if(tabboxc.nodeName.search(/^h[0-9]$/i) == 0){
			target = tabboxc.parentNode;
		}
	}
	if(tabboxc == null || target == null){
		return false;
	}


	// Find and unselect Current Tab
	var tag;
	for(var i = 0; i < tabboxc.childNodes.length; i++){
		tag = tabboxc.childNodes[i];

		// selectedc Div
		if(tag.nodeName.toLowerCase() == "div" && tag.className != null && tag.className.indexOf("selectedc") > -1){
			tag.className = tag.className.replace("selectedc", "");
			break;
		}
	}

	// Select Tag
	if(target != null){
		target.className = (target.className || "") +" selectedc";
	}

	return false;
}