// JavaScript Document

//var thePath = "http://192.168.1.2/VPK/Toolkit/site";
//var thePath = "http://test.distancelearn.org/vpkHistory";
var thePath = "";

// parameters; if you include any optional parameters, you must include all parameters that come before it
// 0-videoName, required
// 1-relative location to _movies directory containing playbackCC.swf, optional, default is '../'
// 2-width, optional, default is '400px'
// 3-height, optional, default is '300px'
function writeVideo()
{
	allArgs = writeVideo.arguments;
	videoName = allArgs[0];
	relativeLocation = "../";
	if( allArgs.length > 1 )
		relativeLocation = allArgs[1];
	width = "400px";
	if( allArgs.length > 2 )
		width = allArgs[2];
	height = "300px";
	if( allArgs.length > 3 )
		height = allArgs[3];
	
	var loc = String(window.location);
	var sIndex = loc.indexOf("mathThink");
	var newPath = loc.substr( 0, sIndex );
//	alert("!!!!"+sIndex+"   ||   "+newPath);
	
	document.writeln("<embed name='theFLVPB' title='Videos' src='" + newPath + "mathThink/_movies/playbackCC.swf?hexValue=#FFFFFF&amp;messenger=" + videoName + "&amp;thePath=" + newPath + "mathThink/_movies/' quality='high' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' swliveconnect='true' wmode='transparent' allowscriptaccess='always' type='application/x-shockwave-flash' width='" + width + "' height='" + height + "'></embed> ");
}

function writeVideoFull(videoName)
{
	var loc = String(window.location);
	var sIndex = loc.indexOf("mathThink");
	var newPath = loc.substr( 0, sIndex );
	content = "<embed name='theFLVPB' title='Videos' src='../_movies/playbackCC.swf?hexValue=#FFFFFF&amp;messenger=" + videoName + "&amp;thePath=" + newPath + "/mathThink/_movies/' quality='high' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' swliveconnect='true' wmode='transparent' allowscriptaccess='always' type='application/x-shockwave-flash' width='100%' height='100%'></embed> ";
	writeWindow(content, 800, 600);
}