///////////////////////////////////////////// obj_common /////////////////////////////////////////////////////////////////////////

//-- DEXTUploadX

function FileUploadManagerView(){

	document.write ('<OBJECT id="FileUploadManager" codeBase="http://dria.or.kr/DEXTUploadX/DEXTUploadX.cab#version=2,4,0,0" height="103" width="99%" classid="CLSID:DF75BAFF-7DD5-4B83-AF5E-692067C90316" VIEWASTEXT>');
	document.write ('	<PARAM NAME="EnableTransferButton" VALUE="FALSE">');
	document.write ('	<PARAM NAME="MaxCount" VALUE="20">');
	document.write ('</OBJECT>');
}

function FileUploadMonitorView(){

	document.write ('<OBJECT id=FileUploadMonitor height=355 width=445 classid=CLSID:96A93E40-E5F8-497A-B029-8D8156DE09C5 CodeBase="http://dria.or.kr/DEXTUploadX/DEXTUploadX.cab#version=2,4,0,0" VIEWASTEXT>');
	document.write ('</OBJECT>');
}

function FileDownloadManagerView(){

	document.write ('<OBJECT ID="FileDownloadManager" height="140" width="99%" CodeBase = "http://dria.or.kr/DEXTUploadX/DEXTUploadX.cab#version=2,4,0,0" CLASSID="CLSID:535AE497-8E85-45F8-AF36-2DFCBCA8B68A">');
	document.write ('</OBJECT>');
}

function FileDownloadMonitorView(){

	document.write ('<OBJECT ID="FileDownloadMonitor"  height=445 width=445 CodeBase = "http://dria.or.kr/DEXTUploadX/DEXTUploadX.cab#version=2,4,0,0" CLASSID="CLSID:471678BB-F992-4BE6-9761-7767883E8619">');
	document.write ('</OBJECT>');
}

//--DEXTUploadX //










//-- ÀÏ¹ÝÀûÀ¸·Î ´Ü¼øÇÑ ÇÃ·¡½¬ ÀÏ °æ¿ì
/*
	-- ÆÄ¶ó¹ÌÅÍ Á¤º¸ --

	width : °¡·ÎÅ©±â
	height : ¼¼·ÎÅ©±â
	url : ÇÃ·¡½¬ ÆÄÀÏÀÇ °æ·Î
*/

