//function for hiding and showing div

var ids=new Array('a1','a2','a3','thiscanbeanything');

function next() {
	var cur = ids.indexOf(current);
	if (cur == 0) {
		document.getElementById('bio-left-arrow').className  = 'left-arrow';
	}
	if (cur == ids.length-2) {
		document.getElementById('bio-right-arrow').className  = 'right-arrow-off';
	}
	if (cur < ids.length-1)
	{
		var next = ids[cur+1];
		var nextnum = nums[cur+1];
		switchid(next);
		switchnum(nextnum);
		current = next;
		currentnum = nextnum;
		curPg++;
	}
	
}

function previous() {
	var cur = ids.indexOf(current);
	if (cur == 1) {
		document.getElementById('bio-left-arrow').className  = 'left-arrow-off';
	}
	if (cur > 0)
	{
		var prev = ids[cur-1];
		var prevnum = nums[cur-1];
		switchid(prev);
		switchnum(prevnum);
		current = prev;
		currentnum = prevnum;
		document.getElementById('bio-right-arrow').className  = 'right-arrow';
	}
	
}

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
		
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
			
		}
		else { // IE 4
			document.all.id.style.display = 'block';
			
		}
	}
}


function switchnum(id){	
	hideallnums();
	shownumdiv(id);
}

function hideallnums(){
	//loop through the array and hide each element by id
	for (var i=0;i<nums.length;i++){
		hidenumdiv(nums[i]);
	}		  
}

function hidenumdiv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function shownumdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
		
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
			
		}
		else { // IE 4
			document.all.id.style.display = 'block';
			
		}
	}
}