// JavaScript Document

function Tabs() {
	this.allAs=document.getElementById("pcmc_tabs").getElementsByTagName("a");
	if ( (typeof this.allAs == "undefined") || (this.allAs == null) ) {
		this.allAs=new Array();
	}
	
	for (i=0; i<this.allAs.length; i++) {
		this.allAs[i].tabs=this;
		this.allAs[i].onclick=function() {
			this.tabs.clicked(this);
			return false;
		}
	}
	
	this.clicked(this.allAs[0]);
}

Tabs.prototype.clicked=function(linkRef) {
	for (i=0; i<this.allAs.length; i++) {
		if (this.allAs[i]!=linkRef) {
			this.allAs[i].parentNode.className="";
			this.show(this.allAs[i], false);
		} else {
			this.allAs[i].parentNode.className="current";
			this.show(this.allAs[i], true);
		}
	}
}

Tabs.prototype.show=function(linkRef, bShow) {
	divId=linkRef.parentNode.id.toString().replace("pcmct_", "pcmcf_");
	if (bShow) {
		document.getElementById(divId).style.display="block";
	} else {
		document.getElementById(divId).style.display="none";
	}
}

var docTabs=new Tabs();