var currentbatch = 0;


function ShowLayer(n,num){
	for(i=0;i<(num+1);i++){
		document.getElementById("prblock"+i).style.display = "none";	
		document.getElementById("prlink"+i).style.color = "#4D4D4D";
	}
	document.getElementById("prblock"+n).style.display = "block";
	document.getElementById("prlink"+n).style.color = "#969696";
	currentbatch = n;
}

function GoLeft(num){
	if(currentbatch > 0){
		ShowLayer(currentbatch-1,num);
	}
}

function GoRight(num){
	if(currentbatch < num){
		ShowLayer(currentbatch+1,num);
	}
}


function CloseLayers(x){
	for(i=0;i<x;i++){
		document.getElementById("prblock"+i).style.display = "none";	
	}
	document.getElementById("prblock0").style.display = "block";
}

function ShowLayer2(n,num){
	var obj;
	
	for(i=0;i<(num+1);i++){
		try{
			obj = document.getElementById("prblock"+i);
			obj.style.display = "none";
			obj = document.getElementById("SRCHID"+(i+1));
			obj.className = "srchtextbox";
		}catch(exception){
			break;
		}
	}
	obj = document.getElementById("prblock"+n);
	obj.style.display = "block";
	obj = document.getElementById("SRCHID"+(n+1));
	obj.className = "srchtextboxOn";
	currentbatch = n;
}


function GoLeft2(num){
	if(currentbatch > 0){
		ShowLayer2(currentbatch-1,num);
	}
}

function GoRight2(num){
	if(currentbatch < num){
		ShowLayer2(currentbatch+1,num);
	}
}