//script that opens/closes links box
document.getElementById('linksBox').style.width = '31px';
document.getElementById('links').style.display = 'none';

function changeWidth(elm,toWidth){
	var width  = parseInt(elm.style.width);
	var isOpen = (toWidth == 161) ? false : true;
	var total;

	if(isOpen){
 		total = width - 10;
		document.getElementById('links').style.display = 'none';
	}else{
		total = width + 10;
	}
 
	elm.style.width = total + 'px';

 	if(width == toWidth) {
  		clearTimeout(timer);
  		if(!isOpen){
  			document.getElementById('links').style.display = 'block';
  		}
  		return;
 	}
	function c() {
	   changeWidth(elm,toWidth);
	}
 	timer = setTimeout(c,15);
}

function linkToggle(){
	var elmBox = document.getElementById('linksBox');
	var boxWidth = parseInt(elmBox.style.width);
	var toWidth;
	
	if(boxWidth > 50){
		toWidth = 41;
	}else{
		toWidth = 161;
	}
	changeWidth(elmBox,toWidth);
}

//script to handle which links are displayed
document.getElementById('prof').style.display = 'none';
var isYp = true;
						
function linkSwitch(){
	if(isYp){
		document.getElementById('prof').style.display = 'block';
		document.getElementById('yp').style.display = 'none';
		isYp = false;
	}else{
		document.getElementById('prof').style.display = 'none';
		document.getElementById('yp').style.display = 'block';
		isYp = true;
	}
}

//script to toggle the tabs
function toggleTab(){
	if(tab == "manc"){
		document.getElementById('content').style.background = '#EFEFEF url(man_lc_tabBg.gif) 10px 0px no-repeat';
		document.getElementById('tabLeft').style.background = '#fff url(man_lc_tabBg.jpg) repeat-x';
	}
	if(tab == "info"){
		document.getElementById('content').style.background = '#EFEFEF url(man_lc_tabBg.gif) 424px 0px no-repeat';
		document.getElementById('tabRight').style.background = '#fff url(man_lc_tabBg.jpg) repeat-x';
	}
}
