
function upload_client_down(cabDownUrl, cabVersion, cabSize)
{
    if(navigator.appVersion.indexOf("Windows NT 6.0") == -1)
    {
        var str = '<object id="idDevVideoDown" classid="CLSID:61A9CF28-3AAA-459F-B9F8-D26FA9E4289B" codebase="' + cabDownUrl + '/dextvideodown.cab#version=1,0,2008,509" border="0" width="0" height="0" >';
	    str += '<PARAM NAME="strCabfilePos" VALUE="'+ cabDownUrl +'">';
	    str += '<PARAM NAME="strCabVersion" VALUE="'+ cabVersion +'">';
	    str += '<PARAM NAME="strCabSize" VALUE="'+ cabSize +'">';
	    str += '</object>';
	    document.write(str);
	    eval("window.idDevVideoDown = document.getElementById('idDevVideoDown');");
	}
}

function upload_client(uploadURL, cabDownUrl, cabVersion, uploadMethod, licenseKey, fileMaxSize, maxPlayTime)
{
    var str = '<object id="DVUpload" classid="CLSID:C2B16F7D-F0B5-41A9-93AA-DC088E08F0D5" codebase="' + cabDownUrl + '/dextvideo.cab#version=' + cabVersion + '" border=0 width="100%" height="28" >';
	str += '<PARAM NAME="sUploadURL" VALUE="'+ uploadURL +'">';
	str += '<PARAM NAME="sUploadMethod" VALUE="'+ uploadMethod +'">';
	str += '<PARAM NAME="sLicenseKey" VALUE="'+ licenseKey +'">';
	str += '<PARAM NAME="sMaxFileSize" VALUE="'+ fileMaxSize +'">';
	str += '<PARAM NAME="sMaxPlayTime" VALUE="'+ maxPlayTime +'">';
	str += '</object>';
	document.write(str);
	eval("window.DVUpload = document.getElementById('DVUpload');");
}

function upload_clientEx(uploadURL, cabDownUrl, cabVersion, uploadMethod, licenseKey, fileMaxSize, maxPlayTime, ConvertType, Bitrate, Framesize)
{
    var str = '<object id="DVUpload" classid="CLSID:C2B16F7D-F0B5-41A9-93AA-DC088E08F0D5" codebase="' + cabDownUrl + '/dextvideo.cab#version=' + cabVersion + '" border=0 width="100%" height="28" >';
	str += '<PARAM NAME="sUploadURL" VALUE="'+ uploadURL +'">';
	str += '<PARAM NAME="sUploadMethod" VALUE="'+ uploadMethod +'">';
	str += '<PARAM NAME="sLicenseKey" VALUE="'+ licenseKey +'">';
	str += '<PARAM NAME="sMaxFileSize" VALUE="'+ fileMaxSize +'">';
	str += '<PARAM NAME="sMaxPlayTime" VALUE="'+ maxPlayTime +'">';
	str += '<PARAM NAME="sConvertType" VALUE="'+ ConvertType +'">';
	str += '<PARAM NAME="sDefBitrate" VALUE="'+ Bitrate +'">';
	str += '<PARAM NAME="sDefFramesize" VALUE="'+ Framesize +'">';
	str += '</object>';
	document.write(str);
	eval("window.DVUpload = document.getElementById('DVUpload');");
}






function unwFlash_Player(swf_url, itemSeq, gb, applicationType, autoPlay, userId)
{
    unwFlash_Player_Size(swf_url, 400, 340, itemSeq, gb, applicationType, autoPlay, userId);
}

function unwFlash_Player_Size(swf_url, iWidth, iHeight, itemSeq, gb, applicationType, autoPlay, userId)
{
    var id = 'wisePlay9_Full';
    var str = '';
    
    
    swf_url = fnSwfUrl(swf_url, itemSeq, gb, applicationType, autoPlay, userId);

    str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + iWidth + '" height="' + iHeight + '" id="wisePlay9_Full" >';
    str += '<param name="allowScriptAccess" value="always" />';
    str += '<param name="allowFullScreen" value="true" />';
    str += '<param name="movie" value="' + swf_url + '" />';
    str += '<param name="loop" value="false" />';
    str += '<param name="quality" value="high" />';
    str += '<param name="wmode" value="window" />';
    str += '<param name="bgcolor" value="#000000" />';
    str += '<embed src="' + swf_url + '" loop="false" quality="high" wmode="window" bgcolor="#000000" width="' + iWidth + '" height="' + iHeight + '" name="wisePlay9_Full"  allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    str += '</object>';

    document.write(str);

    eval("window.wisePlay9_Full = document.getElementById('wisePlay9_Full');");
 
}


