function bt()
{
	if(document.layers)
	{
		return "NN4";
	}
	if(document.all)
	{
		return "IE"
	}
	if(!document.all && document.getElementById)
	{
		return "NN6";
	}
}

function getElement(id)
{
	switch(bt())
	{
		case "NN6":
			return document.getElementById(id);
		case "NN4":
			return eval("document." + id);
		default:
			return document.all[id];
	}
}

function writeVideoStill(id, image_url)
{
	var still_html = "<div class=\"video_still\" id=\"v" + id + "\" >" +
		"<img id=\"video_player" + id + "\" " +
		"border=\"0\" src=\"" + image_url + "\" " +
		"onclick=\"loadGooglePlayer('" + id + "');\" />" +
		"</div>"
		
	document.write(still_html);
}

function loadGooglePlayer(id)
{
	var video_html = "<embed id=\"flashPlayer\" " +
		"style=\"width:400px; height:326px;\" " +
		"type=\"application/x-shockwave-flash\" " +
		"src=\"http://video.google.com/googleplayer.swf?docId=" + id + "&amp;hl=en\" " +
		"align=\"middle\" " +
		"quality=\"best\" bgcolor=\"#ffffff\" " +
		"scale=\"noScale\" salign=\"TL\" " +
		"flashvars=\"playerMode=embedded\" " +
		"autoplay=\"true\" flashVars=\"autoplay=true\"> " +
		"</embed>";

	var video_span = getElement("v" + id);
	video_span.innerHTML = video_html;
}