
//loadFlashjs
function loadFlash(fname,w,h,gubun) {
	var oStr = "";
	switch(gubun) {
	
	
		case "content":
		
			oStr  = "<Object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "
			oStr += "	codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 "
			oStr += "	width="+w+" height="+h+" align=middle>"
			oStr += "	<Param name=allowScriptAccess value=sameDomain />"
			oStr += "	<Param name=movie value="+fname+" />"
			oStr += "	<Param name=quality value=best />"
			oStr += "	<Param name=wmode value=transparent />"
			oStr += "	<Embed src="+fname+" width="+w+" height="+h+" name=index align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />"
			oStr += "</Object>"
			break;

		
		case "logo":
		
			oStr  = "<Object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "
			oStr += "	codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 "
			oStr += "	width="+w+" height="+h+" align=middle>"
			oStr += "	<Param name=allowScriptAccess value=sameDomain />"
			oStr += "	<Param name=movie value="+fname+" />"
			oStr += "	<Param name=quality value=best />"
			oStr += "	<Param name=wmode value=transparent />"
			oStr += "	<Embed src="+fname+" width="+w+" height="+h+" name=index align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />"
			oStr += "</Object>"
			break;

		case "movie":
		
			oStr  = "<Object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 "
			oStr += "	codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 "
			oStr += "	width="+w+" height="+h+" align=middle>"
			oStr += "	<Param name=allowScriptAccess value=sameDomain />"
			oStr += "	<Param name=movie value="+fname+" />"
			oStr += "	<Param name=quality value=best />"
			oStr += "	<param name=loop value=false />"
			oStr += "	<Param name=wmode value=transparent />"
			oStr += "	<Embed src="+fname+" width="+w+" height="+h+" name=index align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />"
			oStr += "</Object>"
			break;

		
		default:
			oStr = "<Embed src='"+fname+"'+ quality=high width="+w+" height="+h
			oStr += "	pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash></Embed>"
			break;	
	}
	
	document.write(oStr);
}

function loadMovie(src, width, height, auto_start) {
    if(src.indexOf('files')==0) src = request_uri+src;
    if(auto_start) auto_start = "true";
    else auto_start = "false";

    var clsid = "";
    var codebase = "";
    var html = "";

    if(/\.swf/i.test(src)) {
        clsid = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; 
        codebase = "https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0";
        html = ""+
            "<object classid=\""+clsid+"\" codebase=\""+codebase+"\" width=\""+width+"\" height=\""+height+"\" >"+
            "<param name=\"wmode\" value=\"transparent\" />"+
            "<param name=\"allowScriptAccess\" value=\"always\" />"+
            "<param name=\"movie\" value=\""+src+"\" />"+
            "<param name=\"quality\" value=\"high\" />"+
            "<embed src=\""+src+"\" autostart=\""+auto_start+"\"  width=\""+width+"\" height=\""+height+"\"></embed>"+
            "<\/object>";
    } else if(/\.flv/i.test(src)) {
        html = "<embed src=\""+request_uri+"common/tpl/images/flvplayer.swf?autoStart="+auto_start+"&file="+src+"\" width=\""+width+"\" height=\""+height+"\" type=\"application/x-shockwave-flash\"></embed>";
    } else {
        html = "<embed src=\""+src+"\" autostart=\""+auto_start+"\" width=\""+width+"\" height=\""+height+"\"></embed>";
    }

    document.writeln(html);
}