//Flash
function writeFlash(url,width,height,etc){	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" width="'+ width +'" height="'+ height +'">');
	document.write('<param name="allowScriptAccess" value="always" />');
	document.write('<param name="movie" value="'+ url +'"/>');
	document.write('<param name="quality" value="high"/>');
	document.write('<embed src="'+ url +'" quality="high" name="extenalInterface" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed>');
	document.write('</object>');
}


function writeFlashScript(url,width,height,id,etc){	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0" width="'+ width +'" height="'+ height +'" id="'+ id +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+ url +'"/>');
	document.write('<param name="quality" value="high"/>');
	document.write('<embed src="'+ url +'" quality="high" name="extenalInterface" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed>');
	document.write('</object>');
}


function writeFlashTrans(url,domain,width,height,etc){	
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ width +'" height="'+ height +'" id="addword">');
	document.write('<param name="movie" value="'+ url +'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name=wmode value=transparent>');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="allowFullScreen" value="false" />');
	document.write('<param name="FlashVars" value="ServerDomain='+domain+'">');
	document.write('<embed src="'+ url +'"" FlashVars="ServerDomain='+domain+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed>');
	document.write('</object>');
}

//Media Player(CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95)
function writeMedia_lecture(id, url,width,height,AnimationAtStart,ShowStatusBar,ShowControls,Volume,etc){
	document.write('<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" width="'+ width +'" height="'+ height +'" id="'+ id +'" standby="Loading Microsoft?Windows?Media Player components..." type="application/x-oleobject">');
	document.write('<param name="transparentAtStart" value="True">');
	document.write('<param name="transparentAtStop" value="True">'); 
	document.write('<param name="AnimationAtStart" value="'+ AnimationAtStart +'">');
	document.write('<param name="AutoStart" value="true">'); 
	document.write('<param name="AutoRewind" value="true">'); 
	document.write('<param name="DisplaySize" value="0">'); 
	document.write('<param name="AutoSize" value="false">'); 
	document.write('<param name="ShowDisplay" value="False">');  
	document.write('<param name="ShowStatusBar" value="'+ ShowStatusBar +'">'); 
	document.write('<param name="ShowControls" value="'+ ShowControls +'">'); 
	document.write('<param name="BufferingTime" value="5">'); 
	document.write('<param name="EnableFullScreenControls" value="-1">'); 
	document.write('<param name="DisplayMode" value="0">'); 
	document.write('<param name="Rate" value="1">'); 
	document.write('<param name="SendMouseClickEvents" value="0">'); 
	document.write('<param name="AllowChangeDisplaySize" value="-1">'); 
	document.write('<param name="FileName" value="'+ url + '">'); 
	document.write('<param name="Volume" value="'+ Volume +'">'); 
	document.write('</object>');
}

//Media Player(CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6)
function writeMedia(id, url,width,height,AnimationAtStart,ShowStatusBar,ShowControls,Volume,etc){
	document.write('<object id="'+ id +'" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 height='+ height +' type=application/x-oleobject  width='+ width +' standby="Loading Microsoft Windows Media Player components..." align="top" vspace="0" hspace="0">' );
	//document.write('<param name="FileName" value="'+ url +'">');
	//document.write('<param name="TransparentatStart" value="true">');
	//document.write('<param name="TransparentAtStop" value="true">'); 
	//document.write('<param name="AnimationatStart" value="'+ AnimationAtStart +'">');
	document.write('<param name="AutoStart" value="1">'); //À¯È¿ÇÑ Param
	//document.write('<param name="AutoRewind" value="true">'); 
	//document.write('<param name="DisplayBackColor" value="1">'); 
	//document.write('<param name="DisplayForeColor" value="16777215">'); 
	//document.write('<param name="DisplaySize" value="0">'); 
	//document.write('<param name="AutoSize" value="flase">'); 
	//document.write('<param name="ShowDisplay" value="false">');  
	//document.write('<param name="ShowStatusBar" value="'+ ShowStatusBar +'">'); 
	//document.write('<param name="ShowControls" value="'+ ShowControls +'">'); 
	
	if(ShowControls) uiMode = "full"
	else uiMode = "none"

	document.write('<param name="uiMode" value="'+ uiMode +'">'); //À¯È¿ÇÑ Param
	//document.write('<param name="BufferingTime" value="5">'); 
	document.write('<param name="Volume" value="'+ Volume +'">'); //À¯È¿ÇÑ Param
	//document.write('<param name="EnableFullScreenControls" value="-1">'); 
	//document.write('<param name="DisplayMode" value="0">'); 
	document.write('<param name="Rate" value="1">'); //À¯È¿ÇÑ Param
	//document.write('<param name="SendMouseClickEvents" value="0">'); 
	//document.write('<param name="AllowChangeDisplaySize" value="-1">'); 
	document.write('<param name="url" value="'+ url + '">'); //À¯È¿ÇÑ Param
	document.write('</object>');

	//alert(document.all("Player").innerHTML);

	//balance 0
	//currentPosition 0
	//playCount 1
	//currentMarker 0
	//invokeURLs
	//mute  0
	//stretchToFit 0
	//enabled -1
	//enableContextMenu -1
	//fullScreen 0
}

