function onSilverlightError(sender, args) {
	var appSource = "";
	if (sender != null && sender != 0) {
		appSource = sender.getHost().Source;
	}
	var errorType = args.ErrorType;
	var iErrorCode = args.ErrorCode;
	var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n";
		errMsg += "Code: " + iErrorCode + "    \n";
		errMsg += "Category: " + errorType + "       \n";
		errMsg += "Message: " + args.ErrorMessage + "     \n";
		if (errorType == "ParserError") {
			errMsg += "File: " + args.xamlFile + "     \n";
			errMsg += "Line: " + args.lineNumber + "     \n";
			errMsg += "Position: " + args.charPosition + "     \n";
		} else if (errorType == "RuntimeError") {
			if (args.lineNumber != 0) {
				errMsg += "Line: " + args.lineNumber + "     \n";
				errMsg += "Position: " + args.charPosition + "     \n";
			}
			errMsg += "MethodName: " + args.methodName + "     \n";
		}
	throw new Error(errMsg);
}
//
document.write("<!-- Runtime errors from Silverlight will be displayed here.\n");
document.write("This will contain debugging information and should be removed or hidden when debugging is completed -->\n");
document.write("<div id='errorLocation' style='font-size: small;color: Gray;'></div>\n");
document.write("<div id='silverlightControlHost'>\n");
document.write("<object data='data:application/x-silverlight,' type='application/x-silverlight' width='560' height='340'>\n");
document.write("	<param name='source' value='http://ss.dogate.jp/massive4d/MediaPlayerTemplate.xap'/>\n");
document.write("	<param name='onerror' value='onSilverlightError' />\n");
document.write("	<param name='autoUpgrade' value='true' />\n");
document.write("	<param name='minRuntimeVersion' value='3.0.40624.0' />\n");
document.write("	<param name='enableHtmlAccess' value='true' />\n");
document.write("	<param name='enableGPUAcceleration' value='true' />\n");
document.write("	<param name='initparams' value='playerSettings = \n");
document.write("		<Playlist>\n");
document.write("			<AutoLoad>true</AutoLoad>\n");
document.write("			<AutoPlay>false</AutoPlay>\n");
document.write("			<DisplayTimeCode>false</DisplayTimeCode>\n");
document.write("			<EnableCachedComposition>true</EnableCachedComposition>\n");
document.write("			<EnableCaptions>true</EnableCaptions>\n");
document.write("			<EnableOffline>true</EnableOffline>\n");
document.write("			<EnablePopOut>true</EnablePopOut>\n");
document.write("			<StartMuted>false</StartMuted>\n");
document.write("			<StretchMode>None</StretchMode>\n");
document.write("			<Items>\n");
document.write("				<PlaylistItem>\n");
document.write("					<AudioCodec>AAC</AudioCodec>\n");
document.write("					<Description></Description>\n");
document.write("					<FileSize>206029478</FileSize>\n");
document.write("					<FrameRate>15</FrameRate>\n");
document.write("					<Height>340</Height>\n");
document.write("					<IsAdaptiveStreaming>true</IsAdaptiveStreaming>\n");
document.write("					<MediaSource>http://ss.dogate.jp/massive4d/massive4d.ism/Manifest</MediaSource>\n");
document.write("					<ThumbSource>http://ss.dogate.jp/massive4d/Preview.png</ThumbSource>\n");
document.write("					<Title>SOUDEARUYOUNI</Title>\n");
document.write("					<VideoCodec>H264</VideoCodec>\n");
document.write("					<Width>560</Width>\n");
document.write("				</PlaylistItem>\n");
document.write("			</Items>\n");
document.write("		</Playlist>'/>\n");
document.write("		<!--  unused valid silverlight init parameters\n");
document.write("		<param name='enableFrameRateCounter' value='bool' />\n");
document.write("		<param name='enableRedrawRegions' value='bool' />\n");
document.write("		<param name='maxFrameRate' value='int' />\n");
document.write("		<param name='allowHtmlPopupWindow' value='bool'/>\n");
document.write("		<param name='background' value='colorValue'/>\n");
document.write("		<param name='splashScreenSource' value='uri'/>\n");
document.write("		<param name='fullScreen' value='bool'/>\n");
document.write("		<param name='onFullScreenChanged' value='functionname'/>\n");
document.write("		<param name='onResize' value='functionname'/>\n");
document.write("		<param name='onSourceDownloadComplete' value='functionname'/>\n");
document.write("		<param name='onSourceDownloadProgressChanged' value='functionname'/>\n");
document.write("		<param name='windowLess' value='bool'/>\n");
document.write("		 --> \n");
document.write("		<div onmouseover='highlightDownloadArea(true)' onmouseout='highlightDownloadArea(false)'>\n");
document.write("			<img src='http://ss.dogate.jp/massive4d/Preview.png' style='position:absolute;width:100%;height:100%;border-style:none;' onerror=\"this.style.display='none'\" />\n");
document.write("			<img src='http://ss.dogate.jp/massive4d/Preview.png' style='position:absolute;width:100%;height:100%;border-style:none;' onerror=\"this.style.display='none'\" />\n");
document.write("			<div id='overlay' class='fadeLots' style='position:absolute;width:560;height:340;border-style:none;background-color:white;'/></div>\n");
document.write("			<table width='560' height='340' style='position:absolute;'>\n");
document.write("				<tr>\n");
document.write("					<td align='center' valign='middle'>\n");
document.write("						<img src='http://go2.microsoft.com/fwlink/?LinkId=108181' alt='Get Microsoft Silverlight'>\n");
document.write("					</td>\n");
document.write("				</tr>\n");
document.write("			</table>\n");
document.write("			<a href='http://go2.microsoft.com/fwlink/?LinkID=124807'>\n");
document.write("				<img src='' class='fadeCompletely' style='position:absolute;width:560;height:340;border-style:none;' alt='Get Microsoft Silverlight'/>\n");
document.write("			</a>\n");
document.write("		</div>\n");
document.write("	</object>\n");
document.write("	<iframe id='_sl_historyFrame' style='visibility:hidden;height:0;width:0;border:0px'></iframe>\n");
document.write("</div>");

