// JavaScript Document


// www.turtle-media.com
//
////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////
// get  and set cookie script
function getC(c_name){ 
if (document.cookie.length>0){c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1){ c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) {c_end=document.cookie.length}; return unescape(document.cookie.substring(c_start,c_end))}} return ""}
// setPermCookie script
function setC(c_name, c_value){document.cookie =  c_name + '=' + c_value + '; expires=Thu, 2 Aug 2040 20:47:11 UTC; path=/'}
////////////////////////////////////////////////////////////////////
//showhide
function show(divid){try{document.getElementById(divid).style.display = "block";}     catch(err){}}
function showinline(divid){try{document.getElementById(divid).style.display = "inline";} catch(err){}}
function hide(divid){try{document.getElementById(divid).style.display = "none";} catch(err){}}
////////////////////////////////////////////////////////////////////
function redirect(url){	document.location = url}
function conf(url){if(confirm("Are you sure?")){redirect(url)}}
////////////////////////////////////////////////////////////////////
function getVal(id){return document.getElementById(id).value}
////////////////
function setfocus(a_field_id) {document.getElementById(a_field_id).focus()}
////////////////

function $(id) {
  return document.getElementById(id);
}

var oldval = 1;

function staffclick(staffid){
	// swap downstates
	$('id'+staffid).setAttribute("class", "stafflinkdn");	
	$('id'+staffid).setAttribute("className", "stafflinkdn");	// this for ie
		if(oldval){
			$('id'+oldval).setAttribute("class", "stafflink");	
			$('id'+oldval).setAttribute("className", "stafflink");	// this for ie
		}
	oldval = staffid
	
		// place content
		$('staffright').innerHTML = content[staffid];
}

function init(){
	$('staffright').innerHTML = content[1];
}