function swfView(width, height, url){
	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ");
	document.write("		codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ");
	document.write("		width='"+width+"' height='"+height+"' align='middle'>");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie'				value='"+url+"' /> ");
	document.write("	<param name='quality'			value='high' /> ");
	document.write("	<param name='wmode'				value='transparent'> ");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' align='middle' ");
	document.write("		allowScriptAccess='sameDomain' type='application/x-shockwave-flash' ");
	document.write("		pluginspage='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function XFileUploadPathView(){
	document.write("<OBJECT CLASSID='clsid:5220cb21-c88d-11cf-b347-00aa00a28331' id='Microsoft_Licensed_Class_Manager_1_0'1> ");
	document.write("<PARAM NAME='LPKPath' VALUE='/XFileUpload/library/XFileUpload.LPK'> ");
	document.write("</OBJECT> ");
}



function XFileUploadDownView(){
	document.write("<OBJECT id=ListDownCTL codebase='/XFileUpload/library/XFileUpload.CAB#version=1,4,0,8' height='80' width='98%' CLASSID='CLSID:F36BB72B-9876-4C6D-B22F-D68E480A39B5'> ");
	document.write("</OBJECT> ");
}

function XFileUploadUpView(url,post){
	document.write("<OBJECT id=ListUpCTL codeBase='/xfileupload/library/XFileUpload.CAB#version=1,4,0,8' height=103 width='99%' classid='CLSID:3BE0021D-5CC6-4701-B8B1-F5D45A5BCC88'> ");
	//document.write("<OBJECT id=ListUpCTL codeBase='/xfileupload/library/XFileUpload.CAB#version=1,4,12' height=103 width='99%' classid='CLSID:3BE0021D-5CC6-4701-B8B1-F5D45A5BCC88'> ");
	document.write("	<PARAM NAME='_ExtentX' VALUE='8784'> ");
	document.write("	<PARAM NAME='_ExtentY' VALUE='2725'> ");
	document.write("	<PARAM NAME='BackColor' VALUE='16777215'> ");
	document.write("	<PARAM NAME='ForeColor' VALUE='-2147483640'> ");
	document.write("	<PARAM NAME='Enabled' VALUE='-1'> ");
	document.write("	<PARAM NAME='Fillter' VALUE='All File Format | *.*'> ");
	document.write("	<PARAM NAME='InitDir' VALUE='c:\'> ");
	document.write("	<PARAM NAME='DialTitle' VALUE='XFileUploadListUp Add File'> ");
	document.write("	<PARAM NAME='UploadPath' VALUE='"+url+"' ");
	document.write("	<PARAM NAME='MaxSize' VALUE='2000'> ");
	document.write("	<PARAM NAME='MaxCount' VALUE='200'> ");
	document.write("	<PARAM NAME='UpMode' VALUE='0'> ");
	document.write("	<PARAM NAME='DisplayMode' VALUE='8'> ");
	document.write("	<PARAM NAME='PostScript' VALUE='"+post+"'> ");
	document.write("	<PARAM NAME='ListCount' VALUE='0'> ");
	document.write("	<PARAM NAME='ListSize' VALUE='0'> ");
	document.write("	<PARAM NAME='SSL' VALUE='0'> ");
	document.write("	<PARAM NAME='PROXY' VALUE='0'> ");
	document.write("	<PARAM NAME='UserID' VALUE=''> ");
	document.write("	<PARAM NAME='UserPWD' VALUE=''> ");
	document.write("	<PARAM NAME='ProxyID' VALUE=''> ");
	document.write("	<PARAM NAME='ProxyPWD' VALUE=''> ");
	document.write("	<PARAM NAME='ProxyName' VALUE=''> ");
	document.write("	<PARAM NAME='ProxyPort' VALUE='8080'> ");
	document.write("	<PARAM NAME='FormDataCount' VALUE='0'> ");
	document.write("</OBJECT> ");		
}

//-- SeeLive ¹æ¼Û º¸±â
function seeLiveView(id, name, width, height, serverIP, basePort, useUniPort, channel, noTicket, autoPlay, startDelay, wheelVolumeControl, customLogo, customLogoOnWhite){

	document.write("<object id='"+id+"' name='"+name+"' width='"+width+"' height='"+height+"' ");
	document.write("		CLASSID='CLSID:8eeb54d5-cc70-40e4-b015-ac478c02ecc8'>");
	document.write("	<param name='ServerIP'				value='"+serverIP+"'> ");
	document.write("	<param name='BasePort'				value='"+basePort+"'> ");
	document.write("	<param name='UseUniPort'			value='"+useUniPort+"'>"); 
	document.write("	<param name='Channel'				value='"+channel+"'> ");
	document.write("	<param name='NoTicket'				value='"+noTicket+"'> ");
	document.write("	<param name='AutoPlay'				value='"+autoPlay+"'>");
	document.write("	<PARAM NAME='StartDelay'			VALUE='"+startDelay+"'> ");
	document.write("	<PARAM NAME='WheelVolumeControl'	VALUE='"+wheelVolumeControl+"'> ");
	document.write("	<PARAM NAME='CustomLogo'			VALUE='"+customLogo+"'>");
	document.write("	<PARAM NAME='CustomLogoOnWhite'		VALUE='"+customLogoOnWhite+"'>");
	document.write("</object>");
}

//-- Microsoft Windows Media Player Àç»ý
function mediaPlayerView(id, name, width, height, showcontrols, autostart, autorewind, autosize, autoresize, transparentatstart, loop, url) {
	document.write("<object id='"+id+"' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' "); 
	document.write("		type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' "); 
	document.write("		width='"+width+"' height='"+height+"' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' name='"+name+"'> ");
	document.write("	<param name='ShowControls' value='"+showcontrols+"'> ");
	document.write("	<param name='AutoStart' value='"+autostart+"'> ");
	document.write("	<param name='AutoRewind' value='"+autorewind+"'> ");
	document.write("	<param name='Autosize' value='"+autosize+"'> ");
	document.write("	<param name='AutoResize' value='"+autoresize+"'> ");
	document.write("	<param name='TransparentAtStart' value='"+transparentatstart+"'> ");
	document.write("	<param name='loop' value='"+loop+"'> ");
	document.write("	<param name='Filename' value='"+url+"'> ");
	document.write("	<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' "); 
	document.write("		id='"+id+"' name='"+name+"' showpositioncontrols='0' showcontrols='0' autosize='0' autostart='1' showdisplay='0' ");
	document.write("		showstatusbar='0' showtracker='1' loop='1' width='"+width+"'  height='"+height+"' src='"+url+"'> ");
	document.write("	</embed> "); 
	document.write("</object> ");
}

//-- object¸¦ ÅëÀ¸·Î ½ºÆ®¸µÀ¸·Î ¹­¾î¼­ º¸³» °æ¿ì
function objAll(objString){
	
	document.write(objString);

}









// ------ ¼¼·Î ½ºÅ©·Ñ (¸ÞÀÎÆäÀÌÁö ÀÏÁ¤/Çà»ç) ½ÃÀÛ ------

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


// ------ ¼¼·Î ½ºÅ©·Ñ (¸ÞÀÎÆäÀÌÁö ÀÏÁ¤/Çà»ç) ³¡ ------





