
/* --------------------------------------------------- */
/* DW GENERATED FOR PRELOAD AND ROLLOVER OF IMAGES */
/* --------------------------------------------------- */
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
   
   document.getElementById('opt1').style.visibility = 'hidden';
   document.getElementById('opt2').style.visibility = 'hidden';
}


/* --------------------------------------------------- */
/* DROP DOWN MENUS (MAIN NAV) */
/* --------------------------------------------------- */
function showMenu(divId) {
	var subMenu = document.getElementById(divId);
	subMenu.style.visibility = 'visible';
	if (divId == "opt1") {
		document.getElementById('opt2').style.visibility = 'hidden';
	} else if (divId == "opt2") {
		document.getElementById('opt1').style.visibility = 'hidden';
	}
}

function hideMenu(divId) {
	var subMenu = document.getElementById(divId);
	subMenu.style.visibility = 'hidden';
}



/* --------------------------------------------------- */
/* TOGGLE TEAM MEMBERS */
/* --------------------------------------------------- */
function showMember(divId) {
	
	document.getElementById('generic-content').style.display = 'none';
	
	var subMenu = document.getElementById(divId);
	subMenu.style.display = 'block';
	
	if (divId == "member1") {
		document.getElementById('member2').style.display = 'none';
		document.getElementById('member3').style.display = 'none';
	} else if (divId == "member2") {
		document.getElementById('member1').style.display = 'none';
		document.getElementById('member3').style.display = 'none';
	} else if (divId == "member3") {
		document.getElementById('member1').style.display = 'none';
		document.getElementById('member2').style.display = 'none';
	}
	
}




/* --------------------------------------------------- */
/* SHOW/HIDE MINI-NAV */
/* --------------------------------------------------- */
function showMiniMenu(divId) {
	var miniStats = document.getElementById('mini-nav-stats');
	var miniRelated = document.getElementById('mini-nav-related');
	var miniChallenge = document.getElementById('mini-nav-challenge');
	
	if (divId == "mini-nav-stats") {
		miniStats.style.visibility = 'visible';
		miniRelated.style.visibility = 'hidden';
		miniChallenge.style.visibility = 'hidden';
	} else if (divId == "mini-nav-related") {
		miniStats.style.visibility = 'hidden';
		miniRelated.style.visibility = 'visible';
		miniChallenge.style.visibility = 'hidden';
	} else if (divId == "mini-nav-challenge") {
		miniStats.style.visibility = 'hidden';
		miniRelated.style.visibility = 'hidden';
		miniChallenge.style.visibility = 'visible';
	}
	
}


/* --------------------------------------------------- */
/* IE FLASH FIX */
/* --------------------------------------------------- */
function ieFix(filePath, theHeight, theWidth, varName, cookieVar, bgColor)
{
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + theWidth + '" height="' + theHeight + '" id="' + filePath + '" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain">\n');
	document.write('<param name=movie VALUE="' + filePath + '.swf">\n');
  document.write('<param name=quality VALUE=high>\n');
  document.write('<param name="flashvars" value="' + varName + '=' + cookieVar + '">\n');
	document.write('<param name=scale VALUE=noborder>\n');
	document.write('<param name=menu VALUE=false>\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name=bgcolor VALUE=#' + bgColor + '>\n');
	document.write('<embed id="flash" src="' + filePath + '.swf" wmode="transparent" quality="high" flashvars="' + varName + '=' + cookieVar + '" bgcolor="#' + bgColor + '" width="' + theWidth + '" height="' + theHeight + '" name="' + filePath + '" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
	document.write('</object>\n');
}



/* --------------------------------------------------- */
/* IE FLASH FIX */
/* --------------------------------------------------- */
function twitterFeed() {
	
	varString = "user_id=778356&&color1=0x998872&color2=0x998872&textColor1=0x443D33&textColor2=0xFFFFFF&backgroundColor=0x5B5348&textSize=10";
	
  document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="400" id="twitter_timeline_badge" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain">\n');
	document.write('<param name=movie VALUE="http://static.twitter.com/flash/twitter_timeline_badge.swf">\n');
  document.write('<param name=quality VALUE=high>\n');
  document.write('<param name="flashvars" value="' + varString + '">\n');
	document.write('<param name=scale VALUE=noborder>\n');
	document.write('<param name=menu VALUE=false>\n');
	document.write('<param name="wmode" value="transparent" />\n');
	document.write('<param name=bgcolor VALUE=#0x5B5348>\n');
	document.write('<embed src="src="http://www.twitter.com/flash/twitter_timeline_badge.swf" flashvars="user_id=778356&color1=0xFFFFCE&color2=0xFCE7CC&textColor1=0x4A396D&textColor2=0xB70909&backgroundColor=0x4C443B&textSize=10" width="200" height="400" quality="high" name="twitter_timeline_badge" align="middle" type="application/x-shockwave-flash" allowScriptAccess="always" type="application/x-shockwave-flash"</embed></div>">\n');
	document.write('</object>\n');
}