popup = '';

function hideContent(d) {
  if(d.length < 1) { return; }
  document.getElementById(d).style.display = "none";
}
function showContent(d) {
  if(d.length < 1) { return; }
  if(popup) document.getElementById(popup).style.display = 'none';
  document.getElementById(d).style.display = "block";
  popup = d;
}
function showEmail(d) {
	el = document.getElementById('email_message');
	var str = el.value;
	str = str.replace(/#URL#/,location.href);
	el.value=str;
	showContent (d);
}
function showVideo(num)	{	
	// create an empty container if it doesn't exist.
	// the container is removed by removeSWF()
	var v = document.getElementById("video_player");
	if (!v) {
		var d = document.createElement("div");
		d.setAttribute("id", "video_player");
		document.getElementById("video_popup").appendChild(d);
	}
	
	var params = {};
	params.allowfullscreen=true;
	params.allowscriptaccess=true;
	var flashvars = {};
	flashvars.file="playlist.asx";
	flashvars.item=num;
	swfobject.embedSWF("player.swf", "video_player", "400", "250", "8.0.0",'js/expressInstall.swf',flashvars,params);

	showContent('video_popup');	
	
}

function hideVideo() {
	swfobject.removeSWF('video_player');
	hideContent('video_popup');
}




