CSS={
	AddClass:function(e,c){if(!e.className.match(new RegExp("\\b"+c+"\\b","i")))e.className+=(e.className?" ":"")+c;
	},
	RemoveClass:function(e,c){e.className=e.className.replace(new RegExp(" \\b"+c+"\\b|\\b"+c+"\\b ?","gi"),"");
	}
	};
	Tabs={
		GoTo:function(contentId,skipReplace)
	{
		var foundTab=false;
		var toc=document.getElementById("toc");
		var toc1=document.getElementById("toc1");
		var divMenu16=document.getElementById("divMenu16");
		var divMenu17=document.getElementById("divMenu17");
		
		
		if(divMenu17.style.display=="block")
		{
		  toc=toc1
		}
		
		
		if(toc){var lis=toc.getElementsByTagName("li");
		var foundTab;
		for(var j=0;j<lis.length;j++)
		{
			var li=lis[j];
			var anchors=li.getElementsByTagName("a");
			for(var k=0;k<anchors.length;k++){
				if(anchors[k].hash=="#"+contentId){
					CSS.AddClass(li,"current");
					foundTab=true;
					break;
					}
					else{
						CSS.RemoveClass(li,"current");
						}
					}
				}
			}
			
			if(!foundTab)
			{
			  CSS.AddClass(lis[0],"current");
			  MycontentId=lis[0].id
			}
			var divsToHide=[];
			var divs=document.getElementsByTagName("div");
			for(var i=0;i<divs.length;i++){
			var div=divs[i];
			if(div.className.match(/\bcontent\b/i)){
			if(div.id=="_"+contentId)div.style.display="block";
			else 
			divsToHide.push(div);
			}
			}
			for(var i=0;i<divsToHide.length;i++)divsToHide[i].style.display="none";
			if(!skipReplace)window.location.replace("#"+contentId);
			},
			OnClickHandler:function(e){
			if(!e)e=window.event;			
			if(e.preventDefault)e.preventDefault();else e.returnValue=false;Tabs.GoTo(this.hash.substring(1));
			},
			Init:function()
			{
			if(!document.getElementsByTagName)return;
			var anchors=document.getElementsByTagName("a");
			for(var i=0;i<anchors.length;i++)
			{
			var a=anchors[i];
			if(a.hash.replace(/#/g,'')=="")
			{
			  isHash=false;
			}
			else
			{
			isHash=true;
			}
			//alert(isHash)
			if(isHash)a.onclick=Tabs.OnClickHandler;
			}
			var contentId;
			if(window.location.hash)contentId=window.location.hash.substring(1);
			var divs=document.getElementsByTagName("div");for(var i=0;i<divs.length;i++){
			var div=divs[i];
			if(div.className.match(/\bcontent\b/i)){
			if(!contentId)contentId=div.id;
			div.id="_"+div.id;
				}
			}
			if(contentId)Tabs.GoTo(contentId,true);
				}
			};
			window.onload = Tabs.Init;
			var contentId=window.location.hash||"#design";
			if(document.createStyleSheet)
			{
			var style=document.createStyleSheet();
			style.addRule("div.content","display: none;");
			style.addRule("div"+contentId,"display: block;");
			}else{
			var head=document.getElementsByTagName("head")[0];
			if(head){
			var style=document.createElement("style");
			style.setAttribute("type","text/css");
			style.appendChild(document.createTextNode("div.content { display: none; } div"+contentId+" { display: block; }"));head.appendChild(style);}}