function openMedia(guid)
{				
	//alert(guid);
	/*
	var url = "http://blueplanet.surfaceeleven.net/" + "player/index.php";
		url += "?KeepThis=true&TB_iframe=true&height=500&width=750&modal=false";
		url += "&media=" + guid;
	*/
	
	//var thickboxquery = "?KeepThis=true&TB_inline=true&height=500&width=800&modal=true";
	
	
	//var url = "http://www.google.com/"
	//var url = "http://colorvisiontesting.com/plate%20with%205.jpg";
	
	var htmlStr = "";
		htmlStr += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="680" height="550" id="mediaplayer" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="flashvars" value="feed=/blueplanet/services/media.xml&guid=';
		htmlStr += guid;
		htmlStr += '" /><param name="movie" value="/blueplanet/flash/mediaplayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="/blueplanet/flash/mediaplayer.swf" quality="high" bgcolor="#ffffff" width="680" height="550" name="mediaplayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="feed=/blueplanet/services/media.xml&guid=';
		htmlStr += guid;
		htmlStr += '" /></object>';				
	//alert(htmlStr);			
	document.getElementById('hiddenModalContent').innerHTML = htmlStr;
	
	
	var url = "#TB_inline?height=540&width=680&inlineId=hiddenModalContent&modal=true";				
	//alert(url)				
	tb_show("", url);
			
	//window.location = url;
}

function closeMedia()
{
	tb_remove();
}

function navRoll(obj, event){
	var str = new String(obj.src);
	var loc = new String(window.location);
	var depth = loc.substr(loc.indexOf("/blueplanet/"));
	var depthAry = depth.split('/');
	if(str.indexOf("active") == -1){
		if(depthAry.length > 3){
			obj.src = "../images/header/"+obj.id+"_"+event+".jpg";
		} else {
			obj.src = "images/header/"+obj.id+"_"+event+".jpg";
		}
	}
}
function initNav()
{
	var loc = new String(window.location);
	var depth = loc.substr(loc.indexOf("/blueplanet/"));
	var depthAry = depth.split('/');
	switch(true){
		case loc.indexOf("schedule") != -1:
			obj = document.getElementById("schedule");
			break;
		case loc.indexOf("conservation") != -1: 
			obj = document.getElementById("conservationtips");
			break;
		case loc.indexOf("stewardship") != -1: 
			obj = document.getElementById("stewardship");
			break;
		default:
			obj = document.getElementById("home");
			break;
	}
	if(depthAry.length > 3){
		obj.src = "../images/header/"+obj.id+"_active.jpg"; 
	} else {
		obj.src = "images/header/"+obj.id+"_active.jpg";
	}
}
function openPopup(url, name, style) 
{
/*
toolbar[=yes|no]|[=1|0]  location[=yes|no]|[=1|0]  directories[=yes|no]|[=1|0]  status[=yes|no]|[=1|0]  menubar[=yes|no]|[=1|0]  scrollbars[=yes|no]|[=1|0]  resizable[=yes|no]|[=1|0]  width=pixels  height=pixels
*/	
//so each window can be unique
if (!name)	name = new Date().getTime() + '';
if (!style)
	style = 'width=520,height=400,status=yes,menubar=no,toolbar=no,resizable=no,scrollbars=yes,location=no';
	var popupWindow = window.open(url,name,style);
	popupWindow.focus();
}
function popupPolicy(url, name, style) 
{
/*
toolbar[=yes|no]|[=1|0]  location[=yes|no]|[=1|0]  directories[=yes|no]|[=1|0]  status[=yes|no]|[=1|0]  menubar[=yes|no]|[=1|0]  scrollbars[=yes|no]|[=1|0]  resizable[=yes|no]|[=1|0]  width=pixels  height=pixels
*/	
//so each window can be unique
if (!name)	name = new Date().getTime() + '';
if (!style)
	style = 'width=650,height=400,status=yes,menubar=no,toolbar=no,resizable=no,scrollbars=yes,location=no';
	var popupWindow = window.open(url,name,style);
	popupWindow.focus();
}
