function setLayerByFrame(argLayer, argFrame)
{
	try {
		var objLayer = document.getElementById(argLayer);
		var objFrame = eval("document." + argFrame);
		var txtBody = objFrame.document.body.innerHTML;
		txtBody = "<table><tr><td>" + txtBody + "</td></tr></table>";
		objLayer.innerHTML = txtBody;
	} catch(e) {}
}
/* Initialize */
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);

// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_ie6down  = (is_ie || is_ie3  || is_ie4 || is_ie5  || is_ie5_5 || is_ie6);
var is_ie7    = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.")!=-1) );
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

/* ±âº» ÇýÅÃ¿¡ °ü·ÃµÈ ¹è¿­ Á¤ÀÇ */
var benefitArray = new Array();
benefitArray[1] = new Array('ÀÚµ¿Â÷');
benefitArray[2] = new Array('¿©Çà/Ç×°ø');
benefitArray[3] = new Array('·¹Àú');
benefitArray[4] = new Array('³îÀÌ°ø¿ø');
benefitArray[5] = new Array('¿µÈ­');
benefitArray[6] = new Array('¿Ü½Ä');
benefitArray[7] = new Array('Â÷/µðÀúÆ®');
benefitArray[8] = new Array('½ºÆ÷Ã÷');
benefitArray[9] = new Array('¼îÇÎ');
benefitArray[10] = new Array('Åë½Å');
benefitArray[11] = new Array('»ýÈ°/°Ç°­');
benefitArray[12] = new Array('±ÝÀ¶');
benefitArray[13] = new Array('±âÅ¸');
benefitArray[14] = new Array('Áö¿ª');
benefitArray[15] = new Array('±³À°');
benefitArray[16] = new Array('º¸Çè');
benefitArray[17] = new Array('¸®¿öµå');
benefitArray[18] = new Array('°ø¿¬');
benefitArray[19] = new Array('ÁÖÀ¯');
benefitArray[20] = new Array('Å¬·´¼­ºñ½º');
benefitArray[21] = new Array('ÇÁ¸®¹Ì¾ö');
/* ÀÌ¹ÌÁö ·Ñ¿À¹ö ex) <img src="url" onmouseover="menuOn(this);" onmouseout="menuOut(this);"  /> */
function menuOn(imgEl)
{
  imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function menuOut(imgEl)
{
  imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuClick(imgE1,element) // ¸®½ºÆ®Ç×¸ñÀÌ ÀÌ¹ÌÁöÀÏ°æ¿ì Å¬¸¯±â´ÉºÎ¿©
{
	list = removeNullNode(element.childNodes);
	for(i=0;i<list.length;i++) {
		imgobj = list[i].getElementsByTagName('img')[0];
		if(imgobj == imgE1) {
			menuOut(imgobj);
			menuOn(imgobj);
			imgobj.onmouseover = null;
			imgobj.onmouseout = null;
		} else {
			menuOut(imgobj);
			imgobj.onmouseover = function() { menuOn(this); }
			imgobj.onmouseout = function() { menuOut(this); }
		}
	}
}
/*
  ½ºÅ¸ÀÏ½ÃÆ® º¯È¯ÇÔ¼ö
*/
// Dropdown Script
var allAns = '';
function showAns(num,style,obj) {
 var subAns = document.getElementById(num);
 if(allAns != subAns) {
  if(allAns != '') allAns.style.display = 'none';
  subAns.style.display = 'block';
  if(style) styleReplaceScript(obj,style.split('=')[1]);
  allAns = subAns;
 } else {
  subAns.style.display = 'none';
  if(style) styleReplaceScript(obj,style.split('=')[1]);
  allAns = '';
 }
}
/*
	¸¶¿ì½º ÁÂÇ¥ ¾ò±â
*/
function getMouseMatrix(e){
	var matrix = new Array();

	var x = document.all ? event.clientX : document.layers ? e.x : e.clientX;
	var y = document.all ? event.clientY : document.layers ? e.y : e.clientY;

	matrix['x'] = x;
	matrix['y'] = y;
	return matrix;
}
function eMatrix(element) { /* ElementÀÇ À§Ä¡°ª,³Êºñ,³ôÀÌ ¾Ë¾Æ³»±â */
	var matrix = new Array();
	matrix.x = 0;
	matrix.y = 0;
	matrix.w = element.clientWidth;
	matrix.h = element.clientHeight;
	while(element) {
		matrix.x += element.offsetLeft;
		matrix.y += element.offsetTop;
		element = element.offsetParent;
	}
	return matrix;
}
function eSize(e) { /* ElementÀÇ ³Êºñ³ôÀÌ */
	var matrix = new Array();
	matrix['w'] = e.clientWidth;
	matrix['h'] = e.clientHeight;
	return matrix;
}
function changeFlashsize(obj,h) {
	obj.style.height=h;
}
/* Node °è»ê½Ã ie¸¦ Á¦¿ÜÇÑ ºê¶ó¿ìÀú¿¡¼­ °ø¹é±îÁö ³ëµå·Î Æ÷ÇÔ½ÃÅ°´Â °ÍÀ» Á¦°Å */
function removeNullNode(obj) {
	for(k=0;k<obj.length;k++) {
		if(obj[k].nodeType != 1) obj[k].parentNode.removeChild(obj[k]);
	}
	return obj;
}
/* °´Ã¼ Alpha Á¶Àý */
function alphacontroll(o,v) { // o : target, v : value
	o.opacity=v+"%";
	o.style.filter = "alpha(opacity: "+v+")";
}
/**
 * <pre>
 * desc   : Global º¯¼ö¼±¾ð, CDN Àû¿ë ÄÁÅÙÃ÷ÀÇ È£Ãâ url º¯¼ö
 */
//var cdnUrl 		 = "http://hyundaicard.xcdnplus.co.kr";				// CDN ¼­¹ö ÇÃ·¡½Ã Road¿ë µµ¸ÞÀÎ º¯¼ö
var cdnUrl 		 = "http://img.hyundaicard.com";				// CDN ¼­¹ö ÇÃ·¡½Ã Road¿ë µµ¸ÞÀÎ º¯¼ö
var xml4person = "http://www.hyundaicard.com";					// °³ÀÎ »çÀÌÆ® CDN ¼­¹ö ÇÃ·¡½ÃÀÇ Xml Road¿ë µµ¸ÞÀÎ º¯¼ö
var xml4partner = "http://www.hyundaicard.com/partner";	// CDN ¼­¹ö ÇÃ·¡½ÃÀÇ Xml Road¿ë µµ¸ÞÀÎ º¯¼ö
var xml4business = "http://www.hyundaicard.com/mybusiness";
var isCDN = true;												// CDN ¼­ºñ½º Àû¿ë ¿©ºÎ ±Û·Î¹ú º¯¼ö, ÀÌ °ªÀ» false·Î ¼³Á¤ÇÏ¸é CDN ¼­ºñ½º UrlÀÌ Àû¿ëµÈ ¸ðµç ¼­ºñ½º°¡ ±âº» ¼­ºñ½º Url·Î Àû¿ëµÈ´Ù.

if(location.toString().indexOf("twww4")>-1 || location.toString().indexOf("dev") > -1)
{
	cdnUrl 		 = "http://twww4.hyundaicard.com:83";	
	xml4person = "http://twww4.hyundaicard.com:83";					// °³ÀÎ »çÀÌÆ® CDN ¼­¹ö ÇÃ·¡½ÃÀÇ Xml Road¿ë µµ¸ÞÀÎ º¯¼ö
	xml4partner = "http://twww4.hyundaicard.com:83/partner";	// CDN ¼­¹ö ÇÃ·¡½ÃÀÇ Xml Road¿ë µµ¸ÞÀÎ º¯¼ö
	xml4business = "http://twww4.hyundaicard.com:83/mybusiness";
}

/**
 * <pre>
 * desc   : CDN ¼­ºñ½º Àû¿ë ¿©ºÎ¿¡ µû¸¥ ´Ù¿î·Îµå Url ¹ÝÈ¯
 * </pre>
 * @type	function
 * @access	public
 * @param	gbn Àû¿ë ÄÁÅÙÃ÷ ±¸ºÐ (flash:ÇÃ·¡½Ã, xecure:º¸¾ÈÅø, map:Äá³ª¹°¸Ê)
 * @return		String
 * @author	±èÇüÁø
 */

function getCDNurl(){
	try{
		if(isCDN){
			return cdnUrl;
		} else {
			return "http://www.hyundaicard.com";
		}
	} catch(e) {
		return "http://www.hyundaicard.com";   // try ºí·°¿¡¼­ ¿¡·¯ ¹ß»ý½Ã ¸ðµç ÄÁÅÙÃ÷´Â Çö´ëÄ«µå ¼­¹ö¿¡¼­ ¹Þ¾Æ°¡µµ·Ï ÇÑ´Ù.
	}
}

/* OBJECT ÅëÇÕ»ý¼º ½ºÅ©¸³Æ® */
function makeobject(type,path,w,h,id,vars,transparent,bg) {
	this.url = getCDNurl();
	this.type = type; // flash, applet, movie
	this.id = id;
	this.path = path;
	this.w = w+"px";
	this.h = h+"px";
	this.vars = (vars) ? vars : '';
	this.trnasparent = (transparent) ? transparent : 'transparent';
	this.bg = (bg) ? bg : '#ffffff';
	this.gettag =
		function() {
			switch(this.type) {
				case 'flash' :
					this.classid = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
					this.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';
					this.tag = "<object classid='"+this.classid+"' codebase='"+this.codebase+"' id='"+this.id+"' width='"+this.w+"' height='"+this.h+"'>";
					this.tag += "<param name='movie' value='"+this.url+this.path+"' />";
					this.tag += "<param name='allowScriptAccess' value='always' />";
					if(this.vars) this.tag += "<param name='FlashVars' value='"+this.vars+"' />";
					if(this.trnasparent) this.tag += "<param name='wmode' value='"+this.trnasparent+"' />";
					this.tag += "<param name='menu' value='false' />";
					this.tag += "<param name='quality' value='high' />"
					this.tag += "<param name='bgcolor' value='"+this.bg+"' />";
					this.tag += "<param value='"+this.path+"'>";
					this.tag += "<param name='base' value='.'>";
					this.tag += "<embed src='"+this.url+this.path+"'";
					if(this.vars) this.tag += " FlashVars='"+this.vars+"'";
					if(this.trnasparent) this.tag += " wmode='"+this.trnasparent+"'";
					this.tag += " width='"+this.w+"'";
					this.tag += " height='"+this.h+"'";
					this.tag += " bgcolor='"+this.bg+"'";
					this.tag += " name='"+this.id+"'";
					this.tag += " menu='false'";
					this.tag += " base='.'";
					this.tag += " quality='high'";
					this.tag += " allowScriptAccess='always'";
					this.tag += " type='application/x-shockwave-flash'";
					this.tag += " pluginspage='http://www.macromedia.com/go/etflashplayer'";
					this.tag += " />";
					this.tag += "</object>";
					return this.tag;
					break;
				case 'media' :
					this.classid = 'clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95';
					this.codebase = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0';
					this.tag = "<object classid='"+this.classid+"' codebase='"+this.codebase+"' id='"+this.id+"' width='"+this.w+"' height='"+this.h+"'>";
					this.tag += "<param name='movie' value='"+this.url+this.path+"' />";
					this.tag += "<param name='allowScriptAccess' value='always' />";
					if(this.vars) this.tag += "<param name='FlashVars' value='"+this.vars+"' />";
					if(this.trnasparent) this.tag += "<param name='wmode' value='"+this.trnasparent+"' />";
					this.tag += "<param name='menu' value='false' />";
					this.tag += "<param name='quality' value='high' />"
					this.tag += "<param name='bgcolor' value='"+this.bg+"' />";
					this.tag += "<param value='"+this.path+"'>";
					this.tag += "<param name='base' value='.'>";
					this.tag += "<embed src='"+this.url+this.path+"'";
					if(this.vars) this.tag += " FlashVars='"+this.vars+"'";
					if(this.trnasparent) this.tag += " wmode='"+this.trnasparent+"'";
					this.tag += " width='"+this.w+"'";
					this.tag += " height='"+this.h+"'";
					this.tag += " bgcolor='"+this.bg+"'";
					this.tag += " name='"+this.id+"'";
					this.tag += " menu='false'";
					this.tag += " quality='high'";
					this.tag += " allowScriptAccess='always'";
					this.tag += " type='application/x-mplayer2";
					this.tag += " pluginspage='http://www.macromedia.com/go/etflashplayer'";
					this.tag += " />";
					this.tag += "</object>";
					return this.tag;
					break;
			}
		}
	this.writetag =
		function() {
			document.write(this.gettag());
			//FlashÀÇ ExternalInterface°¡ Form Tag³»¿¡¼­ ¿À·ù³ª´Â ¹ö±×¸¦ ÇØ°áÇÏ´Â ÄÚµå
			eval("window." + this.id + " = document.getElementById('" + this.id + "');");
		}
}
function makeTagDesign(type,obj,styleoption) {
/*
	Type = "file" ÀÏ °æ¿ì ÅÂ±×´Â
	<div id="filetag01" class="filetag"><input type="file" style="width:300px;" class="/front/images/btn/btn_filefind.gif" /></div>
	class¸íÀ¸·Î ¹öÆ°°æ·Î ³Ö½À´Ï´Ù. filetag½ºÅ¸ÀÏ½ÃÆ® ¼³Á¤
	.filetag {
		filter:alpha(opacity: 0); outline: none;
		selector-dummy:expression(this.hideFocus=true);-moz-opacity:0;
		position:absolute;
		cursor:pointer;
	}
*/
	switch(type) {
		case 'file':
			var fileobj = document.getElementById(obj).getElementsByTagName('input').item(0);
			fileobjBtnName = fileobj.className;
			fileobjWidth = (fileobj.style.width=='') ? '300' : parseInt(fileobj.style.width);
			var newObj = document.createElement("input");
			newObj.setAttribute('type','text');
			newObj.setAttribute('width',fileobjWidth);
			var btnObj = document.createElement("img");
			btnObj.setAttribute('src',fileobjBtnName);
			document.getElementById(obj).appendChild(newObj);
			document.getElementById(obj).appendChild(btnObj);
			newObj.readOnly = true;
			fileobj.className = fileobj.className + " filetag";
			fileobj.style.width = "1";
			fileobj.style.marginLeft = fileobjWidth;
			fileobj.onchange = function() {
				newObj.value = fileobj.value;
			}
		break;
		case 'select':
//			var selectobj = document.getElementById(obj);
//			var newselectList = document.createElement("ul");
//			for(i=0;i<selectobj.length;i++) {
//				selectitem = document.createElement("li");
//				selectitem.text = selectobj.options[i].text;
//				newselectList.appendChild(selectitem);
//			}
//			selectobj.parentNode.replaceChild(newselectList,selectobj);
		break;
		case 'radio':
			var radioobj = document.getElementById(obj);
			radioobj.className = radioobj.className + " radcheck";
			var newRadioElement = document.createElement("div");
			newRadioElement.className = "radioR2";
			newRadioElement.name = radioobj.id;
			radioobj.parentNode.insertBefore(newRadioElement, radioobj);
			radioobj.onchange = function() {
				if(this.checked == true) {
					//newRadioElement.className = newRadioElement.className.replace('radioR2','radioR2on');
				} else {
					//newRadioElement.className = newRadioElement.className.replace('radioR2on','radioR2');
				}
			}
		break;
		default:
	}
}
/* µî°¡¼Ó °è»ê ¾Ë°í¸®Áò */
var speedCalculate = function(result,targetResult,speedPercent) {
	if(result>targetResult) {
		check = (((targetResult - result) * speedPercent) < -1) ? true : false;
	} else {
		check = (((targetResult - result) * speedPercent) > 1) ? true : false;
	}
	if(result==targetResult) {
		return targetResult;
	} else {
		if(check) {
			result += (targetResult - result) * speedPercent;
		} else {
			result = ((targetResult - result)>0) ? result+1 : result-1;
		}
		return parseInt(result);
	}
}
/*
	CSS º¸Á¶ÇÔ¼ö
*/
function inputFormController(obj) { // IE6 ·»´õ¸µ ¹ö±× º¸Á¤ : behavior½ºÅ¸ÀÏ½ÃÆ® ÀÌ¿ë
		if(obj.type.toLowerCase() == 'radio' || obj.type.toLowerCase() == 'checkbox' || obj.type.toLowerCase() == 'image') {
			obj.style.background="none";
			obj.style.border="0";
			obj.style.padding="0";
		} else if(obj.type.toLowerCase() == 'text' || obj.type.toLowerCase() == 'password') {
			if(!obj.style.width) return false;
			//obj.style.width = parseInt(obj.style.width);
			//obj.style.height = parseInt(obj.clientHeight) + 4;
		}
}
function cssinputradCheck01(obj) {
	if(obj.type.toLowerCase() == 'radio' || obj.type.toLowerCase() == 'checkbox') {
		obj.style.verticalAlign="middle";
		obj.style.border="0";
		obj.style.background="none";
		obj.style.marginTop="-3px";
	} else if(obj.type.toLowerCase() == 'image') {
		obj.style.border="0";
		obj.style.padding="0";
	}
}
function cssinputradCheck02(obj) {
	if(obj.type.toLowerCase() == 'radio' || obj.type.toLowerCase() == 'checkbox') {
		obj.style.border="0";
		obj.style.background="none";
		obj.style.marginTop="0";
	}
}
function cssinputradCheck03(obj) {
	if(obj.type.toLowerCase() == 'radio' || obj.type.toLowerCase() == 'checkbox') {
		obj.style.marginLeft="-5px";
	}
}
function cssinputradCheck04(obj) {
	if(obj.type.toLowerCase() == 'radio' || obj.type.toLowerCase() == 'checkbox') {
		obj.style.marginTop="-4px";
		obj.style.background = "none";
		obj.style.border = "none";
		obj.style.verticalAlign = "top";
	}
}
// ¼¼·Î Áß¾ÓÁ¤·Ä
function verticalAlign(obj){
    result=(obj.offsetParent.offsetHeight - obj.offsetHeight)/2+"px";
    if(obj.readyState == "complete"){
        obj.style.marginTop="0";
        obj.style.marginTop=result;
    }else{
        return result;
    }
}
//max-width, max-height
function maxSize(obj,w,h){
    if(obj.readyState != "complete") return "auto";
    real_w=obj.offsetWidth;
    real_h=obj.offsetHeight;
    virt_w=obj.offsetWidth;
    virt_h=obj.offsetHeight;
    if(w>0 && virt_w>w){
        virt_w = w;
        virt_h = real_h * (virt_w/real_w);
    }
    if(h>0 && virt_h>h){
        virt_h = h;
        virt_w = real_w * (virt_h/real_h);
    }
    obj.style.width="0";
    obj.style.height="0";
    obj.style.width=virt_w+"px";
    obj.style.height=virt_h+"px";
}
//min-height
function min_height(obj,h){
    if(obj.readyState != "complete") return "auto";
    if(obj.offsetHeight<h){
        obj.style.height="0";
        obj.style.height=h+"px";
    }
}
/*
	´Ü¼ø ÇÔ¼ö
*/
function SelectController(obj,swit) { /* ¼¿·ºÆ®¹Ú½º ¼û±â±â */
	switch(swit) {
		case 'off' :
			var selectobj = document.body.getElementsByTagName('select');
			for(i=0;i<selectobj.length;i++) {
				selectobj[i].style.visibility = "hidden";
			}
			break;
		case 'on' :
			var selectobj = document.body.getElementsByTagName('select');
			for(i=0;i<selectobj.length;i++) {
				selectobj[i].style.visibility = "visible";
			}
			break;
	}
}
function SelectController(swit) { /* ¼¿·ºÆ®¹Ú½º ¼û±â±â */
	var selectobj = document.body.getElementsByTagName('select');
	switch(swit) {
		case 'off' :
			for(i=0;i<selectobj.length;i++) {
				selectobj[i].style.visibility = "hidden";
			}
			break;
		case 'on' :
			for(i=0;i<selectobj.length;i++) {
				selectobj[i].style.visibility = "visible";
			}
			break;
	}
}
function blockLayer(id,swit) {
	if(!document.getElementById(id)) return false;
	o = document.getElementById(id);
	switch(swit) {
		case 'block' : o.style.display="block";break;
		case 'none' : o.style.display="none";break;
	}
}
function displayController(id,swit) { /* ´Ü¼øÇÏ°Ô ·¹ÀÌ¾î Á¦¾î */
	o = document.getElementById(id);
	switch(swit) {
		case 'on' : o.style.display="block";break;
		case 'off' : o.style.display="none";break;
	}

}
/* ºÎ¸ðÃ¢¿¡ elementÃ£±â */
function findParentNode(o,e) {
	while(o) {
		o = o.parentNode;
		if(o.nodeName.toLowerCase() == e) break;
	}
	return o;
}
/* µ¿ÀÏ³ëµå»óÀÇ ´ÙÀ½ element */
function nextNode(o) {
	o = o.nextSibling;
	while(o) {
		if(o.nodeType != 1) o = o.nextSibling;
		else break;
	}
	return o;
}
/* µ¿ÀÏ³ëµå»óÀÇ ÀÌÀü element */
function prevNode(o) {
	o = o.previousSibling;
	while(o) {
		if(o.nodeType != 1) o = o.previousSibling;
		else break;
	}
	return o;
}
/* ÀÚ½ÅÀÇ element »èÁ¦ */
function killthis(o) {
	o.parentNode.removeChild(o);
}
/* ÀÔ·Â¹®ÀÚ(input)¿¡ ÇØ´ç¹®ÀÚ(chars)°¡ ÀÖ´ÂÁö Ã¼Å©ÇÑ´Ù. */
function checkString(input,chars)
{
        for (var inx = 0; inx < input.length; inx++) {
          if (chars.indexOf(input.charAt(inx)) == -1)
                  return true;
        }
        return false;
}
/* ÀÔ·Â¹®ÀÚ(input)¿¡ ÇØ´ç¼ýÀÚ(numbers)°¡ ÀÖ´ÂÁö Ã¼Å©ÇÑ´Ù.  */
function checkNumber(input)
{
        var chars = "0123456789";
        return checkString(input,chars);
}
/* ÀÔ·Â¹®ÀÚ(input)¿¡ ÇØ´ç ´ë¹®ÀÚ(chars)°¡ ÀÖ´ÂÁö Ã¼Å©ÇÑ´Ù. */
function checkUpperCase(input)
{
        var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        return checkString(input,chars);
}
/* ÀÔ·Â¹®ÀÚ(input)¿¡ Æ¯¼ö¹®ÀÚµé·Î ´ëÄ¡ÇÑ´Ù. */
function char2Special(str)
{
	str = str.replace('&','&amp;');
	str = str.replace(' ','&nbsp;');
	str = str.replace('/','&#47;');
	return str;
}


/* ´Ü¼ø ÅÇ¸Þ´º Á¦¾î */
function tabMnuController(o,type) { // type : image
	var o = document.getElementById(o);
	var list = removeNullNode(o.getElementsByTagName('ul').item(0).childNodes);
	var activeClass;
	var activeCode;
	this.run = function() {
		activeClass = this.activeClass;
		activeCode = this.activeCode;
		this.init(activeCode,activeClass);
	}
	this.reset = function() { // ¸ðµç ±â´É ÇØÁ¦
		activeClass = this.activeClass;
		for(j=0;j<list.length;j++) {
			anc = list[j].getElementsByTagName('a').item(0);
			activeLayer = anc.href.split('#')[1];
			linode = findParentNode(anc,'li');
			linode.className = linode.className.replace(activeClass,"");
			document.getElementById(activeLayer).style.display="none";
		}
	}
	this.init = function(activeCode,activeClass) {
		for(i=0; i<list.length; i++) {
			anc = list.item(i).getElementsByTagName('a').item(0);
			anc.onclick = function() {
				tmpthis = this;
				pNode = findParentNode(this,'ul').childNodes;
				for(j=0;j<pNode.length;j++) {
					anc = pNode[j].getElementsByTagName('a').item(0);
					activeLayer = anc.href.split('#')[1];
					linode = findParentNode(anc,'li');
					if(anc == this) {
						linode.className = linode.className + " " + activeClass;
						if(type=='listimage') {
							tmpimgobj = linode.getElementsByTagName('img')[0];
							menuOut(tmpimgobj);
							menuOn(tmpimgobj);
						}
						document.getElementById(activeLayer).style.display="block";
					} else {
						linode.className = linode.className.replace(activeClass,"");
						if(type=='listimage') {
							tmpimgobj = linode.getElementsByTagName('img')[0];
							menuOut(tmpimgobj);
						}
						document.getElementById(activeLayer).style.display="none";
					}
				}
				return false;
			}
		}
		if(activeCode) list[activeCode-1].getElementsByTagName('a').item(0).onclick();
	}
}
/* ÅÇ¸Þ´º Á¦¾î ºÎ°¡±â´É : open, close°¡ µé¾î ÀÖ´Â °æ¿ì*/
function tabMnuControllerAddon(o,t) { // o : list obj, t : target Controller
	obj = document.getElementById(o);
	openobj = document.getElementById('openZone');
	closeobj = document.getElementById('closeZone');
	openobj.style.cursor = "pointer";
	closeobj.style.cursor = "pointer";
	var addonTabFunc = function(e) {
		if (!e) e = window.event;
		if(is_ie) eventElement = e.srcElement;
		else eventElement = e.target;
		if(eventElement.nodeName.toLowerCase() == 'span') {
			eventElement = eventElement.parentNode;
			openobj.style.display="none";
			closeobj.style.display="block";
		}
		if(document.removeEventListener) {
			obj.removeEventListener("load",addonTabFunc,true);
		} else {
			obj.detachEvent("onload",addonTabFunc);
		}
	}
	if(document.addEventListener) {
		obj.addEventListener("click",addonTabFunc,true);
	} else {
		obj.attachEvent("onclick",addonTabFunc);
	}
	this.lclose = function() {
		eval(t+".reset()");
		openobj.style.display="block";
		closeobj.style.display="none";
	}
	openobj.onclick = function() {
		obj.list = removeNullNode(obj.getElementsByTagName('li'));
		obj.list[0].getElementsByTagName('a')[0].onclick();
		openobj.style.display="none";
		closeobj.style.display="block";
	}
}
/* ´Ü¼ø FAQ Ã³¸® */
function FaqController(o) {
	var o = document.getElementById(o);
	var list = removeNullNode(o.getElementsByTagName('dl').item(0).childNodes);
	var recentStatus = false;
	this.run = function() {
		this.init(this.activeCode,this.activeClassQ,this.activeClassA);
	}
	this.init = function(activeCode,activeClassQ,activeClassA) {
		var anc;
		for(i=0;i<list.length;i++) {
			anc = list.item(i);
			if(anc.nodeName.toLowerCase() == 'dt') {
				anc.onfocus =
				anc.onclick = function() {
					pNode = removeNullNode(findParentNode(this,'dl').childNodes);
					nNode = nextNode(this);
					for(j=0;j<pNode.length;j++) {
						if(pNode[j].nodeName.toLowerCase() == 'dd') {
							if(pNode[j] == nNode) {
								if(pNode[j].style.display == "block") {
									if(activeClassA) pNode[j].className = pNode[j].className.replace(activeClassA,'');
									pNode[j].style.display = "none";
								} else {
									check = pNode[j].className.indexOf(activeClassA);
									if(check == -1 || check == 2) pNode[j].className = pNode[j].className + " " + activeClassA;
									pNode[j].style.display = "block";
								}
							} else {
								if(activeClassA) pNode[j].className = pNode[j].className.replace(activeClassA,'');
								pNode[j].style.display = "none";
							}
						} else {
							if(pNode[j] == this) {
								if(activeClassQ) {
									check = pNode[j].className.indexOf(activeClassQ);
									if(check == -1 || check == 2) pNode[j].className = pNode[j].className + " " + activeClassQ;
								}
							} else {
								if(activeClassQ) pNode[j].className = pNode[j].className.replace(activeClassQ,'');
							}
						}
					}
				}
			}
		}
		if(activeCode) {
			dtlayer = removeNullNode(o.getElementsByTagName('dt'));
			dtlayer[activeCode-1].onclick();
		}
	}
}
/* ÅøÆÁ ·¹ÀÌ¾î Á¦¾îÇÏ±â */
function TooltipController(obj,swit,tobj,ment,l,t,a,sWidth) { // obj : source Layer, swit : status, tobj : target Layer, ment : input ment, l : left Margin, t: top Margin, a : Type
	var l = parseInt(l,10);
	var t = parseInt(t,10);
	sWidth = (sWidth) ? sWidth : document.body.clientWidth;
	tobj = document.getElementById(tobj);
	tobj.getElementsByTagName('p')[0].innerHTML = ment;
	var getObjLocation = eMatrix(obj);
	switch(swit) {
		case 'on':
			if(a) {
				if( (tobj.clientWidth + getObjLocation.x) > sWidth )  {
					tobj.style.left = (getObjLocation.x - tobj.clientWidth) + obj.clientWidth + "px";
					tobj.style.top = getObjLocation.y - tobj.clientHeight + "px";
					if(tobj.className == "layerTooltip") {
						tobj.className = "layerTooltip_type03";
					}
				} else {
					tobj.style.left = getObjLocation.x + "px";
					tobj.style.top = getObjLocation.y - tobj.clientHeight + "px";
					if(tobj.className == "layerTooltip_type03") {
						tobj.className = "layerTooltip";
					}
				}
					if(l) tobj.style.left = parseInt(tobj.style.left,10) + l + "px";
					if(t) tobj.style.top = parseInt(tobj.style.top,10) + t + "px";
					tobj.style.visibility = "visible";
			} else {
					if(tobj.className == "layerTooltip_type03") {
						tobj.className = "layerTooltip";
					}
					tobj.style.left = getObjLocation.x + "px";
					tobj.style.top = getObjLocation.y - tobj.clientHeight + "px";
					if(l) tobj.style.left = parseInt(tobj.style.left,10) + l + "px";
					if(t) tobj.style.top = parseInt(tobj.style.top,10) + t + "px";
					tobj.style.visibility = "visible";
			}
			break;
		case 'off':
			tobj.style.visibility = "hidden";
			break;
	}
}
function clearTooltip(o,s) {
	for(i=0;i<20;i++) {
		tmpStr =
		eval('blockLayer("blueContainer'+i+'","none")');
	}
}
/* ¹®È­Á¤º¸ ¼­ºñ½º ´Þ·Â¿¡ ¾²ÀÌ´Â ½ºÅ©¸³Æ® */
function showdiaryController(o) {
	var diaryobj = o.getElementsByTagName('div')[0];
	var diarywrapobj = document.getElementById('calendar');
	diaryobj.style.display = "block";
	var tmatrix1 = eMatrix(o);
	var tmatrix2 = eMatrix(diarywrapobj);
	var tmatrix3 = eMatrix(diaryobj);
	var matrix = new Object();
	matrix.x = (tmatrix1.x-tmatrix2.x)-((tmatrix3.w/2)-14);
	matrix.y = tmatrix1.y-tmatrix2.y-(tmatrix3.h-3)
	if(matrix.x >=0) {
		if(matrix.x+tmatrix3.w > tmatrix2.w) {
			diaryobj.style.left = (tmatrix2.w-tmatrix3.w) + "px";
			diaryobj.getElementsByTagName('div')[0].className = 'tooltipBottom03';
		} else diaryobj.style.left = matrix.x + "px";
	}
	else {
		diaryobj.style.left = 0;
		diaryobj.getElementsByTagName('div')[0].className = 'tooltipBottom02';
	}
	diaryobj.style.top = matrix.y + "px";



	o.onmouseout = function() {
		diaryobj.style.display = "none";
	}
}
/* ¹®È­Á¤º¸ ¼­ºñ½º ¿µÈ­¿¡ ¾²ÀÌ´Â ½ºÅ©¸³Æ® */
function movielayerController(o) {
	var movieobj = o.getElementsByTagName('div')[0];
	var moviewrapobj = document.getElementById('reserChoice');
	movieobj.style.display = "block";
	var tmatrix1 = eMatrix(o);
	var tmatrix2 = eMatrix(moviewrapobj);
	var tmatrix3 = eMatrix(movieobj);
	var matrix = new Object();
	matrix.x = (tmatrix1.x-tmatrix2.x);
	matrix.y = tmatrix1.y-tmatrix2.y+20;

	if((tmatrix1.x-tmatrix2.x) !=0) {
		movieobj.className = 'tooltipOuter02';
	}
	else {
		movieobj.className = 'tooltipOuter';
	}
	movieobj.style.left = 0;
	movieobj.style.top = matrix.y + "px";



	o.onmouseout = function() {
		movieobj.style.display = "none";
	}
}
/* FLaSH ³ôÀÌ Á¶Àý */
function setFlashHeight(tid,h) {

	tobj = document.getElementById(tid);
	if(is_ie) {
		tobj.style.height = h;
		tobj.getElementsByTagName('object')[0].style.height = h;
		
	}
	else tobj.style.height = h+"px";
	if(tobj.id == "topGNBflashWrap") {

		if(parseInt(h)<70) { selectCompare(tobj,'on') }
		else selectCompare(tobj,'off')
	}
}


function onMyAccount() {
	document.body.className="account";
}
/* ÇÃ·¡½Ã ´Þ·Â Á¦¾î */
function diaryController(tobj, strid, callSelect) {
	var o = document.getElementById('diaryFlashZone');
	var contentSize = eMatrix(document.getElementById('content'));
	// calendar À§Ä¡ ÁöÁ¤
	matrix = eMatrix(tobj);
	o.style.left = ((matrix.x-o.clientWidth)+25)-(contentSize.x);
	o.style.top = (matrix.y-9)-(contentSize.y);
	var flashembed = o.getElementsByTagName('object').item(0);
	// yy,mm °ªÀ» flash¿¡ Àü´Þ
	var yyyymmdd = eval(strid+".value");		// hidden °ªÀ» °¡Á®¿Â´Ù.
	var yy = parseInt(yyyymmdd.substring(0,4),10);
	var mm = parseInt(yyyymmdd.substring(4,6),10);
	// callSelect ´Â ³¯Â¥ ¼±ÅÃ½Ã ´Ù¸¥ Ã³¸®¸¦ ÇÏ±â À§ÇØ Ãß°¡µÈ º¯¼öÀÓ
	flashembed.flashSetDateCalendar(strid, yy, mm, callSelect);
	selectCompare(flashembed,'off')
}
/* Ä«µå »ó¼¼º¸±â ÇÃ·¡½Ã Áö¿ø ½ºÅ©¸³Æ® : master, visa, local, ±¸ºÐÀü´Þ ½ºÅ©¸³Æ® */
function changeCardBrandAdd(o) {
	var flashObj = document.getElementById('cardVisualobj');
	flashObj.changeCardBrand(o.toLowerCase());
}
function setpng24(obj) {
	obj.width=obj.height=1;
	obj.className=obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter =
	"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src='';
	return '';
}
function flashCalendarClose() { /* ´ÝÀ»¶§ */
	var o = document.getElementById('diaryFlashZone');
	o.style.left = "-5000px";
	selectCompare(o,'on')
}
function flashSelectDate(target,yyyymmdd, callSelect) { /* ¼±ÅÃ½Ã */
	dateData = yyyymmdd.split('/');
	// form
	var targetObj = eval(target);
	targetObj.value = dateData[0]+dateData[1]+dateData[2];
	// span text
	var strSpanId = "span_" + targetObj.name;
	document.getElementById(strSpanId).innerHTML = dateData[0] + "³â " + dateData[1] + "¿ù " + dateData[2] + "ÀÏ"
	flashCalendarClose();
	// callSelect ´Â ³¯Â¥ ¼±ÅÃ½Ã ´Ù¸¥ Ã³¸®¸¦ ÇÏ±â À§ÇØ Ãß°¡µÈ º¯¼öÀÓ (Çö±Ý¼­ºñ½º ½ÅÃ»½Ã)
	if(callSelect && callSelect=="cardFrm_ajax") {
		calendarChange();
	}
}
//* ½ºÅ©·Ñ¹Ù Á¦¾î */
function scroll_x_initialize(o,to) {
	/*
		scroll_x : Move¹Ù Ç¥Çö ¿µ¿ª
		scroll_x.zone : Move¹Ù ¹è°æ
		scroll_xList : ½ºÅ©·ÑÇ¥Çö ¿µ¿ª
	*/
	var scroll_x = document.getElementById(o);
	scroll_x.zone = scroll_x.getElementsByTagName('div')[0];
	var scroll_xList = document.getElementById(to);
	scroll_xList.x = scroll_xList.clientWidth;
	scroll_xList.ul = scroll_xList.getElementsByTagName('ul').item(0);
	scroll_xList.ul.li = removeNullNode(scroll_xList.ul.childNodes);
	var ratio;
	this.initialize = function() {
		scroll_x.style.visibility="visible";
		scroll_xList.ul.style.marginLeft = "0";
		scroll_x.zone.style.left = 0;
		scroll_x.zone.w = scroll_x.zone.clientWidth;
		scroll_x.w = scroll_x.clientWidth;
		scroll_xList.style.width = scroll_x.w + "px";
		function calculateWidth() {
			tmpCalculate = 0;
			for(i=0;i<scroll_xList.ul.li.length;i++) {
				tmpCalculate += scroll_xList.ul.li[i].clientWidth;
			}
			return tmpCalculate;
		}
		tmpwidth = calculateWidth();
		scroll_xList.ul.style.width = tmpwidth + "px";
/*		while(scroll_xList.ul.clientHeight!=scroll_xList.ul.li[0].clientHeight) {
			tmpwidth = calculateWidth();
			scroll_xList.ul.style.width = tmpwidth + "px";
		}*/
		if(tmpCalculate<=scroll_x.w) {
			scroll_x.style.visibility="hidden";
			return false;
		}
		scroll_xList.ul.x = parseInt(scroll_xList.ul.style.width,10);
		ratio = (scroll_xList.ul.x - scroll_xList.x)/(scroll_x.w-scroll_x.zone.w);
		scroll_x.zone.onmousedown = function(event) {
			scrollmove(this,event);
		}
	}
	function scrollmove(elementToDrag,e) {
		if (!e) e = window.event;
		limitX = parseInt(elementToDrag.parentNode.clientWidth,10) - parseInt(elementToDrag.clientWidth,10);
		var startx = e.clientX;
		var origx = elementToDrag.offsetLeft;
		var deltaX = startx - origx;
		if(document.addEventListener) {
			document.addEventListener("mousemove",moveHandler,true);
			document.addEventListener("mouseup",upHandler,true);
		} else {
			elementToDrag.setCapture();
			elementToDrag.attachEvent("onmousemove",moveHandler);
			elementToDrag.attachEvent("onmouseup",upHandler);
			elementToDrag.attachEvent("onlosecapture",upHandler);
		}
		if(e.stopPropagation) e.stopPropagation();
		else e.cancelBubble = true;
		if(e.preventDefault) e.preventDefault();
		else e.returnValue = false;
		function moveHandler(e) {
			if(e.clientX - deltaX >= 0) {
				if(e.clientX - deltaX <= limitX) elementToDrag.style.left = (e.clientX - deltaX) + "px";
				else elementToDrag.style.left = limitX + "px";
			}
			else elementToDrag.style.left = 0;
			scroll_xList.ul.style.marginLeft = (elementToDrag.offsetLeft*ratio)*(-1) + "px";
			scroll_x.backgroundPosition = '-100px top';
		}
		function upHandler(e) {
			if (!e) e = window.event;
			if(document.removeEventListener) {
				document.removeEventListener("mouseup",upHandler, true);
				document.removeEventListener("mousemove", moveHandler, true);
			} else {
				elementToDrag.detachEvent("onlosecapture",upHandler);
				elementToDrag.detachEvent("onmouseup",upHandler);
				elementToDrag.detachEvent("onmousemove",moveHandler);
				elementToDrag.releaseCapture();
			}
		}
	}
}



function scroll_y_initialize(o,to) {
	/*
		scroll_y : Move¹Ù Ç¥Çö ¿µ¿ª
		scroll_y.zone : Move¹Ù ¹è°æ
		scroll_yList : ½ºÅ©·ÑÇ¥Çö ¿µ¿ª
	*/


	var imgcheckcount;
	var moveWheelcheck;
	var scroll_y;
	var scroll_yList;
	var imgcheck;
	var ratio;
	var checkCount;

	var spos; // µå·¡±× ¿µ¿ª ½ÃÀÛÀ§Ä¡
	var epos; // µå·¡±× ¿µ¿ª ¸¶Áö¸· À§Ä¡

	var mStartPos;
	var barStartPos;
	var conStartPos;

	this.initialize = function() {

		scroll_y = document.getElementById(o);
		scroll_y.h = scroll_y.clientHeight;
		scroll_y.zone = scroll_y.getElementsByTagName('div')[0];

		scroll_yList = document.getElementById(to);
		scroll_yList.h = scroll_yList.clientHeight;

		scroll_yList.ul = scroll_yList.getElementsByTagName('ul').item(0);
		scroll_yList.ul.li = removeNullNode(scroll_yList.ul.childNodes);
		scroll_yList.ul.style.marginTop = 0;

		scroll_yList.ul.h = scroll_yList.ul.li[0].clientHeight;
		
		scroll_y.zone.h = scroll_y.zone.clientHeight;

		ratio = (scroll_yList.ul.h - scroll_yList.h)/(scroll_y.h-scroll_y.zone.h);

		spos = scroll_y.zone.offsetTop; // µå·¡±× ¿µ¿ª ½ÃÀÛÀ§Ä¡
		epos = parseInt(scroll_y.zone.parentNode.clientHeight,10) - parseInt(scroll_y.zone.clientHeight,10); // µå·¡±× ¿µ¿ª ¸¶Áö¸· À§Ä¡

		conStartPos = scroll_yList.style.marginTop;
		if(scroll_yList.ul.h <= scroll_y.zone.parentNode.clientHeight) { 
			scroll_y.style.display = "none"; 
			return false;
		}

		setScrollBar();
	}


	function setScrollBar() {

		if(document.addEventListener) {
			scroll_yList.addEventListener("DOMMouseScroll",wheelHandler,false);
			document.addEventListener("mouseup",upHandler,false);
			scroll_y.zone.addEventListener("mousedown",downHandler,false);
		} else {
			scroll_yList.attachEvent("onmousewheel",wheelHandler);
			scroll_y.zone.attachEvent("onmouseup",upHandler);
			scroll_y.zone.attachEvent("onmousedown",downHandler);
			scroll_y.zone.attachEvent("onlosecapture",upHandler);
		}
	}



	function wheelHandler(e) { // ÈÙ ÀÌµ¿
		var step = 20;
		var wheelVal;

		if(e.wheelDelta) {
			wheelVal = e.wheelDelta / 120 * step; // Dom Cross
			if(window.opera) wheelVal = -wheelVal;
		} else if(e.detail) {
			wheelVal = -e.detail/3 * step;
		}

		wheelVal = scroll_y.zone.offsetTop - wheelVal;

		setContentPos(wheelVal);

	}


	function dragHandler(e) {  // µå·¡±× ÀÌµ¿
		var moveVal = e.clientY - mStart; // ¸¶¿ì½º°¡ ÀÌµ¿ÇÑ °Å¸®
		var curPos = barStartPos + moveVal; // ÇöÀç ½ºÅ©·Ñ¹Ù À§Ä¡

		setContentPos(curPos);
	}


	this.scrollcontroll = function(o) {

		var curPos = parseInt(eMatrix(document.getElementById('scrollItem01')).y,10);
		curPos = parseInt(eMatrix(document.getElementById(o)).y,10) - curPos;
		curPos = curPos / ratio;
		setContentPos(curPos);
	}


	function setContentPos(curPos) {
		//alert(curPos);
		//alert(spos);

		if (curPos < spos) curPos = spos;
		else if(curPos > epos) curPos = epos;

		moveScrollBar(curPos);


		var rltPos = (curPos * ratio + conStartPos) * (-1);

		moveContent(rltPos);
	}


	function moveScrollBar(n) {
		scroll_y.zone.style.top = n + "px";
	}


	function moveContent(n) {
		scroll_yList.ul.style.marginTop = n + "px";
	}


	function downHandler (e) {
		mStart = e.clientY;
		barStartPos = scroll_y.zone.offsetTop;
		conStartPos = scroll_yList.style.marginTop;

		if(document.addEventListener) {
			document.addEventListener("mousemove",dragHandler,false);
		} else {
			scroll_y.zone.setCapture();
			scroll_y.zone.attachEvent("onmousemove",dragHandler);
		}

		if(e.stopPropagation) e.stopPropagation();
		else e.cancelBubble = true;
		if(e.preventDefault) e.preventDefault();
		else e.returnValue = false;

	}


	function upHandler (e) {
		if(document.removeEventListener) {
			document.removeEventListener("mousemove", dragHandler, false);
		} else {
			scroll_y.zone.releaseCapture();
			scroll_y.zone.detachEvent("onmousemove",dragHandler);
		}
	}

}




var scroll_x_type02 = function(o) { // o : target object : rolling Script
	var o = document.getElementById(o);
	o.list = o.getElementsByTagName('div');
	var prev;
	var next;
	if(o.list[0]) prev = (o.list[0].firstChild.nodeName.toLowerCase() != 'ul') ? o.list[0] : false;
	if(o.list[2]) next = (o.list[2].firstChild.nodeName.toLowerCase() != 'ul') ? o.list[2] : false;
	var ul = o.getElementsByTagName('ul').item(0);
	var defaultWidth = ul.parentNode.clientWidth;
	ul.list = removeNullNode(ul.childNodes);
	ul.w = (findParentNode(ul,'div').clientWidth*ul.list.length);
	ul.style.width = ul.w + "px";
	ul.style.marginLeft = 0;
	var rollcount = 0;
	var intervalRolling;
	var intervalRolling01;
	if(document.addEventListener) {
		if(prev != false) prev.addEventListener("click",movePrevHandler,true);
		if(next != false) next.addEventListener("click",moveNextHandler,true);
		ul.addEventListener("mouseover",moveupHandler,true);
		if(prev != false) prev.addEventListener("mouseout",upHandler,true);
		if(next != false) next.addEventListener("mouseout",upHandler,true);
		ul.addEventListener("mouseout",upHandler,true);
	} else {
		if(prev != false) prev.attachEvent("onclick",movePrevHandler);
		if(next != false) next.attachEvent("onclick",moveNextHandler);
		ul.attachEvent("onmouseover",moveupHandler);
		if(prev != false) prev.attachEvent("onmouseout",upHandler);
		if(next != false) next.attachEvent("onmouseout",upHandler);
		ul.attachEvent("onmouseout",upHandler);
	}
	function rolling(recentW,targetLocation) { // recentW : recent Location Information
		if(rollcount == ul.list.length) { rollcount = 0; }
		t = speedCalculate(recentW,targetLocation,0.2);
		ul.style.marginLeft = t + "px";
		if(recentW == targetLocation) { clearInterval(intervalRolling01); }
	}
	function moving() {
		intervalRolling01 = setInterval(function() {
			rolling(parseInt(ul.style.marginLeft,10),-defaultWidth*rollcount);
		},20);
	}
	intervalRolling = setInterval(function() {
		moving();
		rollcount++;
	},5000);
	function movePrevHandler() {
		clearInterval(intervalRolling);
		recentLocation = parseInt(ul.style.marginLeft,10);
		//document.getElementById('a').innerHTML = document.getElementById('a').innerHTML + rollcount + "<br />";
		clearInterval(intervalRolling01);
		rollcount--;
		if(rollcount <= 0) {
			targetLocation = 0;
			rollcount=0;
		} else {
			targetLocation = -(defaultWidth*rollcount);
		}
		if(recentLocation != 0) {
			clearInterval(intervalRolling01);
			intervalRolling01 = setInterval(function() {
				rolling(parseInt(ul.style.marginLeft,10),targetLocation);
			},20);
		}
	}
	function moveNextHandler() {
		clearInterval(intervalRolling);
		clearInterval(intervalRolling01);
		if(++rollcount == ul.list.length) { rollcount = 0; }
		intervalRolling01 = setInterval(function() {
			rolling(parseInt(ul.style.marginLeft,10),-defaultWidth*rollcount);
		},20);
	}
	function moveupHandler() {
		clearInterval(intervalRolling);
		if(parseInt(ul.style.marginLeft,10)+defaultWidth == parseInt(ul.style.marginLeft,10)) { clearInterval(intervalRolling01); }
	}
	function upHandler() {
		clearInterval(intervalRolling);
		if(parseInt(ul.style.marginLeft,10)+defaultWidth == parseInt(ul.style.marginLeft,10)) { clearInterval(intervalRolling01); }
		if(document.removeEventListener) {
			if(prev != false) prev.removeEventListener("mouseclick",movePrevHandler,true);
			if(next != false) next.removeEventListener("mouseclick",moveNextHandler,true);
		} else {
			if(prev != false) prev.detachEvent("onmouseclick",movePrevHandler);
			if(next != false) next.detachEvent("onmouseclick",moveNextHandler);
		}
		intervalRolling = setInterval(function() {
			moving();
			rollcount++;
		},5000);
	}
}
var scroll_x_type03 = function(o) { // o : target object
	var o = document.getElementById(o);
	o.list = o.getElementsByTagName('div')[0].getElementsByTagName('a');
	var prev = o.list[0];
	var next = o.list[1];
	var ul = o.getElementsByTagName('ul').item(0);
	var defaultWidth = ul.clientWidth;
	ul.parentNode.style.width = defaultWidth + "px";
	ul.list = removeNullNode(ul.childNodes);
	ul.w = (defaultWidth*ul.list.length);
	ul.style.width = ul.w + "px";
	ul.style.marginLeft = 0;
	var rollcount = 0;
	var intervalRolling;
	var intervalRolling01;
	if(document.addEventListener) {
		prev.addEventListener("click",movePrevHandler,true);
		next.addEventListener("click",moveNextHandler,true);
	} else {
		prev.attachEvent("onclick",movePrevHandler);
		next.attachEvent("onclick",moveNextHandler);
	}
	function rolling(recentW,targetLocation) { // recentW : recent Location Information
		if(rollcount == ul.list.length) { rollcount = 0; }
		t = speedCalculate(recentW,targetLocation,0.2);
		ul.style.marginLeft = t + "px";
		if(recentW == targetLocation) { clearInterval(intervalRolling01); }
	}
	function moving() {
		intervalRolling01 = setInterval(function() {
			rolling(parseInt(ul.style.marginLeft,10),-defaultWidth*rollcount);
		},20);
	}
	intervalRolling = setInterval(function() {
		moving();
		rollcount++;
	},5000);
	function movePrevHandler() {
		clearInterval(intervalRolling);
		recentLocation = parseInt(ul.style.marginLeft,10);
		//document.getElementById('a').innerHTML = document.getElementById('a').innerHTML + rollcount + "<br />";
		clearInterval(intervalRolling01);
		rollcount--;
		if(rollcount <= 0) {
			targetLocation = 0;
			rollcount=0;
		} else {
			targetLocation = -(defaultWidth*rollcount);
		}
		if(recentLocation != 0) {
			clearInterval(intervalRolling01);
			intervalRolling01 = setInterval(function() {
				rolling(parseInt(ul.style.marginLeft,10),targetLocation);
			},20);
		}
	}
	function moveNextHandler() {
		clearInterval(intervalRolling);
		clearInterval(intervalRolling01);
		if(++rollcount == ul.list.length) { rollcount = 0; }
		intervalRolling01 = setInterval(function() {
			rolling(parseInt(ul.style.marginLeft,10),-defaultWidth*rollcount);
		},20);
	}
	function moveupHandler() {
		clearInterval(intervalRolling);
		if(parseInt(ul.style.marginLeft,10)+defaultWidth == parseInt(ul.style.marginLeft,10)) { clearInterval(intervalRolling01); }
	}
	function upHandler() {
		clearInterval(intervalRolling);
		if(parseInt(ul.style.marginLeft,10)+defaultWidth == parseInt(ul.style.marginLeft,10)) { clearInterval(intervalRolling01); }
		if(document.removeEventListener) {
			prev.removeEventListener("mouseclick",movePrevHandler,true);
			next.removeEventListener("mouseclick",moveNextHandler,true);
		} else {
			prev.detachEvent("onmouseclick",movePrevHandler);
			next.detachEvent("onmouseclick",moveNextHandler);
		}
		intervalRolling = setInterval(function() {
			moving();
			rollcount++;
		},5000);
	}
}
function pointUseController(argPointType, obj) { // Æ÷ÀÎÆ® ÀÌ¿ëÄ«µå Áö¿ø ½ºÅ©¸³Æ® > SERVICES > Æ÷ÀÎÆ® > Æ÷ÀÎÆ®Á¤º¸
	var targetlistobj = document.getElementById(obj);
	var accumulate = arrayPointCard[argPointType].content;
	var addObj_li;
	var addObj_div;
	var addObj_img;
	var checkThisobj;
	var name;
	var yearPay;
	var Brand;
	var tLink;
	var tCardimage;
	var tNameobj = document.getElementById('tName');
	var tYearPayobj = document.getElementById('tYearPay');
	var tBrandobj = document.getElementById('tBrand');
	var tCardobj = document.getElementById('tCard');
	var tmpBrand;
	accumulate.l = accumulate.length;
	if(accumulate.l == 1) targetlistobj.style.display="none"
	for(i=0;i<accumulate.l;i++) {
		addObj_li = document.createElement("li");
		addObj_div = document.createElement("div");
		addObj_img = document.createElement("img");
		addObj_li.className = "pd_r10 fl"+"/"+i;
		addObj_li.setAttribute('class','pd_r10 fl'+'/'+i);
		addObj_li.style.cursor = "hand";
		addObj_li.onclick = function() {
			checkThisobj = this.className.split('/')[1];
			name = accumulate[checkThisobj].name;
			yearPay = accumulate[checkThisobj].yearPay;
			Brand = accumulate[checkThisobj].Brand;
			tLink = accumulate[checkThisobj].link;
			tCardimage = accumulate[checkThisobj].src;
			Brand = Brand.split('-');
			switch(Brand[0]) {
				case 'VISA' : BrandFistCheck = '<img src="/images/cardscommon/visa_04.png" class="png24 visa" alt="VISA" />';break;
				case 'MASTER' : BrandFistCheck = '<img src="/images/cardscommon/master_04.png" class="png24 master" alt="MASTER" />';break;
				case 'LOCAL' : BrandFistCheck = '<img src="/images/cardscommon/local_04.png" class="png24 local" alt="LOCAL" />';break;
				default : BrandFistCheck = Brand[0]; break;
			}
			tmpBrand = "";
			for(k=0;k<Brand.length;k++) {
				switch(Brand[k]) {
					case 'VISA':
						Brand[k] = '<img src="/images/cards/card_s_visa.gif" class="mg_r05" alt="VISA" />';
						break;
					case 'MASTER':
						Brand[k] = '<img src="/images/cards/card_s_master.gif" class="mg_r05" alt="MASTER" />';
						break;
					case 'LOCAL':
						Brand[k] = '<img src="/images/cards/card_s_local.gif" class="mg_r05" alt="LOCAL" />';
						break;
					default :
						Brand[k] = Brand[k];
						break;
				}
				tmpBrand = tmpBrand+Brand[k];
			}
			tNameobj.innerHTML = "<a href=\"" + tLink + "\" class='link_07'>" + name + "</a>";
			tYearPayobj.innerHTML = yearPay;
			tBrandobj.innerHTML = (tmpBrand == null || tmpBrand == "" ? "" : "ºê·£µå : " + tmpBrand);
			tCardobj.style.backgroundImage = "url(/images/cardscommon/"+tCardimage+")";
			tCardobj.innerHTML = BrandFistCheck;
		}
		addObj_div.className = "bgCard02";
		addObj_div.style.backgroundImage = "url(/images/cardscommon/"+accumulate[i].src+")";
		addObj_div.setAttribute('class','bgCard02');
		sBrandFistCheck = ''
		switch(accumulate[i].Brand.split('-')[0]) {
			case 'VISA' : sBrandFistCheck = '<img src="/images/cardscommon/visa_02.png" class="png24 visa" alt="VISA" />';break;
			case 'MASTER' : sBrandFistCheck = '<img src="/images/cardscommon/master_02.png" class="png24 master" alt="MASTER" />';break;
			case 'LOCAL' : sBrandFistCheck = '<img src="/images/cardscommon/local_02.png" class="png24 local" alt="LOCAL" />';break;
			default : sBrandFistCheck = ""; break;
		}
		addObj_div.innerHTML = sBrandFistCheck;
		addObj_li.appendChild(addObj_div);
		targetlistobj.appendChild(addObj_li);
	}
	targetlistobj.firstChild.onclick();
}
function pointController(controlObj) { // Æ÷ÀÎÆ® »ç¿ëÃ³ Áö¿ø ½ºÅ©¸³Æ® > SERVICES > Æ÷ÀÎÆ® > Æ÷ÀÎÆ®Á¤º¸
	for(i=0;i<arrayUse.length;i++) {
		accumulateList = arrayUse[i];
		addObj_li = document.createElement("li");
		switch(accumulateList.cat) {
			case 'ÀÚµ¿Â÷'     : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_01.gif' alt='ÀÚµ¿Â÷'     />";break;
			case '¿©Çà/Ç×°ø'  : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_02.gif' alt='¿©Çà/Ç×°ø'  />";break;
			case '·¹Àú'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_03.gif' alt='·¹Àú'       />";break;
			case '³îÀÌ°ø¿ø'   : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_04.gif' alt='³îÀÌ°ø¿ø'   />";break;
			case '¿µÈ­'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_05.gif' alt='¿µÈ­'       />";break;
			case '¿Ü½Ä'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_06.gif' alt='¿Ü½Ä'       />";break;
			case 'Â÷/µðÀúÆ®'  : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_07.gif' alt='Â÷/µðÀúÆ®'  />";break;
			case '½ºÆ÷Ã÷'     : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_08.gif' alt='½ºÆ÷Ã÷'     />";break;
			case '¼îÇÎ'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_09.gif' alt='¼îÇÎ'       />";break;
			case 'Åë½Å'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_10.gif' alt='Åë½Å'       />";break;
			case '»ýÈ°/°Ç°­'  : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_11.gif' alt='»ýÈ°/°Ç°­'  />";break;
			case '±ÝÀ¶'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_12.gif' alt='±ÝÀ¶'       />";break;
			case '±âÅ¸'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_13.gif' alt='±âÅ¸'       />";break;
			case 'Áö¿ª'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_14.gif' alt='Áö¿ª'       />";break;
			case '±³À°'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_15.gif' alt='±³À°'       />";break;
			case 'º¸Çè'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_16.gif' alt='º¸Çè'       />";break;
			case '¸®¿öµå'     : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_17.gif' alt='¸®¿öµå'     />";break;
			case '°ø¿¬'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_18.gif' alt='°ø¿¬'       />";break;
			case 'ÁÖÀ¯'       : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_19.gif' alt='ÁÖÀ¯'       />";break;
			case 'Å¬·´¼­ºñ½º' : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_20.gif' alt='Å¬·´¼­ºñ½º' />";break;
			case 'ÇÁ¸®¹Ì¾ö'   : benefitCheckImg = "<img src='/images/cardscommon/ul_card_bemefit2_21.gif' alt='ÇÁ¸®¹Ì¾ö'   />";break;
		}
		addObj_li.style.cursor = "hand";
		addObj_li.className = i;
		addObj_li.innerHTML = benefitCheckImg;
		addObj_li.onclick = function() {
			recentObj = this.getElementsByTagName('img')[0];
			parentObj = removeNullNode(this.parentNode.childNodes);
			pointList(arrayUse[this.className].content);
			for(i=0;i<parentObj.length;i++) {
				nowobj = parentObj[i].getElementsByTagName('img')[0];
				if(nowobj == recentObj) {
					menuOut(nowobj);
					menuOn(nowobj);
					nowobj.onmouseover = null;
					nowobj.onmouseout = null;
				} else {
					menuOut(nowobj);
					nowobj.onmouseover = function() { menuOn(this) };
					nowobj.onmouseout = function() { menuOut(this) };
				}
			}
			eval(controlObj+'.initialize();');
		}
		targetlistCatobj.appendChild(addObj_li);
	}
	targetlistCatobj.firstChild.onclick();
	function pointList(accumulate) {
		targetlistobj.innerHTML = "";
		for(j=0;j<accumulate.length;j++) {
			accumulateContent = accumulate[j];
			addObj_li = document.createElement("li");
			addObj_li.setAttribute("class","fl pd_r20");

			addObj_li.className = "fl pd_r10";
			if(accumulateContent.link && accumulateContent.link.trim() != "") {
				addObj_a = document.createElement("a");
				addObj_a.href = accumulateContent.link;
				addObj_a.innerHTML = "<img src='/images/logo/"+accumulateContent.src+"' alt='' class='vt' />";
				addObj_li.appendChild(addObj_a);
			} else {
				addObj_li.innerHTML = "<img src='/images/logo/"+accumulateContent.src+"' alt='' class='vt' />";
			}
			targetlistobj.appendChild(addObj_li);
			addObj_li.style.width = addObj_li.clientWidth;
		}
	}
}
var selectArea;
var selectAreaMatrix;
function selectCompare(t,s) { // t : target, s : switch


		selectArea = document.getElementsByTagName('select');
		selectAreaMatrix = new Array();
		
		for(i=0;i<selectArea.length;i++) {
			selectAreaMatrix[i] = eMatrix(selectArea[i]);
		}
				
				
	var oa = new Object();
	var ob = new Object();
	var oc = new Object();
	var od = new Object();
	var ta = new Object();
	var tb = new Object();
	var tc = new Object();
	var td = new Object();
	tMatrix = eMatrix(t);
	oa.x = parseInt(tMatrix.x,10);
	oa.y = parseInt(tMatrix.y,10);
	ob.x = parseInt(tMatrix.x,10)+parseInt(tMatrix.w,10);
	ob.y = parseInt(tMatrix.y,10);
	oc.x = parseInt(tMatrix.x,10);
	oc.y = parseInt(tMatrix.y,10)+parseInt(tMatrix.h,10);
	od.x = parseInt(tMatrix.x,10)+parseInt(tMatrix.w,10);
	od.y = parseInt(tMatrix.y,10)+parseInt(tMatrix.h,10);
	if(s == 'off') {
		for(i=0;i<selectAreaMatrix.length;i++) {
			ta.x = parseInt(selectAreaMatrix[i].x,10);
			ta.y = parseInt(selectAreaMatrix[i].y,10);
			tb.x = parseInt(selectAreaMatrix[i].x,10)+parseInt(selectAreaMatrix[i].w,10);
			tb.y = parseInt(selectAreaMatrix[i].y,10);
			tc.x = parseInt(selectAreaMatrix[i].x,10);
			tc.y = parseInt(selectAreaMatrix[i].y,10)+parseInt(selectAreaMatrix[i].h,10);
			td.x = parseInt(selectAreaMatrix[i].x,10)+parseInt(selectAreaMatrix[i].w,10);
			td.y = parseInt(selectAreaMatrix[i].y,10)+parseInt(selectAreaMatrix[i].h,10);
			if(ob.y-10 <= ta.y && od.y >= ta.y) {
				if(oa.x <= ta.x && ob.x >= tb.x) {
					if(selectArea[i].style.visibility == '' || selectArea[i].style.visibility == 'visible') selectArea[i].style.visibility = 'hidden'; // ¿µ¿ª¾È¿¡ ÀÖÀ½
				} else  if(ob.x >= ta.x && ob.x <= tb.x) {
					if(selectArea[i].style.visibility == '' || selectArea[i].style.visibility == 'visible') selectArea[i].style.visibility = 'hidden'; // ¿µ¿ª¾È¿¡ ÀÖÀ½
				} else  if(oa.x >= ta.x && ob.x >= tb.x && oa.x <= tb.x) {
					if(selectArea[i].style.visibility == '' || selectArea[i].style.visibility == 'visible') selectArea[i].style.visibility = 'hidden'; // ÁÂÃø¿¡ °ÉÅÍÀÖ´Â °æ¿ì
				}
			}
		}
	} else {
		for(i=0;i<selectArea.length;i++) {
			selectArea[i].style.visibility = 'visible'
		}
	}
}
function floorTooltipController(tid,o) { //tid : target, o : this;
	var tobj = document.getElementById(tid);
	var tobjMatrix;
	var getMouse;
	var ta = new Object();
	var tb = new Object();
	var tc = new Object();
	var td = new Object();
	var scrollMatrix = parseInt(document.documentElement.scrollTop,10);
	o.onmouseout = function(event) {
		getMouse = getMouseMatrix(event);
		tobjMatrix = eMatrix(tobj);
		ta.x = parseInt(tobjMatrix.x,10);
		ta.y = parseInt(tobjMatrix.y,10);
		tb.x = parseInt(tobjMatrix.x,10)+parseInt(tobjMatrix.w,10);
		tb.y = parseInt(tobjMatrix.y,10);
		tc.x = parseInt(tobjMatrix.x,10);
		tc.y = parseInt(tobjMatrix.y,10)+parseInt(tobjMatrix.h,10);
		td.x = parseInt(tobjMatrix.x,10)+parseInt(tobjMatrix.w,10);
		td.y = parseInt(tobjMatrix.y,10)+parseInt(tobjMatrix.h,10);
		if(getMouse.x >= ta.x && getMouse.x <= tb.x) {
			if(getMouse.y+scrollMatrix >= ta.y && getMouse.y+scrollMatrix <= tc.y) { return false; }
		}
		tobj.style.display="none";
		selectCompare(tobj,'on');
	}
	tobj.style.display="block";
	selectCompare(tobj,'off');
	tobj.onmouseout = function(event) {
		getMouse = getMouseMatrix(event);
		tobjMatrix = eMatrix(this);
		ta.x = parseInt(tobjMatrix.x,10);
		ta.y = parseInt(tobjMatrix.y,10);
		tb.x = parseInt(tobjMatrix.x,10)+parseInt(tobjMatrix.w,10);
		tb.y = parseInt(tobjMatrix.y,10);
		tc.x = parseInt(tobjMatrix.x,10);
		tc.y = parseInt(tobjMatrix.y,10)+parseInt(tobjMatrix.h,10);
		td.x = parseInt(tobjMatrix.x,10)+parseInt(tobjMatrix.w,10);
		td.y = parseInt(tobjMatrix.y,10)+parseInt(tobjMatrix.h,10);
		if(getMouse.x >= ta.x && getMouse.x <= tb.x) {
			if(getMouse.y+scrollMatrix >= ta.y+2 && getMouse.y+scrollMatrix <= tc.y) { return false; alert('b'); }
		}
		this.style.display="none";
		selectCompare(tobj,'on');
	}
}
// Page tab È°¼ºÈ­¸¦ À§ÇÑ ÇÔ¼ö(SSS)
// °¢ ÆäÀÌÁö¿¡ arrayTab °³Ã¼¸¦ »ý¼ºÇÏ°í ÅÇ Á¤º¸¸¦ ¼³Á¤ÇØ³ö¾ß ÇÔ(/htm/hs/HS010000_01WP.vm Âü°í)
// Example : tabActive('tabActive_2')    - µÎ¹øÂ°ÅÇ È°¼ºÈ­
// Example : tabActive('tabActive_4_2')  - ³×¹øÂ°ÅÇ ¾È¿¡ ÀÖ´Â µÎ¹øÂ°ÅÇ È°¼ºÈ­
function tabActive(argVal)
{
	argVal = argVal.replace("tabActive_", "");
	argVal = argVal.split("_");
	try {
		var strIdx = "";
		for(var i = 0; i < argVal.length; i++)
		{
			if(arrayTab[strIdx + right_pad(argVal[i], 2, "_")] != null)
			{
				strIdx += right_pad(argVal[i], 2, "_");
				var parentObj = document.getElementById(arrayTab[strIdx].parentId);
				var tabObj = parentObj.getElementsByTagName('ul')[0].childNodes;
				tabObj[arrayTab[strIdx].tabIdx].firstChild.firstChild.click();
			}
		}
		var openobj = document.getElementById('openZone');
		var closeobj = document.getElementById('closeZone');
		openobj.style.display = "none";
		closeobj.style.display = "block";

		location.hash = arrayTab[strIdx].tabHash;

		window.onload = function() {
			try {
				var objTabMatrix = eMatrix(document.getElementById(arrayTab[strIdx].parentId));
				window.scrollTo(0, objTabMatrix.y);
			} catch(e) {}
		}
	} catch(e) {}
}



// °¡¸ÍÁ¡ 2Â÷ ÇÁ·ÎÁ§Æ® Ãß°¡
function addLoadEvent(func) {
	var oldload = window.onload;
	if(typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldload();
			func();
		}
	}
}

/**
 * @title : °¡·Î ¼¼·Î ½ºÅ©·Ñ Á¦¾î ½ºÅ©¸³Æ® v2.0
 * @wha's new :
 * - v2.0
 *   ¿òÁ÷ÀÓ½Ã À¯¿¬ÇÏ°Ô º¯°æ
 */
function scrollLogic(o,statusForm) {

	var obj = new Object();
	var ratio,startX,startMatrix,origX,origMatrix,moveNumber,limitMatrix,moveTimer;
	var statusForm = statusForm;
	obj.general = document.getElementById(o);
	obj.content = removeNullNode(obj.general.childNodes)[0];
	obj.scrollZone = removeNullNode(obj.general.childNodes)[1];
	obj.movingBar = obj.scrollZone.getElementsByTagName('img')[0];
	obj.movingBar.w = obj.movingBar.offsetWidth;
	obj.movingBar.h = obj.movingBar.offsetHeight;

	this.initialize = function() { // Initialize of value
		var baseinfo = new Object(); // ±âÁØÀÌ µÇ´Â Á¤º¸
		baseinfo.w = parseInt(obj.scrollZone.offsetWidth,10);
		baseinfo.h = parseInt(obj.scrollZone.offsetHeight,10);
		baseinfo.currentw = parseInt(obj.content.offsetWidth,10);
		baseinfo.currenth = parseInt(obj.content.offsetHeight,10);

		/* ¼Ó¼º Á¦ÇÑ */
		obj.general.style.overflow = "hidden";
		if(statusForm == 'y') {
			obj.general.style.height = baseinfo.h + "px";
			ratio = (baseinfo.currenth-baseinfo.h <=0) ? false : (baseinfo.currenth-baseinfo.h)/(baseinfo.h-obj.movingBar.h);

			limitMatrix = baseinfo.h - obj.movingBar.h;

		} else {
			obj.general.style.width = baseinfo.w + "px";
			ratio = (baseinfo.currentw-baseinfo.w <=0) ? false : (baseinfo.currentw-baseinfo.w)/(baseinfo.w-obj.movingBar.w);

			limitMatrix = baseinfo.w - obj.movingBar.w;
		}

		actionHandler();
	}

	function moveContent(v,s) { // Moving Content

		var targetValue = parseInt(v,10);
		var margin;

		if(s == 'y') {
			if(statusForm == 'y') {
				moveTimer = setInterval(function() {

					if(window.getComputedStyle) margin = (window.getComputedStyle(obj.content,null).getPropertyValue("margin-top") == 'auto' ) ? 0 : parseInt(window.getComputedStyle(obj.content,null).getPropertyValue("margin-top"),10);
					else margin = (obj.content.currentStyle.marginTop == 'auto' ) ? 0 : parseInt(obj.content.currentStyle.marginTop,10);

					if(margin == -targetValue) clearInterval(moveTimer);
					targetmoveCount = speedCalculate(-margin,targetValue,0.3);

					obj.content.style.marginTop = -targetmoveCount + "px";

				},10);
			} else {

				moveTimer = setInterval(function() {

					if(window.getComputedStyle) margin = (window.getComputedStyle(obj.content,null).getPropertyValue("margin-left") == 'auto' ) ? 0 : parseInt(window.getComputedStyle(obj.content,null).getPropertyValue("margin-left"),10);
					else margin = (obj.content.currentStyle.marginLeft == 'auto' ) ? 0 : parseInt(obj.content.currentStyle.marginLeft,10);

					if(margin == -targetValue) clearInterval(moveTimer);
					targetmoveCount = speedCalculate(-margin,targetValue,0.3);

					obj.content.style.marginLeft = -targetmoveCount + "px";

				},10);
			}
		} else {
			if(statusForm == 'y') obj.content.style.marginTop = -v + "px";
			else obj.content.style.marginLeft = -v + "px";
		}

	}

	function moveScroll(v,s) { // Moving Scroll

		if(statusForm == 'y') obj.movingBar.style.top = v + "px";
		else obj.movingBar.style.left = v + "px";

		v = v*ratio;
		clearInterval(moveTimer);
		moveContent(v,s);
	}

	function calculateMoving(s,m) { // s:Ã³À½À§Ä¡, m:ÀÌµ¿°Å¸®

		if(s+m > 0) {
			 if(s+m > limitMatrix) m = limitMatrix;
			 else m = s + m;
		} else {
			m = 0;
		}

		return m;
	}

	function mousemove(e) {

		clearInterval(moveTimer);

		if(!e) e = window.event;

		if(statusForm == 'y') moveCount = e.clientY;
		else moveCount = e.clientX;

		moveNumber = (moveCount - startMatrix); // ÀÌµ¿°Å¸®
		moveNumber = calculateMoving(origMatrix,moveNumber);
		moveScroll(moveNumber);

	}

	function getwhellData(e) {
		var wheelData;

		if(e.wheelDelta) {
			wheelData = e.wheelDelta/120; // Dom Cross
			if(window.opera) wheelVal = -wheelVal;
		} else if(e.detail) {
			wheelData = -e.detail/3;
		}
		return wheelData*(-1);
	}

	function wheelHandler(e) {

		clearInterval(moveTimer);

		if(!e) e = window.event;

		if(e.stopPropagation) e.stopPropagation();
		else e.cancelBubble = true;
		if(e.preventDefault) e.preventDefault();
		else e.returnValue = false;

		var step = 20;
		var wheelVal;

		wheelVal = getwhellData(e);
		wheelVal = wheelVal * step;

		if(statusForm == 'y') wheelVal = calculateMoving(obj.movingBar.offsetTop,wheelVal);
		else wheelVal = calculateMoving(obj.movingBar.offsetLeft,wheelVal);

		moveScroll(wheelVal,'y');
	}

	function mousedown(e) {

		if(!e) e = window.event;
		if(document.addEventListener) {
			document.addEventListener("mousemove",mousemove,false);
			document.addEventListener("mouseup",upHandler,false);
		} else {
			obj.movingBar.setCapture();
			obj.movingBar.attachEvent("onmousemove",mousemove);
			obj.movingBar.attachEvent("onmouseup",upHandler);
		}

		if(e.stopPropagation) e.stopPropagation();
		else e.cancelBubble = true;
		if(e.preventDefault) e.preventDefault();
		else e.returnValue = false;

		if(statusForm == 'y') {
			startMatrix = e.clientY;
			origMatrix = obj.movingBar.offsetTop;
		} else {
			startMatrix = e.clientX;
			origMatrix = obj.movingBar.offsetLeft;
		}
	}

	function actionHandler() { // Event registration?

		if(ratio == false) return false;
		if(document.addEventListener) {
			obj.content.addEventListener("DOMMouseScroll",wheelHandler,false);
			obj.movingBar.addEventListener("mousedown",mousedown,false);
		} else {
			obj.content.attachEvent("onmousewheel",wheelHandler);
			obj.movingBar.attachEvent("onmousedown",mousedown);
			obj.movingBar.attachEvent("onlosecapture",upHandler);
		}

	}

	function upHandler() { // Event delete.

		if(document.addEventListener) {
			document.removeEventListener("mousemove",mousemove,false);
			document.removeEventListener("mouseup",upHandler,false);
		} else {
			obj.movingBar.releaseCapture();
			obj.movingBar.detachEvent("onmousemove",mousemove);
			obj.movingBar.detachEvent("onmouseup",upHandler);
		}

	}

	this.initialize();

}


//2Â÷ ¿ÀÇÂ ½ºÅ©¸³Æ® Ãß°¡

/*
 * @title : ÅØ½ºÆ®·Î ±¸¼ºµÈ ÅÇ¸Þ´º
 * @version : 1.0
 * @what's new :
 */
function textTabController(o) {

	var ulobj,ulchild;
	var to = document.getElementById(o);

	function clearStatus() {
		var targetAnchor;
		for(i=0;i<ulchild.length;i++) {
			eventTarget = ulchild[i].getElementsByTagName('a')[0];
			tmpId = eventTarget.href.split("#")[1];

			document.getElementById(tmpId).style.display = "none";
			eventTarget.parentNode.className = eventTarget.parentNode.className.replace("select"," ");
		}
	}

	this.initialize = function() {
		ulobj = to;
		ulchild = removeNullNode(ulobj.childNodes);

		clearStatus();
		this.givefunc();
	}

	this.givefunc = function() {
		for(i=0;i<ulchild.length;i++) {
				eventTarget = ulchild[i].getElementsByTagName('a')[0];
				eventTarget.onfocus =
				eventTarget.onclick = function() {
				clearStatus();
				tmpId = this.href.split("#")[1];
				document.getElementById(tmpId).style.display = "block";
				this.parentNode.className = this.parentNode.className.replace(""," select");
				return false;
			}
		}
	}

	this.runActive = function() {
		if(this.activeCode) {
			ulchild[this.activeCode-1].getElementsByTagName('a')[0].onclick();
		} else {
			ulchild[0].getElementsByTagName('a')[0].onclick();
		}
	}

}




/*
 * @title : ÇÃ·¹½Ã ÅØ½ºÆ® »çÀÌÁî Á¶Àý
 * @version : 1.0
 * @what's new :
 */
 function flashWidth(width) 
 {
	var objFlash = document.getElementById("flash");
	objFlash.style.width = width;
}



/*
 *
 * @Description : ½ºÅ©¸³Æ® ¹è³Ê ÀÛ¾÷
 * @Writer : ÀÌÈñ¿ø
 * @Date : 09.07.28
 * @Source :
/


/*
 * @title : ÀÌ¹ÌÁö on´ëÃ¼
 * @version : 1.0
 * @writer :
 * @modify(date,writer) :
 * @what's new :
 */
function menuOn(imgEl)
{
  if(imgEl.src.indexOf("_on") < 0) imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

/*
 * @title : ÀÌ¹ÌÁö off´ëÃ¼
 * @version : 1.0
 * @writer :
 * @modify(date,writer) :
 * @what's new :
 */
function menuOut(imgEl)
{
  imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

/**
 * @title : Node °è»ê½Ã ie¸¦ Á¦¿ÜÇÑ ºê¶ó¿ìÀú¿¡¼­ °ø¹é±îÁö ³ëµå·Î Æ÷ÇÔ½ÃÅ°´Â °ÍÀ» Á¦°Å
 * @version : 1.0
 * @writer : ÀÌÈñ¿ø
 * @modify(date,writer) :
 * @what's new :
 */
function removeNullNode(obj) {
	for(k=0;k<obj.length;k++) {
		if(obj[k].nodeType != 1) obj[k].parentNode.removeChild(obj[k]);
	}
	return obj;
}

/**
 * @title : µî°¡¼Ó °è»ê ¾Ë°í¸®Áò
 * @version : 1.0
 * @writer : ÀÌÈñ¿ø
 * @modify(date,writer) :
 * @what's new :
 */
var speedCalculate = function(result,targetResult,speedPercent) {
	if(result>targetResult) {
		check = (((targetResult - result) * speedPercent) < -1) ? true : false;
	} else {
		check = (((targetResult - result) * speedPercent) > 1) ? true : false;
	}
	if(result==targetResult) {
		return targetResult;
	} else {
		if(check) {
			result += (targetResult - result) * speedPercent;
		} else {
			result = ((targetResult - result)>0) ? result+1 : result-1;
		}
		return parseInt(result);
	}
}

/**
 * @title : ·Ñ¸µ¹è³Ê ½ºÅ©¸³Æ®
 * @version : 3.0
 * @writer : ÀÌÈñ¿ø
 * @modify(date,writer) : 09.07.28, ÀÌÈñ¿ø
 */
function rollingController(o,c) { // o : ·Ñ¸µ¸ðÃ¼, c : ¸ñ·Ï

	var obj = new Object();
	var owner = this;
	var controllLeft,controllRight,controllPause,motionStatus,motionSpeed;
	var rollingTimer, rollingTimerWrap, result, targetMatrix, moveCount, doTimer, menuStatus, perNum, displayCount, time, direction;
	var runStatus = false;

	this.moveLeft = function() {

		this.doStart();

		if(menuStatus >1) {
			menuStatus = menuStatus-2;
			runStatus = true;
			doing();
		}
	}

	this.moveRight = function() {
		this.doStart();

		runStatus = true;
		doing();
	}

	this.doPause = function() {

		if(controllPause) {

			controllPause.src = controllPause.src.replace("pause","start");
			controllPause.setAttribute("title","½ÃÀÛ");
			controllPause.setAttribute("alt","½ÃÀÛ");

			controllPause.onclick = owner.doStart;
		}

		killAction();
	}

	this.doStart = function(e) {

		if(controllPause) {

			controllPause.src = controllPause.src.replace("start","pause");
			controllPause.setAttribute("title","¸ØÃã");
			controllPause.setAttribute("alt","¸ØÃã");

			controllPause.onclick = owner.doPause;

		}

		killAction();

		runStatus = true;
		doAction();
	}

	function doAction() {
		doTimer = setInterval(function() { doing() },time*1000);
	}

	function killAction() {
		runStatus = false;
		clearInterval(doTimer);
	}

	function actionHandler() {

		if(document.addEventListener) {
			obj.general.addEventListener("mouseover",owner.doPause,false);
			obj.general.addEventListener("mouseout",owner.doStart,false);

			if(controllLeft) {
				controllLeft.addEventListener("mouseover",owner.doPause,false);
				controllLeft.addEventListener("mouseout",owner.doStart,false);
			}

			if(controllRight) {
				controllRight.addEventListener("mouseover",owner.doPause,false);
				controllRight.addEventListener("mouseout",owner.doStart,false);
			}

			if(controllPause) {
				controllPause.addEventListener("mouseover",owner.doPause,false);
				controllPause.addEventListener("mouseout",owner.doStart,false);
			}

		} else {
			obj.general.attachEvent("onmouseover",owner.doPause);
			obj.general.attachEvent("onmouseout",owner.doStart);

			if(controllLeft) {
				controllLeft.attachEvent("onmouseover",owner.doPause);
				controllLeft.attachEvent("onmouseout",owner.doStart);
			}

			if(controllRight) {
				controllRight.attachEvent("onmouseover",owner.doPause);
				controllRight.attachEvent("onmouseout",owner.doStart);
			}

			if(controllPause) {
				controllPause.attachEvent("onmouseover",owner.doPause);
				controllPause.attachEvent("onmouseout",owner.doStart);
			}
		}

		owner.doStart();
	}

	function numberMenucontroll(n) {

		var numberobj = removeNullNode(number.childNodes);
		var tagetImage;

		var tn = (numberobj.length-1) - n;

		for(i=0,j=numberobj.length;i<j;i++) {

			tagetImage = numberobj[i].getElementsByTagName('img')[0];
			if(numberobj[tn].getElementsByTagName('img').item(0) != tagetImage) menuOut(tagetImage);
			else menuOn(tagetImage);

		}

	}

	function numactionHandler() {

		var tagetImage,targetNumber;
		var numberobj = removeNullNode(number.childNodes);

		function listControll() {
			targetNumber = this.alt;
			menuStatus = targetNumber-1;
			runStatus = true;
			doing();
		}

		for(i=0,j=numberobj.length;i<j;i++) {

			tagetImage = numberobj[i].getElementsByTagName('img')[0];
			tagetImage.onmouseover = listControll;

		}
	}

	function doing() {

		var tagetImage,numberobj;

		clearTimeout(rollingTimerWrap);

		if(runStatus) {
			rollingTimerWrap = setTimeout(function() {

				var targetMatrix;
				if(menuStatus==obj.content.list.length) { targetMatrix = 0; menuStatus = 0; }
				else targetMatrix = (perNum*menuStatus)*(-1);

				if(number) {

					numberMenucontroll(menuStatus)

				}

				if(motionStatus) {

					function doscroll() {

						clearInterval(rollingTimer);
						rollingTimer = setInterval(function() {
							if(direction == 'x') result = parseInt(obj.content.style.marginLeft,10);
							else result = parseInt(obj.content.style.marginTop,10);
							moveCount = speedCalculate(result,targetMatrix,motionSpeed/10);
							if(result == targetMatrix) {
								clearInterval(rollingTimer);
								menuStatus++;
							} else {
								if(direction == 'x') obj.content.style.marginLeft = moveCount + "px";
								else obj.content.style.marginTop = moveCount + "px";
							}

						},20);

					}

					doscroll();
				} else {
					menuStatus++;
					obj.content.style.marginLeft = targetMatrix + "px";
				}

			});
		}
	}

	function activeOff() {
		var imgObj;
		if(controllLeft) {
			if(controllLeft.getElementsByTagName('img')[0]) imgObj = controllLeft.getElementsByTagName('img')[0];
			else imgObj = controllLeft;

			imgObj.src = imgObj.src.replace('.gif','_off.gif');
			imgObj.style.cursor = "text";
		}

		if(controllRight) {
			if(controllRight.getElementsByTagName('img')[0]) imgObj = controllRight.getElementsByTagName('img')[0];
			else imgObj = controllRight;

			imgObj.src = imgObj.src.replace('.gif','_off.gif');
			imgObj.style.cursor = "text";
		}

		if(controllPause) {
			if(controllPause.getElementsByTagName('img')[0]) imgObj = controllPause.getElementsByTagName('img')[0];
			else imgObj = controllPause;

			imgObj.src = imgObj.src.replace('.gif','_off.gif');
			imgObj.style.cursor = "text";
		}
	}

	this.initialize = function() {

		if(this.motion) motionStatus = this.motion;
		if(this.direction) direction = this.direction;
		else direction = 'x';
		if(this.number) number = document.getElementById(this.number);
		else number = false;
		if(this.controllLeft) controllLeft = document.getElementById(this.controllLeft);
		if(this.controllRight) controllRight = document.getElementById(this.controllRight);
		if(this.controllPause) controllPause = document.getElementById(this.controllPause);
		if(this.displayCount) displayCount = this.displayCount-1;
		else displayCount = 1;
		if(this.speed) motionSpeed = this.speed;
		else motionSpeed = 2;
		if(this.time) time = this.time;
		else time = 3;

		obj.general = document.getElementById(o);
		obj.content = document.getElementById(c);
		obj.content.list = removeNullNode(obj.content.childNodes);

		if(direction == 'x') {
			perNum = parseInt(obj.content.list[0].offsetWidth,10);
			obj.content.style.width = perNum*(obj.content.list.length) + "px";
		} else {
			perNum = parseInt(obj.content.list[0].offsetHeight,10);
			obj.content.style.height = perNum*(obj.content.list.length) + "px";
		}

		obj.content.style.margin = "0";

		menuStatus = 1;

		if(obj.content.list.length <= displayCount) {
			activeOff();
		}
		else actionHandler();

		if(number) { numactionHandler(); }
	}
}



/*
09.07.29
*/

/* ÀÌ¹ÌÁö ·Ñ¿À¹ö JPG  ex) <img src="url" onmouseover="menuOn(this);" onmouseout="menuOut(this);"  /> */

function menuOnjpg(imgEl)
{
  imgEl.src = imgEl.src.replace(".jpg", "_on.jpg");
}
function menuOutjpg(imgEl)
{
  imgEl.src = imgEl.src.replace("_on.jpg", ".jpg");
}
function menuClickjpg(imgE1,element) // ¸®½ºÆ®Ç×¸ñÀÌ ÀÌ¹ÌÁöÀÏ°æ¿ì Å¬¸¯±â´ÉºÎ¿©
{
	list = removeNullNode(element.childNodes);
	for(i=0;i<list.length;i++) {
		imgobj = list[i].getElementsByTagName('img')[0];
		if(imgobj == imgE1) {
			menuOutjpg(imgobj);
			menuOnjpg(imgobj);
			imgobj.onmouseover = null;
			imgobj.onmouseout = null;
		} else {
			menuOutjpg(imgobj);
			imgobj.onmouseover = function() { menuOnjpg(this); }
			imgobj.onmouseout = function() { menuOutjpg(this); }
		}
	}
}