function send_to_omniture(myText) {
	var sendThis = myText;
	//alert(sendThis);
	var s=s_gi(s_account);
	s.linkTrackVars='prop1,prop9,server';
	s.linkTrackEvents='None';
	s.server='hbo.com';
	s.prop1="HBO"
	s.prop9=sendThis;
	s.t(this,'o',myText);
}


// special slideshow window
function winPopSlideshow(url,width,height)
{
	window.open(
	url,
	"HBOwinpop",
	"screenX=10,screenY=10,left=10,top=10,toolbar=no,location=no,resizable=no,scrollbars=no,status=no,height=" + height + ",width=" + width);
}

// generic open window script


doclay = (document.layers)? true : false
docall = (document.all)? true : false
docget = (document.getElementById)? true : false

function show(x) {
	layerName = x;
	document.getElementById(layerName).style.display = "block";
}

function hide(x) {
	layerName = x;
	document.getElementById(layerName).style.display = "none";
}


function switchTheActors() {
if (document.getElementById) {
    document.getElementById('actors').innerHTML = '<img src="/entourage/img/castandcrew/template/btn_theactors_on.jpg" alt="The Actors" width="77" height="16" border="0">';
      }
}

function unswitchTheActors() {
if (document.getElementById) {
      document.getElementById('actors').innerHTML = '<a href="javascript:void(0);" onClick="show(\'TheActors\');switchTheActors();"><img src="/entourage/img/castandcrew/template/btn_theactors_off.jpg" alt="The Actors" width="77" height="16" border="0"></a>';
       	}
}

function switchTheGuys() {
if (document.getElementById) {
    document.getElementById('guys').innerHTML = '<img src="/entourage/img/castandcrew/template/btn_theguys_on.jpg" alt="The Guys" width="72" height="16" border="0">';
      }
}

function unswitchTheGuys() {
if (document.getElementById) {
      document.getElementById('guys').innerHTML = '<a href="javascript:void(0);" onClick="show(\'TheGuys\');switchTheGuys();"><img src="/entourage/img/castandcrew/template/btn_theguys_off.jpg" alt="The Guys" width="72" height="16" border="0"></a>';
       	}
}


function switchArchives() {
if (document.getElementById) {
    document.getElementById('archivesImg').innerHTML = '<img src="/entourage/img/episodeguide/season05/template/btn_archives_on.gif" alt="Archives" width="62" height="16" border="0">';
      }
}

function switchArchivesSeaSix() {
if (document.getElementById) {
    document.getElementById('archivesImg').innerHTML = '<img src="/entourage/img/season6/episode_guide/btn_archives_on.gif" alt="Archives" width="62" height="16" border="0">';
      }
}

function unswitchArchives() {
if (document.getElementById) {
      document.getElementById('archivesImg').innerHTML = '<a href="javascript:void(0);" onClick="show(\'Archives\');switchArchives();"><img src="/entourage/img/episodeguide/season05/template/btn_archives_off.gif" alt="Archives" width="62" height="16" border="0"></a>';
       	}
}

function unswitchArchivesSeaSix() {
if (document.getElementById) {
      document.getElementById('archivesImg').innerHTML = '<a href="javascript:void(0);" onClick="show(\'ArchivesSeaSix\');switchArchivesSeaSix();"><img src="/entourage/img/season6/episode_guide/btn_archives_off.gif" alt="Archives" width="62" height="16" border="0"></a>';
       	}
}

function switchEpisodes() {
if (document.getElementById) {
    document.getElementById('episodesImg').innerHTML = '<img src="/entourage/img/episodeguide/season05/template/btn_moreepisodes_on.gif" alt="More Episodes" width="91" height="16" border="0">';
      }
}

function switchEpisodesSeaSix() {
if (document.getElementById) {
    document.getElementById('episodesImg').innerHTML = '<img src="/entourage/img/season6/episode_guide/btn_moreepisodes_on.gif" alt="More Episodes" width="91" height="16" border="0">';
      }
}

