//ÀÌ¿Ã¶ó½º ÆÐÄ¡ ºÎºÐ
function get_flash(URL,wid,hei,mode) {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+wid+"' height='"+hei+"'>");
	document.write("<param name='movie' value='"+URL+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='WMODE' value='"+mode+"'>");
	document.write("<embed src='"+URL+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"'></embed>");
	document.write("</object>");
}

function get_flash2(URL,wid,hei,mode) {
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+wid+"' height='"+hei+"'>");
	document.write("<param name='movie' value='"+URL+"?pageNum=<%=flash_num%>'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='WMODE' value='"+mode+"'>");
	document.write("<embed src='"+URL+"' quality='high'  pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"'></embed>");
	document.write("</object>");
}

function get_vod(what) {
	document.write("<OBJECT CLASSID='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' width='320' height='240' ID='mPlayer'>");
	if (what == 2) { document.write("<PARAM NAME='filename' VALUE='/home_v2/data/"+what+".asf'>"); }
	else { document.write("<PARAM NAME='filename' VALUE='/home_v2/images/edusystem_imgs/"+what+".wmv'>"); }
	document.write("<PARAM NAME='ShowControls' VALUE='0'>");
	document.write("<PARAM NAME='AutoStart' VALUE='true'>");
	document.write("</object>");
}

function get_vod2(what) {
	document.write("<OBJECT CLASSID='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' width='320' height='240' ID='mPlayer'>");
	document.write("<PARAM NAME='filename' VALUE='/home_v2/data/"+what+"'>");
	document.write("<PARAM NAME='ShowControls' VALUE='0'>");
	document.write("<PARAM NAME='AutoStart' VALUE='true'>");
	document.write("</object>");
}

function get_music(what) {
	document.write("<embed src='http://jstour.jeongseon.go.kr/data/"+what+"'></embed>");
}







/*******************************************************************************
* CP Á¦Ç°¹è³ÊºÎºÐ
*******************************************************************************/

// no scroll for mozila
//document.body.parentNode.style.overflow="hidden";


function divMove( sId , nHeightMove ){
	if( nHeightMove == 0 ){ return ; }
	var nNum = document.getElementById( sId ).style.top ;
	if( nNum == '' ){ nNum = 0 ; }
	else{ nNum = parseInt(nNum) ; }
		if(nNum <= 0){
			nHeightMove = -(nHeightMove)
		}
	_divMove(sId , nNum, parseInt(nNum) + (nHeightMove)*-1 , nHeightMove>0 ? -1 : 1 ) ;	
}

function _divMove( sId , nHeightStart , nHeightEnd , nTopDown ){
	var nSpeed = 5 ; // ½ºÇÇµå 1/1000 ÃÊ
	var nStep = 3 ;  // ½ÇÇàÇÒ¶§¸¶´Ù ÁÙ¾îµå´Â ´ÜÀ§
	var oObj = document.getElementById( sId ) ;
	nStep *= nTopDown ; 
	document.getElementById( 'result_msg' ).innerHTML = nHeightStart+":"+nHeightEnd ;
	if( nHeightStart == nHeightEnd ){ return ; }
	nHeightStart += nStep ; 
	oObj.style.top = nHeightStart ;
	setTimeout('_divMove("'+sId+'",'+nHeightStart+','+nHeightEnd+','+nTopDown+')' , nSpeed) ;
}



/*******************************************************************************
* ·Ñ¿À¹ö ½ºÅ©¸³Æ®¼Ò½º
*******************************************************************************/
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/*******************************************************************************
* ¸µÅ©½Ã Á¡¼± ¾ø¾Ö±â
*******************************************************************************/
function autoblur() {
        if(event.srcElement.tagName == "A") document.body.focus();
	}
document.onfocusin = autoblur;

/*******************************************************************************
* ÆË¾÷¸µÅ©
*width : ÆË¾÷Ã¢ÀÇ ³ÐÀÌ
*height : ÆË¾÷Ã¢ÀÇ ³ôÀÌ
*top : ÆË¾÷Ã¢ÀÌ ¶ã À§Ä¡
*left : ÆË¾÷Ã¢ÀÌ ¶ã À§Ä¡
*resizable=1 : Ã¢Å©±â Á¶Á¤°¡´É
*scrollbars=1 : ½ºÅ©·Ñ¹Ù
*menubar=1 : ¸Þ´º
*toolbar=1 : ¸Þ´º¾ÆÀÌÄÜ
*location=1 : Á¦¸ñÇ¥½ÃÁÙ
*directories=1 : ¿¬°á¹öÆ°(ÇÖ¸ÞÀÏ µî)
*status=1 : ÇÏ´ÜÀÇ »óÅÂ¹Ù
*******************************************************************************/
function popup_idcheck(arg) {
 
 window.open ('/portal/member/popup_idcheck.asp?id='+arg,'popup_idcheck','width=350px,height=150px,status=no,scrollbars=no');
}

function popup_login() {
 window.open ('https://www.tobesoft.co.kr/portal/member/popup_login.asp','popup_login','width=350px,height=180px,status=no,scrollbars=no');
}

function popup_idcheck1(id,mail) {
 window.open ('/portal/member/popup_idcheck1.asp?id='+id+'&mail='+mail,'popup_idcheck1','width=350px,height=100px,status=no,scrollbars=no');
}

function popup_postsearch() {
 window.open ('/portal/member/popup_postsearch.asp','popup_postsearch','width=400px,height=320px,status=no,scrollbars=no');
}

function popup_service() {
 window.open ('/portal/etc/popup_service.asp','popup_service','width=600px,height=400px,status=no,scrollbars=no');
}

function popup_privace() {
 window.open ('/portal/etc/popup_privace.asp?full=true','popup_privace','width=600px,height=400px,status=no,scrollbars=no');
}
function popup(w,h,t,l) {
 window.open ('/portal/popup.asp','popup','width='+w+',height='+h+',top='+t+',left='+l+',status=no,scrollbars=no');
}

function popup_miplatform_use() {
 window.open ('http://showcase.miplatform.co.kr','popup_miplatform_use','width=1020px,height=800px,status=no,scrollbars=auto');
}


function popup_miplatform_feature() {
 window.open ('http://kr11.hostwide.net/tobesoft/new/html/PID&Demo/index.html','popup_miplatform_feature','width=1024px,height=786px,status=no,scrollbars=auto');
}
