/* topmenu Show-Hide Layers */
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_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 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_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_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_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;
}

/* faq */
if (document.getElementById){
	document.write('<style type="text/css">\n')
	document.write('.submenu{display: none;}\n')
	document.write('a:link,a:visited,a:active { text-decoration:none; color:#3f3f3f;}\n')
	document.write('a:hover                   { text-decoration:underline; color:#005AAD;}\n')
	document.write('</style>\n')
}

function SwitchMenu(obj){
		if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("maindiv").getElementsByTagName("div"); 
				if(el.style.display != "block"){
						for (var i=0; i<ar.length; i++){
								if (ar[i].className=="submenu") 
								ar[i].style.display = "none";
						}
						el.style.display = "block";
				}else{
						el.style.display = "none";
				}
		}
}

/* family site select box */
function go_url(site_url){
        window.open(site_url,'_blank');
}

/* ¸µÅ©½Ã Á¡¼± ¾ø¾Ö±â */
function allblur() {
if(event.srcElement.tagName == 'A'||(event.srcElement.tagName == 'IMG'))
document.body.focus();
}
document.onfocusin = allblur;

/* choice menu */
function chgStyle0(idx)
{
	var the = document.getElementById("lmn_" + idx)
	the.style.color = "#0f218b";
	the.style.fontWeight = "normal";
	the.style.fontSize = "11px";
}

function chgStyle(idx)
{
	var the = document.getElementById("lmn_" + idx)
	the.style.color = "#0f218b";
	the.style.fontWeight = "normal";
	the.style.fontSize = "12px";
}

function chgStyle2(idx)
{
	var the = document.getElementById("lmn_" + idx)
	the.style.color = "#0f218b";
	the.style.fontWeight = "normal";
	the.style.fontSize = "12px";
}

function chgStyle3(idx)
{
	var the = document.getElementById("lmn_" + idx)
	the.style.color = "#0f218b";
	the.style.fontWeight = "normal";
	the.style.fontSize = "12px";
	the.style.backgroundColor = "#487CC7";
}

function chgStyle4(idx)
{
	var the = document.getElementById(idx)
	
	if(the != null) {
		the.style.color = "#000";
		the.style.fontWeight = "bold";
		the.style.fontSize = "12px";
	}
}

function chgStyle5(idx)
{
	var the = document.getElementById("lmn3_" + idx)
	the.style.color = "#00A0D4";
	the.style.fontWeight = "normal";
	the.style.fontSize = "12px";
}

/* popup */
function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}






function startNScroll() {
	//sDiv = '<div style="left:0px;width:100%;position:absolute;top:0px;line-height:19px;" id=nscrolltxt>\n';
	sDiv = "<div style=\"left:0px;width:100%;position:absolute;top:0px;line-height:19px;\" id=gongjitxt>\n";
	sDiv += sNScroll + sNScroll
	sDiv += '</div>\n'
	document.write(sDiv);
	window.setTimeout("NScroll()",nNScrollDelay);
}

function startNScrollDown() {
	sDiv = "<div style=\"left:0px;width:100%;position:absolute;top:0px;line-height:19px;\" id=gongjitxt>\n";
	sDiv += sNScrollDown + sNScrollDown
	sDiv += '</div>\n'
	document.write(sDiv);
	window.setTimeout("NScroll()",nNScrollDelay);
}

function NScroll() {
	if (bNScrollPause && bNScrollWait) {
		tmp = document.getElementById('gongjitxt').style;
		tmp.top = parseInt(tmp.top)-nNScrollSpeed;
		
		if (s_pos++ > s_amount) {
			bNScrollWait=0;
			s_pos=0; nNScrollPos++
			if (nNScrollPos>=nNScrollLen) {
				tmp.top = 0;
				nNScrollPos = 0;
			}
			window.setTimeout("bNScrollWait=1",nNScrollDelay);
		}
	}
	window.setTimeout("NScroll()",60);
}