//Real Player
function writeReal(url,width,height,etc){
	document.write('<object classid="clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" width="'+ width +'" height="'+ height +'">');
	document.write('<param name="src" value="'+ url +'">');
	document.write('<param name="controls" value="ControlPanel">');
	document.write('<embed src="'+ url +'"" controls="ControlPanel" width="'+ width +'" height="'+ height +'"></embed>');
	document.write('</object>');
}

//Engo °­ÀÇ
function writeEngo(url,width,height,etc){
	document.write('<object classid="CLSID:15B782AF-55D8-11D1-B477-006097098764" codebase="http://download.macromedia.com/pub/shockwave/cabs/authorware/awswaxf.cab#version=6,0,0,64" width="'+ width +'" height="'+ height +'" align="middle">');
	document.write('<PARAM NAME="SRC" VALUE="'+ url +'">');
	document.write('<PARAM NAME="PALETTE" VALUE="background">');
	document.write('<EMBED WIDTH="'+ width +'" HEIGHT="'+ height +'" SRC="'+ url +'" PALETTE="background" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/alternates/index.html" bgcolor="#979797"></EMBED>');
	document.write('</object>');
}

//½Ç½Ã°£°­ÀÇ(Seevoice)
function writeSeevoice(etc){
	document.write('<object id="svfileselect" classid="clsid:3A22DAF6-3102-4221-AB03-927DB93BA70C" width="0" height="0" codeBase="ocx/svkcuilt.cab#version=1,0,0,3">');
	document.write('<param NAME="DefaultExtension" VALUE="ILT KCU Content File (*.ilt)|*.ilt||">');
	document.write('<param NAME="ButtonCaption" VALUE="ÄÁÅÙÆ® ¼±ÅÃ">');
	document.write('</object>');
	document.write('<object id="svfiletransfer" classid="clsid:262CD78F-4925-4490-8968-7AC6740B6B8A" width="0" height="0" codeBase="ocx/svkcuilt.cab#version=1,0,0,2">');
	document.write('</object>');
}

//¼ÓµµÁ¶Àý±â´É(MagicSpeeder)
function writeSpeeder(etc){
	document.write('<object ID="MagicSpeeder" classid="clsid:BDD22343-1DF0-4983-947F-7604DD9838F8" width=0 height=0 codebase="/include/magicspeed/MagicSpeeder.cab#Version=2,0,7,1">');
	document.write('</object>');
}



function writeDextDownX(width,height) {
	document.write('<OBJECT ID="FileDownloadMonitor" height="' + width + '" width="' + height + '" CodeBase = "http://www.kcu.ac/DEXTUploadX/DEXTUploadX.CAB#DEXTUploadX.cab#version=2,3,0,0" CLASSID="CLSID:471678BB-F992-4BE6-9761-7767883E8619">');
	document.write('<PARAM NAME="ListViewStyle" VALUE="LVS_ICON">');
	document.write('</OBJECT>');
}

function writeWebEditor(width,height)
{
	var clsid =  "B68F7290-6A1E-4a36-BD3E-DE0D306159CA";
	var version = "2,5,0,16";
	var cab = "/include/tagfree/tweditor.cab";
	var env = "/include/tagfree/env.xml";
	var id = "twe";
	var applyinitdata = 1;//apply:1
	var editmode = 0;//edit:0
	document.write('<object ID="'+id+'" width="' + width + '" height="' + height + '" CLASSID="CLSID:'+clsid+'" CODEBASE="'+cab+'#version='+version+'">');
	document.write('<PARAM name="InitFile" value="'+env+'"/>');
	document.write('<PARAM name="ApplyInitData" VALUE="'+applyinitdata+'"/>');
	document.write('<PARAM name="Mode" VALUE="'+editmode+'"/>');
	document.write('</object>');
}

// ASP¿¡¼­´Â Æû ÇÊµåÀÇ ÇÑ°è°¡ 100KÀÌ¹Ç·Î 100K¾¿ Àß¶ó¼­ Àü¼ÛÇÑ´Ù
/*
function DivideString(strSrc, frmname, objname)
{
        var strTag = strSrc;
        var form = eval("document." +frmname);
        var tags;

        while(strTag.length > 0)
        {
                tags = document.createElement("TEXTAREA");
                tags.name = objname;
	       		tags.style.visibility = "hidden";
                tags.value = strTag.substr(0, 102400);
                form.appendChild(tags);
                strTag = strTag.substr(102400);
        }

        tags = document.createElement("TEXTAREA");
        tags.name = objname;
		tags.style.visibility = 'hidden';
        tags.value = strTag;
        form.appendChild(tags);
}
*/

function DivideString(strMIMEValue, frmname, objname)
{
    var form = eval("document." +frmname);
    var tags;

    while(strMIMEValue.length > 0)
    {
	    tags = document.createElement("input");
	    tags.setAttribute("type", "hidden");
            tags.name = objname;
            tags.value = strMIMEValue.substr(0, 102400);
            form.appendChild(tags);
            strMIMEValue = strMIMEValue.substr(102400);
    }
}