function unswitchEpisodes() {
if (document.getElementById) {
      document.getElementById('episodesImg').innerHTML = '<a href="javascript:void(0);" onClick="show(\'Episodes\');switchEpisodes();"><img src="/entourage/img/episodeguide/season05/template/btn_moreepisodes_off.gif" alt="More Episodes" width="91" height="16" border="0"></a>';
       	}
}

function unswitchEpisodesSeaSix() {
if (document.getElementById) {
      document.getElementById('episodesImg').innerHTML = '<a href="javascript:void(0);" onClick="show(\'EpisodesSeaSix\');switchEpisodesSeaSix();"><img src="/entourage/img/season6/episode_guide/btn_moreepisodes_off.gif" alt="More Episodes" width="91" height="16" border="0"></a>';
       	}
}

function showEpisode() {
	document.getElementById('Episode').style.display = "block";
}

function hideEpisode() {
	document.getElementById('Episode').style.display = "none";
}

function showBio() {
	document.getElementById('Bio').style.display = "block";
}

function hideBio() {
	document.getElementById('Bio').style.display = "none";
}

function showLayer(x) {
layerNum = "mojo" + x;
document.getElementById(layerNum).style.display = "block"; 
}

function hideLayer(x) {
layerNum = "mojo" + x;
document.getElementById(layerNum).style.display = "none"; 
}



function showepLayer(x) {
layerNum = "epmojo" + x;
document.getElementById(layerNum).style.display = "block"; 
}

function hideepLayer(x) {
layerNum = "epmojo" + x;
document.getElementById(layerNum).style.display = "none"; 
}

function openWindow(theURL,winName,features) {

window.open(theURL,winName,features);

}

function openGolfGame() {
	popGameWindow = window.open('/entourage/golf/redirect.html','_golf','screenX=10,screenY=10,left=10,top=10,toolbar=no,location=no,resizable=no,scrollbars=no,status=no,height=620,width=780');
}

// function for podcasts

function launchPodcasts(formY) {
	var num = eval("document." + formY + ".menudo.selectedIndex");
	var infostring = eval("document." + formY + ".menudo.options[num].value");
	if (infostring == "blank") {
		alert("Choose a podcast first from the pulldown menu, then click the link to view!") ;
		return;
	}
	this.window.location.href = infostring;
}


// function for handling the episode guide dropdown

function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}


// function for login and bbs

function talkcity(bbslink) {

bbswindow=window.open(bbslink,"","personalbar=no,menubar=yes,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=yes,height=500,width=710")
}


// function for popup poll results

function popUpResultsWin(height, width, url) {
window.open(
            "",
            "PollResults",
            "width="+width+",height="+height+",RESIZABLE=NO,SCROLLBARS=YES"
     );
}


// functions for video

function seriesVideo(formX) {
	var num = eval("document." + formX + ".menudo.selectedIndex");
	var infostring = eval("document." + formX + ".menudo.options[num].value");
	if (infostring == "blank") {
		alert("Choose a clip first from the pulldown menu, then click your player to view!") ;
		return;
	}
	var vplayWin = window.open('/scripts/video/vidplayer.html?movie=' + infostring,'vplay','width=700,height=515,status=yes');
}


// function for kostas flash objects


var extWin;

function openWin(url,w,h){
	var x = (screen.width - w)/2;
	var y = (screen.height - h)/3;
	if(typeof(extWin)=="undefined" || extWin.closed==true){
		extWin = window.open(url,"external","width="+w+",height="+h+",left="+x+",top="+y+",toolbar=no,location=no,menubar=no,status=no,scrollbars=no,resizable=no");
		if(extWin.opener == null) extWin.opener = window;
		extWin.w = w;
		extWin.h = h;
	} else {
		if(w != extWin.w || h != extWin.h){
			extWin.resizeTo(w,h);
			extWin.moveTo(x,y);
			extWin.w = w;
			extWin.h = h;
		}
		if(extWin.location != url) extWin.location = url;
		extWin.focus();
	}
}

// generic open window script

function openWindow(theURL,winName,features) {

window.open(theURL,winName,features);

}
