var highlightcolor = "#f6d890";
var hidemenu;
function highlightBgColor(idname){
	document.getElementById(idname).style.backgroundColor = highlightcolor;
}

function unhighlightBgColor(idname){
	document.getElementById(idname).style.backgroundColor = "transparent";
}

function hidethis(idname){
	document.getElementById(idname).style.display = "none";
}

function showthis(idname){
	document.getElementById(idname).style.display = "block";
}

function delayedhidethis(idname){
	hidemenu=setTimeout("hidethis('" + idname + "')",1000);
}

function cancelhidemenu(){
	try{
		clearTimeout(hidemenu);
	}
	catch(e){
		alert(e);
	}
}

function changelayout(){
	//window.screen.width
	try{
		//alert('try block');
		if(window.screen.width <= 1024 || document.body.offsetWidth <= 1024){
			hidethis('extrabox');
		}
		else{
			showthis('extrabox');
		}
	}
	catch(e){
		//alert('first try');
		if(window.screen.width <= 1024 || window.innerWidth <= 1024){
                        hidethis('extrabox');
                }
                else{
                        showthis('extrabox');
                }
	}
}

function initialize(){
	changelayout();
	window.onresize = changelayout;
}

function showbio(idname){
	var isvalid = false;
	switch(idname){
		case 'billbio':
			isvalid = true;
		break;
		case 'kitzzybio':
			isvalid = true;
		break;
		case 'jessicabio':
			isvalid = true;
		break;
		case 'timbio':
			isvalid = true;
		break;
		case 'chrisbio':
			isvalid = true;
		break;
		case 'danbio':
			isvalid = true;
		break;
		case 'jasonbio':
			isvalid = true;
		break;
		case 'jinbio':
			isvalid = true;
		break;
		case 'johnbio':
			isvalid = true;
		break;
		case 'chriscbio':
			isvalid = true;
		break;
		
		default:
			// invalid id don't do anything
			isvalid = false;
		break;
	}
	
	if(isvalid){
			hideallbio();
			showthis(idname);
	}
}

function hideallbio(){
	hidethis('billbio');
	hidethis('kitzzybio');
	hidethis('jessicabio');
	hidethis('timbio');
	hidethis('chrisbio');
	hidethis('danbio');
	hidethis('jasonbio');
	hidethis('jinbio');
}