// tab //
function initTabMenu() {
	var tabContainer = document.getElementById("tab-cont");
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;
	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "over_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.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;
			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				currentmenu.className = currentmenu.className.replace("over_tab_on", "over_tab");
			}
			this.targetEl.style.display = "";
			this.className = this.className.replace("over_tab", "over_tab_on");
			this.container.current = this;
			return false;
		};
		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

// screenshot //
function screenshot(){
	var objBig = document.getElementById("screenshotView");
	var objThum = document.getElementById("screenshotList").getElementsByTagName("a");
	var btnPrev = document.getElementById("prev");
	var btnNext = document.getElementById("next");
	var thisView = 0;
	init();
	function init(num){
		if(num) var thisObj = (isNaN(num))? num : objThum[num];
		else var thisObj = objThum[thisView];
		for (i=0;i<objThum.length;i++){
			objThum[i].className = (thisObj==objThum[i]) ? "this" : "";
			thisView = (thisObj==objThum[i]) ? i : thisView;
			objThum[i].onclick = function(){ init(this);return false; }
		}
		objBig.src = thisObj.href;
		objBig.alt = thisObj.getElementsByTagName("img")[0].alt;
		btnPrev.onclick = function(){ var move=(thisView-1>-1)?thisView-1:0; init(move); }
		btnNext.onclick = function(){ var move=(thisView+1<objThum.length)?thisView+1:objThum.length-1; init(move); }
	}
}