function NvScroll() {this.version = "0.2";this.name = "NvScroll";this.item = new Array();this.itemcount = 0;this.currentspeed = 0;this.scrollspeed = 50;this.pausedelay = 1000;this.pausemouseover = false;this.stop = false;this.type = 1;this.height = 100;this.width = 100;this.stopHeight=0;this.add =function () {var text = arguments[0];this.item[this.itemcount] = text;this.itemcount = this.itemcount + 1;};this.start = function () {this.display();this.currentspeed = this.scrollspeed;setTimeout(this.name+'.scroll()',this.currentspeed);};this.display =function () {document.write('<div id="'+this.name+'" style="height:'+this.height+';width:'+this.width+';position:relative;overflow:hidden;" OnMouseOver="'+this.name+'.onmouseover();" OnMouseOut="'+this.name+'.onmouseout();">');for(var i = 0; i < this.itemcount; i++) {if ( this.type == 1) {document.write('<div id="'+this.name+'item'+i+'"style="left:0px;width:'+this.width+';position:absolute;top:'+(this.height*i+1)+'px;">');document.write(this.item[i]);document.write('</div>');} else if ( this.type == 2 ) {document.write('<div id="'+this.name+'item'+i+'"style="left:'+(this.width*i+1)+'px;width:'+this.width+';position:absolute;top:0px;">');document.write(this.item[i]);document.write('</div>');}}document.write('</div>');};this.scroll = function () {this.currentspeed = this.scrollspeed;if ( !this.stop ) { for (i = 0; i < this.itemcount; i++) {obj = document.getElementById(this.name+'item'+i).style;if ( this.type == 1 ) {obj.top = parseInt(obj.top) - 1;if ( parseInt(obj.top) <= this.height*(-1) ) obj.top = this.height * (this.itemcount-1);if ( parseInt(obj.top) == 0 || ( this.stopHeight > 0 && this.stopHeight - parseInt(obj.top) == 0 ) ) this.currentspeed = this.pausedelay;} else if ( this.type == 2 ) {obj.left = parseInt(obj.left) - 1;if ( parseInt(obj.left) <= this.left*(-1) ) obj.left = this.left* (this.itemcount-1);if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay;}}}window.setTimeout(this.name+".scroll()",this.currentspeed);};this.onmouseover = function () {if ( this.pausemouseover ) {this.stop = true;}};this.onmouseout = function () {if ( this.pausemouseover ) {this.stop = false;}};}






/* box rotation */


var pictures =[
 '<a href = "partners.php"><IMG src = "images/m_rot_01.gif" border = "0"></a>',
 '<a href = "partners.php"><IMG src = "images/m_rot_02.gif" border = "0"></a>',
 '<a href = "partners.php"><IMG src = "images/m_rot_03.gif" border = "0"></a>'
];
// ÀÌ¹ÌÁö °»½Å ÁÖ±â( 1000 == 1ÃÊ )
var refreshTime = 5000;

/**
  * Ã³À½ ½ÇÇàµÇ´Â ÇÔ¼ö·Î½á
  * Math.floor( Math.random() * pictures.length ) ºÎºÐÀ» ÅëÇØ¼­
  * ÇØ´ç ¹è¿­ ±æÀÌ ¾È¿¡¼­ ·£´ýÇÑ ¼ö¸¦ »Ì¾Æ¿Â ÈÄ
  * viewImage() ÇÔ¼ö¿¡ ÇØ´ç ·£´ýÇÑ ¼ö¸¦ ³Ñ°ÜÁÖ¸é¼­ È£ÃâÇÑ´Ù.
  */
function outRandomImage()
{
 randomId = Math.floor( Math.random() * pictures.length ); // ·£´ý °ª ÃßÃâ
 viewImage( randomId ); // viewImage È£Ãâ
}

/**
  * viewImage() ÇÔ¼ö¿¡¼­´Â ¹ÞÀº randomId °ªÀ» 1 Áõ°¡ ½ÃÅ²´ÙÀ½
  * ±× °ªÀÌ ¹è¿­ Å©±â¿Í °°À» °æ¿ì ¹è¿­ÀÇ °¡Àå Ã³À½ ºÎºÐÀ» °¡¸®Å°°Ô ÇÑ´Ù.
  * ±×·± ´ÙÀ½ image.innerHTML = pictures[ randomId ] À» ÅëÇÏ¿© 
  * ÀÌ¹ÌÁö¸¦ Ãâ·ÂÇÑ´Ù.
  * setTimeout( "viewImage(" + randomId + ")", 1000 ) ºÎºÐÀº
  * 1000 ( 1ÃÊ ) ¸¶´Ù ´Ù½Ã viewImage ÇÔ¼ö¸¦ È£ÃâÇÔÀ¸·Î½á ´Ù¸¥ ÀÌ¹ÌÁö·Î °»½ÅÇÑ´Ù.
  */
function viewImage( randomId )
{
 randomId++; // ·£´ý°ª 1Áõ°¡

 if( randomId == pictures.length ) randomId = 0; // ·£´ý°ªÀÌ ¹è¿­ Å©±â¿Í °°À» °æ¿ì °¡Àå Ã³À½ ÀÌ¹ÌÁö..

 image.innerHTML = pictures[ randomId ]; // ÀÌ¹ÌÁö Ãâ·Â

 setTimeout( "viewImage(" + randomId + ")", refreshTime ); // 1ÃÊ¸¶´Ù ÀÌ¹ÌÁö °»½Å
}




