<!--
function writeVidCookie (cookieName, cookieValue, expiry) {
	var expDate = new Date();
	expDate.setTime (expDate.getTime() + expiry);
	document.cookie = cookieName + "=" + escape (cookieValue) + "; expires=" + expDate.toGMTString() + "; path=/";
	}
function video(movie,title,player,width,height,banner,bg,typeclass) {
	baseDomain = "http://www.hbo.com";
	// set vid cookie
	if (player == 'qt') { 
		writeVidCookie('hboVidPlayerPref', 'qt', 2678400000);
	}
	else if (player == 'real') {
		writeVidCookie('hboVidPlayerPref', 'rp', 2678400000);
	}
	if ( ( movie.indexOf("_ref.mov") != -1 ) || ( movie.indexOf(".ram") != -1 ) ) {
		// legacy clip, use modified player
		newVidURL = baseDomain + "/scripts/video/vidplayer_legacy.html?movie=" + movie + "&title=" + title;
		newWindow = window.open(newVidURL,"vplay","width=350,height=420,resizable=no,scrollbars=no,status=yes,location=no,menubar=no");
	}
	else {
		// conditional to determine if its a temp link or a new link		
		if ( movie.indexOf("+") != -1 ) {
			// new, has params
			newVidURL = baseDomain + "/scripts/video/vidplayer.html?movie=" + movie;
			newWindow = window.open(newVidURL,"vplay","width=700,height=515,toolbar=no,resizable=yes,scrollbars=no,status=yes,location=no,menubar=no");
		}
		else {
			pattern  = /\\'/;
			movieArray = movie.split("?ntrack_para1=");
			movie = movieArray[0];
			cleanTitle = title.replace(pattern,"'");
			cleanTitle = escape(cleanTitle);
			newVidURL = baseDomain + "/scripts/video/vidplayer_temp.html?movie=" + movie + "&title=" + cleanTitle;
			newWindow = window.open(newVidURL,"vplay","width=500,height=500,resizable=no,scrollbars=no,status=no,location=no,menubar=no");
		}
		newWindow.focus();
	}
}
// SCRIPT FOR LAUNCHING VIDEO IN A CAMPAIGN
function videoSpotlight(location) {
	window.open(location ,null , 'height=420,width=360,status=no,toolbar=no,menubar=no,location=no');
}
// -->
