
//
function createEmbed2(obj_path, wid, hei){
	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='"+obj_path+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<param name='wmode' value='transparent'>");
	document.write("<embed src='"+obj_path+"' quality='high' wmode='transparent' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+wid+"' height='"+hei+"'>");
	document.write("</embed>");
	document.write("</object>");
}

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_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_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 MM_openWin(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function menu(name) {
  if ( name == 'aa' ) {
	div1.style.display = 'block';
	div2.style.display = 'none';
  } else if ( name == 'bb' ) {
	div1.style.display = 'none';
	div2.style.display = 'block';
  } 
}

function viewmenu(n){
	for(var i=1;i<10;i++){
		if(n==i) document.all["a"+i].style.display="";
		else document.all["a"+i].style.display="none";
	}
}
var ok=0; old_mmunu="";
function show(mmunu)
{
  if((old_mmunu != "") && (mmunu != old_mmunu))
  {
	 ok=1;

	 old_mmunu.style.display="none";
	 mmunu.style.display="";
  }
  else
  {
	if(ok == 1)
	{
		ok=0;
		mmunu.style.display="none";
	}
	else
	{
		 ok=1;
		 mmunu.style.display="";
	 }
  }
  old_mmunu=mmunu;
}

function pop_a(){
window.open('map.html','map','width=600,height=522,top=10,left=10,scrollbars=no');
}
//½ºÅ©·Ñ

function NewsTicker( Skin, DisplayCell, ArgvName, Elapse, MoveSpeed, ShowLength, MoveLength, MoveSize ){
	NewsTicker.Bases[NewsTicker.Bases.length] = this;
	this.BasesIndex = NewsTicker.Bases.length-1;
	this.Skin = Skin;
	this.DisplayCell = DisplayCell;
	this.DisplayCell.Ticker = this;
	this.ArgvName = ArgvName;

	this.DisplayCell.onmouseover = new Function( "this.Ticker.Stop();" );
	this.DisplayCell.onmouseout = new Function( "this.Ticker.MoveFlag = true; if( this.Ticker.ElapseTimer == null ){ this.Ticker.Move(); }" );

	if( Elapse ) this.Elapse = Elapse;
	if( MoveSpeed ) this.MoveSpeed = MoveSpeed;
	if( ShowLength ) this.ShowLength = ShowLength;
	if( MoveLength ) this.MoveLength = MoveLength;
	if( MoveSize ) this.MoveSize = MoveSize;
}

NewsTicker.prototype.Skin = null;
NewsTicker.prototype.DisplayCell = null;
NewsTicker.prototype.ArgvName = null;
NewsTicker.prototype.Elapse = 0000;			// ´ë±â½Ã°£
NewsTicker.prototype.MoveSpeed = 1;			// ½ºÅ©·Ñ µô·¹ÀÌ
NewsTicker.prototype.Skins = null;
NewsTicker.prototype.CurrentSkins = null;
NewsTicker.prototype.Current = 0;
NewsTicker.prototype.ShowLength = 4;		// ¹Ì¸® ÁØºñµÅ¾î ÀÖ¾î¾ßÇÒ ´ÙÀ½ ÇÁ·¹ÀÓ°¹¼ö
NewsTicker.prototype.MoveLength = 1;			// ÀÌµ¿ÇÒ ÇÁ·¹ÀÓ ¼ö
NewsTicker.prototype.MoveSize= 0;			// ÀÌµ¿ÇÒ ÇÈ¼¿ ¼ö
NewsTicker.Bases = [];
NewsTicker.prototype.BasesIndex = null;
NewsTicker.prototype.Timer = null;
NewsTicker.prototype.MoveFlag = true;

NewsTicker.prototype.Add = function(){
	var argv = arguments;
	var argc = arguments.length;
	if( argc == 0 ) return;
	if( this.Skins == null ) this.Skins = new Array();

	var newSkin = this.Skin.cloneNode( true );
	newSkin.style.display = "";
	this.Skins[this.Skins.length] = newSkin;

	for( var i=0; i<argc; i++ ){
		newSkin.all[this.ArgvName+"["+i+"]"].innerHTML = argv[i];
	}
}

NewsTicker.prototype.InitSkin = function(){
	if( this.CurrentSkins == null ) this.CurrentSkins = new Array();
	if( !this.Current ) this.Current = 0;

	if( this.ShowLength < this.MoveLength ) 
		this.MoveLength = this.ShowLength;
	
	if( this.CurrentSkins.length > 0 ){
		for( var i=0; i < this.MoveLength; i++ ){
			this.CurrentSkins[0].removeNode( true );
			this.CurrentSkins.shift();
		}
	}else{
		this.CurrentSkins = new Array();
	}

	for( var i=0; i<this.CurrentSkins.length; i++ ){
		this.CurrentSkins[i].style.pixelTop=0;	
	}
	
	var Latest = null;
	while( true ){
		if( this.Current > this.Skins.length-1 ) this.Current = 0;
		if( Latest == this.Current ) return;
		Latest = this.Current;
		this.CurrentSkins[this.CurrentSkins.length] = this.Skins[this.Current].cloneNode(true);
		this.DisplayCell.appendChild( this.CurrentSkins[this.CurrentSkins.length-1] ).style.pixelTop=0;
		this.Current++;
		if( this.CurrentSkins.length >= this.ShowLength*2 ) break;
	}
}

NewsTicker.prototype.Start = function(){
	
	if( this.Skins.length < this.ShowLength )
		return;
	
	this.InitSkin();

	this.ElapseTimer = setTimeout( "NewsTicker.Bases["+this.BasesIndex+"].Move();", this.Elapse );
}

NewsTicker.prototype.Stop = function(){
	clearTimeout( this.Timer );
	this.MoveFlag = false;
}

NewsTicker.prototype.Move = function(){
	this.ElapseTimer = null;

	if( !this.MoveFlag  ) return;

	if( this.CurrentSkins[this.MoveLength].offsetTop <= 0  ){
		this.Start();
		return;
	}
	
	var Pixel = 0;
	if( this.MoveSize == 0 )
		Pixel = this.CurrentSkins[this.MoveLength].offsetTop;
	else{
		if( (Pixel = this.CurrentSkins[this.MoveLength].offsetTop/this.MoveSize/2) < 1 ){
			Pixel = 1;
		}
	}

	for( var i=0; i<this.CurrentSkins.length; i++ ){
		this.CurrentSkins[i].style.pixelTop -= Pixel;
	}
	
	if( this.ElapseTimer == null )
		this.Timer = setTimeout( "NewsTicker.Bases["+this.BasesIndex+"].Move();", this.MoveSpeed );
}
				

