//
// Google Video
//
function openNewWindow(videoId, videoTitle) {
    pageTracker._trackPageview('/videos/' + videoTitle);
    pageTracker._trackEvent('videos', 'play', videoTitle);
    var w
	w = window.open("video.cfm", "", "height=400, width=440, top=10, left=10, directories=0, location=0, menubar=0, resizable=1, status=0, titlebar=0, toolbar=0");
//    w.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
//    w.document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >');
    w.document.write('<!DOCTYPE html>');
    w.document.write('<html lang="en" dir="ltr">');
	w.document.write("<head>");
    w.document.write("<title>"+videoTitle+"</title>");
//    w.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
    w.document.write("</head>");
	w.document.write("<body>");
	w.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>");
	w.document.write("<tr>");
	w.document.write("<td align=center valign=center>");
	w.document.write("<embed style='width:400px; height:326px;' id='VideoPlayback' type='application/x-shockwave-flash' src='http://video.google.com/googleplayer.swf?docId="+videoId+"&hl=en' FlashVars='autoPlay=True'></embed><br><br>");
	w.document.write("<form>");
	w.document.write("<input type='button' value='Close Window' onClick='window.close()'>");
	w.document.write("</form>");
	w.document.write("</td>");
	w.document.write("</tr>");
	w.document.write("</body>");
	w.document.write("</html>");
	w.document.close();
}
//
// YouTube Custom Player
//
function openNewWindowYT(videoId, videoTitle) {
    pageTracker._trackPageview('/videos/' + videoTitle);
    pageTracker._trackEvent('videos', 'play', videoTitle);
    var w
	w = window.open("", "", "height=475, width=765, top=10, left=10, directories=0, location=0, menubar=0, resizable=1, status=0, titlebar=0, toolbar=0");
    w.document.write('<!DOCTYPE html>');
    w.document.write('<html lang="en" dir="ltr">');
	w.document.write("<head>");
    w.document.write("<title>"+videoTitle+"</title>");
    w.document.write("</head>");
	w.document.write("<body>");
	w.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>");
	w.document.write("<tr>");
	w.document.write("<td align=center valign=center>");
	w.document.write("<object width='746' height='413'>");
	w.document.write("<param name='movie' value='http://www.youtube.com/cp/" + videoId + "'></param>");
	w.document.write("<embed src='http://www.youtube.com/cp/" + videoId + "&autoplay=1' type='application/x-shockwave-flash' width='746' height='413'></embed>");
	w.document.write("</object>");
    w.document.write("</td>");
    w.document.write("</tr>");
    w.document.write("<tr align=center valign=center>");
    w.document.write("<td>");
    w.document.write("<br>");
	w.document.write("<form>");
	w.document.write("<input type='button' value='Close Window' onClick='window.close()'>");
	w.document.write("</form>");
    w.document.write("</td>");
	w.document.write("</tr>");
	w.document.write("</body>");
	w.document.write("</html>");
	w.document.close();
}
//
// YouTube Video
//
function openNewWindowYTV(videoId, videoTitle) {
    pageTracker._trackPageview('/videos/' + videoTitle);
    pageTracker._trackEvent('videos', 'play', videoTitle);
    var w
	w = window.open("", "", "height=420, width=450, top=10, left=10, directories=0, location=0, menubar=0, resizable=1, status=0, titlebar=0, toolbar=0");
    w.document.write('<!DOCTYPE html>');
    w.document.write('<html lang="en" dir="ltr">');
	w.document.write("<head>");
    w.document.write("<title>"+videoTitle+"</title>");
    w.document.write("</head>");
	w.document.write("<body>");
	w.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>");
	w.document.write("<tr>");
	w.document.write("<td align=center valign=center>");
	w.document.write("<object width='445' height='364'>");
	w.document.write("<param name='movie' value='http://www.youtube.com/v/" + videoId + "&color1=0xb1b1b1&color2=0xd0d0d0&hl=en_US&feature=player_embedded&fs=1'></param>");
    w.document.write("<param name='allowFullScreen' value='true'></param>");
    w.document.write("<param name='allowscriptaccess' value='always'></param>");
	w.document.write("<embed src='http://www.youtube.com/v/" + videoId + "&color1=0xb1b1b1&color2=0xd0d0d0&autoplay=1&hl=en_US&feature=player_embedded&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' allowScriptAccess='always' width='425' height='344'></embed>");
	w.document.write("</object>");
    w.document.write("</td>");
    w.document.write("</tr>");
    w.document.write("<tr align=center valign=center>");
    w.document.write("<td>");
    w.document.write("<br>");
	w.document.write("<form>");
	w.document.write("<input type='button' value='Close Window' onClick='window.close()'>");
	w.document.write("</form>");
    w.document.write("</td>");
	w.document.write("</tr>");
	w.document.write("</body>");
	w.document.write("</html>");
	w.document.close();
};
//
// YouTube Playlist
//
function openNewWindowYTP(videoId, videoTitle) {
    pageTracker._trackPageview('/videos/' + videoTitle);
    pageTracker._trackEvent('videos', 'play', videoTitle);
    var w
	w = window.open("", "", "height=450, width=500, top=10, left=10, directories=0, location=0, menubar=0, resizable=1, status=0, titlebar=0, toolbar=0");
    w.document.write('<!DOCTYPE html>');
    w.document.write('<html lang="en" dir="ltr">');
	w.document.write("<head>");
    w.document.write("<title>"+videoTitle+"</title>");
    w.document.write("</head>");
	w.document.write("<body>");
	w.document.write("<table width=100% border=0 cellspacing=0 cellpadding=0>");
	w.document.write("<tr>");
	w.document.write("<td align=center valign=center>");
	w.document.write("<object width='480' height='385'>");
	w.document.write("<param name='movie' value='http://www.youtube.com/p/" + videoId + "&hl=en_US&fs=1'></param>");
	w.document.write("<param name='allowFullScreen' value='true'></param>");
	w.document.write("<param name='allowscriptaccess' value='always'></param>");
	w.document.write("<embed src='http://www.youtube.com/p/" + videoId + "&autoplay=1&hl=en_US&fs=1' type='application/x-shockwave-flash' width='480' height='385' allowscriptaccess='always' allowfullscreen='true'></embed>");
	w.document.write("</object>");
    w.document.write("</td>");
    w.document.write("</tr>");
    w.document.write("<tr align=center valign=center>");
    w.document.write("<td>");
    w.document.write("<br>");
	w.document.write("<form>");
	w.document.write("<input type='button' value='Close Window' onClick='window.close()'>");
	w.document.write("</form>");
    w.document.write("</td>");
	w.document.write("</tr>");
	w.document.write("</body>");
	w.document.write("</html>");
	w.document.close();
};