function unwFlash_Player_Size_tst(swf_url, iWidth, iHeight, itemSeq, gb, applicationType, autoPlay, userId)
{
    var id = 'wisePlay9_Full';
    var str = '';
    
 alert(gb);   
    swf_url = fnSwfUrl(swf_url, itemSeq, gb, applicationType, autoPlay, userId);
alert(swf_url);
    str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + iWidth + '" height="' + iHeight + '" id="wisePlay9_Full" >';
    str += '<param name="allowScriptAccess" value="always" />';
    str += '<param name="allowFullScreen" value="true" />';
    str += '<param name="movie" value="' + swf_url + '" />';
    str += '<param name="loop" value="false" />';
    str += '<param name="quality" value="high" />';
    str += '<param name="wmode" value="window" />';
    str += '<param name="bgcolor" value="#000000" />';
    str += '<embed src="' + swf_url + '" loop="false" quality="high" wmode="window" bgcolor="#000000" width="' + iWidth + '" height="' + iHeight + '" name="wisePlay9_Full"  allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    str += '</object>';

    document.write(str);

    eval("window.wisePlay9_Full = document.getElementById('wisePlay9_Full');");
 
}

function unwFlash_Player_SetText(sText, sTextColor, sLinkUrl)
{
	wisePlay9_Full.unwFlash_SetNoticeText(sText, sTextColor, sLinkUrl);
}

function fnSwfUrl(swf_url, itemSeq, gb, applicationType, autoPlay, userId)
{
    swf_url = swf_url 
            + "?uid=" + itemSeq + "|" + gb
            + "&type=" + applicationType
            + "&play=" + autoPlay
            + "&userid=" + userId;
    
    return swf_url;

}

	function dv_Flash_Player_Mini(obj_id, swf_url, iWidth, iHeight, info_url, autoPlay)
	{
		
		var str = '';

		swf_url = swf_url + "?play=" + autoPlay + "&info=" + info_url;
	
	
		str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + iWidth + '" height="' + iHeight + '" id="' + obj_id + '" >';
		str += '<param name="allowScriptAccess" value="always" />';
		str += '<param name="allowFullScreen" value="false" />';
		str += '<param name="movie" value="' + swf_url + '" />';
		str += '<param name="loop" value="false" />';
		str += '<param name="quality" value="high" />';
		str += '<param name="wmode" value="window" />';
		str += '<param name="bgcolor" value="#000000" />';
		str += '<embed src="' + swf_url + '" loop="false" quality="high" wmode="window" bgcolor="#000000" width="' + iWidth + '" height="' + iHeight + '" name="' + obj_id +'"  allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		str += '</object>';
	
		document.write(str);
		
	
	}

function unwFlash_SectionBar(swf_url)
{
    unwFlash_SectionBar_Size(swf_url, '400', '50');
}

function unwFlash_SectionBar_Size(swf_url, iWidth, iHeight)
{
    var str = '';

    str += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="' + iWidth + '" height="' + iHeight + '" id="wiseSectionBar"  >';
    str += '<param name="allowScriptAccess" value="always" />';
    str += '<param name="movie" value="' + swf_url + '" />';
    str += '<param name="loop" value="false" />';
    str += '<param name="quality" value="high" />';
    str += '<param name="bgcolor" value="#ffffff" />';
    str += '<embed src="' + swf_url + '" loop="false" quality="high" bgcolor="#ffffff" width="' + iWidth + '" height="' + iHeight + '" name="wiseSectionBar" align="middle" allowScriptAccess="always"  type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    str += '</object>';

    document.write(str);

    eval("window.wiseSectionBar = document.getElementById('wiseSectionBar');");
}

// 
function fnFileUpload(){
	window.open("/IESS_FLV/asp/upload_form.asp", "wndUpload2","width=430,height=536,status=yes");
}


function fnFileUploadLite(){
	window.open("ucc_upload_lite.asp", "wndUpload","width=460,height=550,status=yes");
}


function fnUccView(Itmsq){
	window.open("/IESS_FLV/asp/ucc_view.asp?itemseq="+Itmsq, "wndUpload","width=752,height=663,status=yes");
}


function fnUccView2(){
	window.open("ucc_view_data.asp", "wndUpload","width=600,height=550,status=yes");
}


function fnSetUploadResult(p_orgnFileID, p_selectedID, p_thumbList, p_orgnThumbID, p_tempUrl, p_runtimeSec)
{
	frm.hfOrgnFileID.value = p_orgnFileID;
	frm.hfSelectedThumb.value = p_selectedID;
	frm.hfThumbList.value = p_thumbList;
	frm.hfOrgnThumbID.value = p_orgnThumbID;
	frm.hfRuntimeSec.value = p_runtimeSec;
	
}


function fnLoad(){
			try{
		idDevVideoDown.CheckUpdateModule();
	}
	catch(e){}
	
}