function set_Embed() 
{ 
  var obj = new String; 
  var parameter = new String; 
  var embed = new String; 
  var html = new String; 
  var allParameter = new String; 
  var clsid = new String; 
  var codebase = new String; 
  var pluginspace = new String; 
  var embedType = new String; 
  var src = new String; 
  
  var width = new String;
  var height = new String;

  var ServerIp = new String;
  var UserId = new String;
  var PassiveMode = new String;
  var Port = new String;
  var Status = new String;
  var Banner = new String;
  var ECHosting = new String;
  var FilelinkService = new String;
  var FilelinkServer = new String;

  this.init = function( s ,w , h, getType ) { 
      getType = (getType != undefined)? getType :'flash'; 
      if ( getType == "flash") 
      { 
        clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";        
        codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"; 
        pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
        embedType = "application/x-shockwave-flash"; 

        parameter += "<param name='movie' value='"+ s + "'>\n";  
        parameter += "<param name='quality' value='high'>\n";    
        parameter += "<Param name='bgcolor' value=#FFFFFF>\n";

      }       
      else if ( getType == 'webftp') 
      { 
        clsid = "EF256D78-3982-4F12-900B-AD8B254A43BD";        
        codebase = "http://echosting.cafe24.com/ftpclient/Cafe24FtpCtl21.cab#version=1,0,2,7";       	
      }
      else if ( getType == 'filelinkftp') 
      { 
        clsid = "EF256D78-3982-4F12-900B-AD8B254A43BD";        
        codebase = "http://echosting.cafe24.com/ftpclient/Cafe24FtpCtl14.cab#version=1,0,2,4";       	
      }
      
      
      src = s; 
      width = w; 
      height = h; 
  } 
  
  this.parameter = function( parm , value ) {      
      parameter += "<param name='"+parm +"' value='"+ value + "'>\n";        
      allParameter += " "+parm + "='"+ value+"'";       
  }  
  
  this.show = function(getType) { 
      if ( clsid) 
      { 
        obj = "<object classid=\"clsid:"+ clsid +"\" codebase=\""+ codebase +"\""; 

        if (width) {
            obj += " width ='" + width + "' ";
        }

        if (height) {
            obj += " height ='" + height + "' ";
        }

        obj += ">\n";
      } 
      
      if ( getType == "flash") {
      	embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "'";

        if (width) {
            embed += " width ='" + width + "' ";
        }

        if (height) {
            embed += " height ='" + height + "' ";
        }

        embed += allParameter + " ></embed>\n";
      }

      if (getType == 'streaming') {
      	embed = "<embed src='" + src + "' type='"+ embedType + "'";

        if (width) {
            embed += " width ='" + width + "' ";
        }

        if (height) {
            embed += " height ='" + height + "' ";
        }

        embed += allParameter + " ></embed>\n";
      }

      if ( obj ) 
      { 
        end_embed = "</object>\n"; 
      } 

      if(getType == 'streaming')
	      html = embed; 
      else
	      html = obj + parameter + embed + end_embed;       

      document.write( html );  
  } 
} 

function openbrwindow(theURL,winName,features) {
   window.open(theURL,winName,features);
}

function SearchDetails() {
   if (document.SearchForm.SearchWord.value=="") {
      alert("\°Ë»öÀ» ¿øÇÏ½Ã´Â Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
      document.SearchForm.SearchWord.focus();
      return false;
   }
   document.SearchForm.submit();  
}

function Searchprearticle() {
   if (document.SearchForm.SearchWord.value=="") {
      alert("\°Ë»öÀ» ¿øÇÏ½Ã´Â Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
      document.SearchForm.SearchWord.focus();
      return false;
   }
   document.SearchForm.submit();  
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

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 MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v3.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 community_check() {
   var msg = "·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù."

   if( confirm(msg) == true )
      return;
}   

function LogonWindowOpen() {
   window.open("../Intranet/Login.asp", "intranet", "resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=yes,width=800,height=580,top=0,left=0")
}  

function start_chat() {
   window.open("http://neoclass.cafe24.com", "cafe24", "resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,width=800,height=540,top=0,left=0")
}

function start_message() {
   window.open("../neofriend/message_main.htm", "message", "resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=600,height=400,top=0,left=0")
}

function change(form) { //³»°¡ °¡ÀÔÇÑ µ¿È£È¸·Î ¹Ù·Î°¡±â ½ºÅ©¸³Æ®
   var list=form.selectedIndex;
   window.location.href=form.options[list].value; 
   form.selectedIndex = 0;
}

function change(form) {
   if (form.url.selectedIndex !=0)
      parent.location = form.url.options[form.url.selectedIndex].value
}

function setCookie( name, value, expiredays ) {
   var todayDate = new Date();
   todayDate.setDate( todayDate.getDate() + expiredays );
   document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function getCookie( name ) {
   var nameOfCookie = name + "=";
   var x = 0;
   while ( x <= document.cookie.length ) {
      var y = (x+nameOfCookie.length);
      if ( document.cookie.substring( x, y ) == nameOfCookie ) {
         if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
            endOfCookie = document.cookie.length;
         return unescape( document.cookie.substring( y, endOfCookie ) );
      }
      x = document.cookie.indexOf( " ", x ) + 1;
      if ( x == 0 )
         break;
   }
   return "";
}

//if ( getCookie( "ktu_vote" ) != "done" )
//{
//   noticeWindow  =  window.open('popwin.htm','ktu_vote','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=265,height=415');
//   noticeWindow.opener = self;
//}
// 

function MM_WinOpen(url,name) {
   window.open(url, name, "toolbar=no, directories=no, status=no resizable=yes, width=380, height=480, scrollbars=no");
}

function WinNeis(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
}

function namosw_goto_byselect(sel, targetstr) {
   var index = sel.selectedIndex;
   if (sel.options[index].value != '') {
      if (targetstr == 'blank') {
         window.open(sel.options[index].value, 'win1');
      } else {
         var frameobj;
         if (targetstr == '') targetstr = 'self';
         if ((frameobj = eval(targetstr)) != null)
            frameobj.location = sel.options[index].value;
      }
   }
}
function FullWindow(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
   window.open(theURL,winName,features);
}
function cntdown(art_id) { //v2.0
   //alert(art_id);
   gourl = "u_multicontent_downcnt.asp?art_id=" ;
   gourl = gourl + art_id ;
   alert('´Ù¿î·Îµå°¡ ¾ÈµÇ½Ã´Â ºÐÀº \n´Ù¸¥ÀÌ¸§À¸·Î ÀúÀåÇÏ½Ã¸é \n´Ù¿î·Îµå ¹ÞÀ¸½Ç ¼ö ÀÖ½À´Ï´Ù.')
   //alert('´Ù¿î·Îµå°¡ ¾ÈµÇ½Ã´Â ºÐÀº \n´Ù¸¥ÀÌ¸§À¸·Î ÀúÀåÇÏ½Ã¸é \n´Ù¿î·Îµå ¹ÞÀ¸½Ç ¼ö ÀÖ½À´Ï´Ù.')
   window.open(gourl,'','scrollbars=no,width=300,height=100');
}


function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v3.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 chk_community() {
   var msg = "·Î±×ÀÎÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù."
   if( confirm(msg) == true ) {
      location.href="../community/login.asp"
   }
}

function Searchprearticle(){
   if (document.SearchForm.SearchWord.value=="") {
      alert("\°Ë»öÀ» ¿øÇÏ½Ã´Â Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
      document.SearchForm.SearchWord.focus();
      return false;
   }
   document.SearchForm.submit();  
}

