/*
+-----------------------------------------------------------------------+
| SiSTeR Zoomer Javascript Code - embeddedplayers.js					|
+-----------------------------------------------------------------------+
| Copyright (c) 2003-2005 Silver Screen Tele-Reality, Inc.				|
+-----------------------------------------------------------------------+
| The contents of this source file are the sole property of				|
| Silver Screen Tele-Reality, Inc.										|
| Unauthorized duplication or access is prohibited.						|
+-----------------------------------------------------------------------+
*/

switch(client_type)
{
 case "WMV":
 case "FLV":
	var zFlash = new ZoomerFlash(playername,playername,client_type,ws_url,flash_width,flash_height,zoomername);
	var fullsizeFlash = new ZoomerFlash(fullsizegalleryObjId,playername,client_type,ws_url,flash_width,flash_height,galleryname);
	document.writeln('<div id="flashLayer">');

	document.writeln('<div id="flash_swf_layer" onmousemove="AlignDiv(flashLayer)";>');
	document.write(zFlash.ExportHTML());
	document.writeln('</div>');
	document.writeln('<div id="wmLayer">');
	if ( client_type == "WMV" ) 
	{ 
		var	zWMV = new ZoomerWMV("wmPlayer");
		document.write(zWMV.ExportHTML()); 
		document.write('<script type="text/javascript" for="wmPlayer" event="buffering(Start)">buffering(Start);</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="playStateChange(NewState)">updateplaystate(NewState);</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="error()">wmpErrorHandler();</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="DoubleClick(nButton, nShiftState, fX, fY)">DoubleClick(nButton, nShiftState, fX, fY);</script>');
	}
	document.write('<script type="text/javascript" >function ' + playername + '_DoFSCommand(command,args){ DoFSCommand(command,args); }</script>');
	if ( is_win && is_ie ) 
	{
		document.write('<script language=\"VBScript\"\>\n');
		document.write('On Error Resume Next\n');
		document.write('Sub ' + playername + '_FSCommand(ByVal command, ByVal args)\n');
		document.write(' Call DoFSCommand(command, args)\n');
		document.write('End Sub\n');
		document.write('</script\>\n');
	}
	document.write('<script type="text/javascript" >function ' + fullsizegalleryObjId + '_DoFSCommand(command,args){ DoFSCommand(command,args);}</script>');
	if ( is_win && is_ie ) 
	{
		document.write('<script language=\"VBScript\"\>\n');
		document.write('On Error Resume Next\n');
		document.write('Sub ' + fullsizegalleryObjId + '_FSCommand(ByVal command, ByVal args)\n');
		document.write(' Call DoFSCommand(command, args)\n');
		document.write('End Sub\n');
		document.write('</script\>\n');
	}
	document.writeln('</div>');
	document.writeln('</div>');
	document.writeln('<div id="fullsizegallery_layer" onmousemove="AlignDiv(fullsizegallery_layer);">');
	document.write(fullsizeFlash.ExportHTML());
	document.writeln('</div>');
	document.writeln('<div id="dragLayer" class="layerOutline"></div>');
	document.writeln('<div id="dragGalleryLayer" class="layerOutline"></div>');
	initzoomer();
	break;
case "SA":
	var zStandalone = new StandalonePlayer("wmPlayer",mediaid);
	document.write(zStandalone.ExportHTML());
	break;
case "WMV_SA":
case "FLV_SA":
	var zFlash = new ZoomerFlash(playername,playername,client_type,ws_url,flashSA_width,flashSA_height,zoomername);
	document.writeln('<div id="flashLayer">');
	document.writeln('<div id="flash_swf_layer">');
	document.write(zFlash.ExportHTML());
	document.writeln('</div>');
	document.writeln('<div id="wmLayer">');
	if ( client_type == "WMV_SA" ) 
	{ 
		var	zWMV = new ZoomerWMV("wmPlayer");
		document.write(zWMV.ExportHTML()); 
		document.write('<script type="text/javascript" for="wmPlayer" event="buffering(Start)">buffering(Start);</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="playStateChange(NewState)">updateplaystate(NewState);</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="error()">wmpErrorHandler();</script>');
		document.write('<script type="text/javascript" for="wmPlayer" event="DoubleClick(nButton, nShiftState, fX, fY)">DoubleClick(nButton, nShiftState, fX, fY);</script>');
	}
	document.write('<script type="text/javascript" >function ' + playername + '_DoFSCommand(command,args){ DoFSCommand(command,args); }</script>');
	if ( is_win && is_ie ) 
	{
		document.write('<script language=\"VBScript\"\>\n');
		document.write('On Error Resume Next\n');
		document.write('Sub ' + playername + '_FSCommand(ByVal command, ByVal args)\n');
		document.write(' Call DoFSCommand(command, args)\n');
		document.write('End Sub\n');
		document.write('</script\>\n');
	}
	document.writeln('</div>');
	document.writeln('</div>');
	document.writeln('<div id="dragLayer" class="layerOutline"></div>');
	initzoomer();
break;
}
