function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function na_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}

String.prototype.trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, ""); 
}

function cksForm(){
   form = document.sForms;
   form.search.value = form.search.value.trim();
   if(!form.search.value){
        alert('Input Search Word!');
		form.search.focus();
		return false;
  }	 
}

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.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_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 MsgScroll() {
    this.name = "MsgScroll";  //½ºÅ©·Ñ ¸í(°´Ã¼)
	this.msgs = new Array(); // ¸Þ¼¼Áö ¹è¿­Á¤ÀÇ
	this.msgcnt =0;  //¸Þ¼¼Áö ¹è¿­¹øÈ£ Á¤ÀÇ
	this.stop = 0; // Á¤Áö À¯¹«
    this.height = 100; // ·¹ÀÌ¾î ³ôÀÌ
	this.width = 100;  //·¹ÀÌ¾î ³ÐÀÌ
	this.speed = 50; // °£°Ý Á¶Á¤(¼Óµµ)
	this.currentSpeed = 0; // ÇöÀç °£°Ý Á¶Á¤(¼Óµµ)	
	this.pauseDelay = 1000; // Á¤Áö ½Ã°£
	this.pauseMouseover = false; //¸¶¿ì½º¸¦ ¿Ã·ÈÀ»¶§ Á¤Áö À¯¹«
	this.viewcnt = 1; // º¸¿©ÁÙ¶óÀÎ¼ö


    this.add = function(str) {  //¸Þ¼¼Áö Ã·°¡ ¸Þ¼­µå			       
				   this.msgs[this.msgcnt] = str;
				   this.msgcnt = this.msgcnt + 1;
               }

    this.start = function() {
					 this.init();
					 setTimeout(this.name+'.scroll()',this.speed);
				 }
			 
	this.init =function() {
					  document.write('<div id="'+this.name+'" style="height:'+(this.viewcnt*this.height)+';width:'+this.width+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
					  for(var i = 0; i < this.msgcnt; i++) {
						  document.write('<div id="'+this.name+'msg'+i+'"style="left:0px;width:'+this.width+';position:absolute;top:'+(this.height*i+1)+'px;">');
						  document.write(this.msgs[i]);
						  document.write('</div>');
                      }
				  }
				  
     this.scroll = function() {
		               if (!this.stop) { 
	                       this.speed = this.currentSpeed;
						   for (i = 0; i < this.msgcnt; i++) {
	                           obj = document.getElementById(this.name+'msg'+i).style;
		            		   obj.top = parseInt(obj.top) - 1;							   
			                   if (parseInt(obj.top) <= this.height*(-1)) obj.top = this.height * (this.msgcnt-1);
			                   if (parseInt(obj.top) == 0) this.speed = this.pauseDelay							  							   
		                   } 
		   
	                   }
	                   window.setTimeout(this.name+".scroll()",this.speed);
	                }

      this.onmouseover = function() {
	                         if (this.pauseMouseover) this.stop = true;
						 }
						 
	  this.onmouseout = function() {
	                        if (this.pauseMouseover) this.stop = false;
						 }

}

function MsgScroll2() {
    this.name = "MsgScroll2";  //½ºÅ©·Ñ ¸í(°´Ã¼)
	this.msgs = new Array(); // ¸Þ¼¼Áö ¹è¿­Á¤ÀÇ
	this.msgcnt =0;  //¸Þ¼¼Áö ¹è¿­¹øÈ£ Á¤ÀÇ
	this.stop = 0; // Á¤Áö À¯¹«
    this.height = 100; // ·¹ÀÌ¾î ³ôÀÌ
	this.width = 100;  //·¹ÀÌ¾î ³ÐÀÌ
	this.speed = 50; // °£°Ý Á¶Á¤(¼Óµµ)
	this.currentSpeed = 0; // ÇöÀç °£°Ý Á¶Á¤(¼Óµµ)	
	this.pauseDelay = 1000; // Á¤Áö ½Ã°£
	this.pauseMouseover = false; //¸¶¿ì½º¸¦ ¿Ã·ÈÀ»¶§ Á¤Áö À¯¹«
	this.viewcnt = 1; // º¸¿©ÁÙ¶óÀÎ¼ö
	this.cls	= 0;


    this.add = function(str) {  //¸Þ¼¼Áö Ã·°¡ ¸Þ¼­µå			       
				   this.msgs[this.msgcnt] = str;
				   this.msgcnt = this.msgcnt + 1;
               }

    this.start = function() {
					 this.init();
					 setTimeout(this.name+'.scroll()',this.speed);
				 }
			 
	this.init =function() {
					  document.write('<div id="'+this.name+'" style="width:'+(this.viewcnt*this.width)+';height:'+this.height+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');
					  for(var i = 0; i < this.msgcnt; i++) {
						  document.write('<div id="'+this.name+'msg'+i+'"style="top:0px;width:'+this.width+';position:absolute;left:'+(this.width*i+1)+'px;">');
						  document.write(this.msgs[i]);
						  document.write('</div>');
                      }
				  }
				  
     this.scroll = function() {
		               if (!this.stop) { 
	                       this.speed = this.currentSpeed;
						   for (i = 0; i < this.msgcnt; i++) {
	                           obj = document.getElementById(this.name+'msg'+i).style;
		            		   obj.left = parseInt(obj.left) - 1;							   
			                   if (parseInt(obj.left) <= this.width*(-1)) obj.left = this.width * (this.msgcnt-1);
			                   if (parseInt(obj.left) == 0) this.speed = this.pauseDelay							  							   
		                   } 
		   
	                   }
	                   if(this.cls!=1) window.setTimeout(this.name+".scroll()",this.speed);
	                }

      this.onmouseover = function() {
	                         if (this.pauseMouseover) this.stop = true;
						 }
						 
	  this.onmouseout = function() {
	                        if (this.pauseMouseover) this.stop = false;
						 }
	  this.click1 = function(num) {
					if(num==1 && this.cls==1) return;
					ckss = 1;
		           if (!this.stop) { 
	                       this.speed = this.currentSpeed;
						   for (i = 0; i < this.msgcnt; i++) {
	                           obj = document.getElementById(this.name+'msg'+i).style;
		            		   obj.left = parseInt(obj.left) + 1;							   							   
			                   if (parseInt(obj.left) >= (this.width * (this.msgcnt-1))) obj.left = -this.width;
			                   if (parseInt(obj.left) == 0) { 
								   this.cls = 0;
								   this.speed = this.pauseDelay;
								   window.setTimeout(this.name+".scroll()",this.speed);								   
									ckss=0;
							   }
		                   } 
		   
	                   }
					   if(ckss==1) {
						this.cls = 1;
						window.setTimeout(this.name+".click1()",this.speed);
					   }		
	                }
		this.click2 = function(num) {
					if(num==1 && this.cls==1) return;
					ckss = 1;
		               if (!this.stop) { 
	                       this.speed = this.currentSpeed;
						   for (i = 0; i < this.msgcnt; i++) {
	                           obj = document.getElementById(this.name+'msg'+i).style;
		            		   obj.left = parseInt(obj.left) - 1;							   
			                   if (parseInt(obj.left) <= this.width*(-1)) obj.left = this.width * (this.msgcnt-1);
			                   if (parseInt(obj.left) == 0) { 
								   this.cls = 0;
								   this.speed = this.pauseDelay;
								   window.setTimeout(this.name+".scroll()",this.speed);
								   ckss=0;
							   }							  							   
		                   } 
		   
	                   }
					   if(ckss==1) {
						this.cls = 1;
						window.setTimeout(this.name+".click2()",this.speed);
					   }	
	                }

}