


function gnbInit() {
	var menuName = "";
	var pageUrl = location.href;
	
	var pageUrlSplit = pageUrl.split("/");
	var now2Depth = pageUrlSplit[3];
	var now3Depth = pageUrlSplit[4];
	var now4Depth = pageUrlSplit[5];

	if(now3Depth != "bbs") {
		switch(now3Depth) {
			case "brand" : menuName = "menu1.swf";
				break;
			case "product" : menuName = "menu2.swf";
				break;
			case "info" : menuName = "menu3.swf";
				break;
			case "customer" : menuName = "menu4.swf";
				break;
			case "store" : menuName = "menu5.swf";
				break;
			case "mypage" : menuName = "menu6.swf";
				break;
			case "membership" : menuName = "menu7.swf";
				break;
			default : menuName = "menu7.swf";
				break;			
		}
	} else {
		var param = now4Depth.split("bo_table=");
		if(param[1]){
			var paramValue = param[1].substring(0, 4);
			switch(paramValue) {
				case "tb01" : menuName = "menu3.swf";
					break;
				case "tb02" : menuName = "menu3.swf";
					break;
				case "tb03" : menuName = "menu3.swf";
					break;
				case "tb04" : menuName = "menu3.swf";
					break;
				case "tb05" : menuName = "menu2.swf";
					break;
				case "tb11" : menuName = "menu3.swf"; //ÀÚ·á½Ç
					break;
				case "tb12" : menuName = "menu4.swf"; //°øÁö»çÇ×
					break;
				case "tb13" : menuName = "menu4.swf"; //faq
					break;
				case "tb14" : menuName = "menu4.swf"; //qna
					break;
				case "tb15" : menuName = "menu4.swf"; //qna
					break;
				case "tb21" : menuName = "menu5.swf"; //±¸¸ÅÃ³°Ë»ö
					break;
				default : menuName = "menu7.swf"; 
					break;
			}
		} else {
			menuName = "menu7.swf";
		}
	}
	return menuName;
}


function leftMenuHeight(menuName) {
	var setHeight = 0;
	switch(menuName) {
		case "menu1.swf" : setHeight = "120";
			break;
		case "menu2.swf" : setHeight = "180";
			break;
		case "menu3.swf" : setHeight = "225";
			break;
		case "menu4.swf" : setHeight = "195";
			break;
		case "menu5.swf" : setHeight = "95";
			break;
		case "menu6.swf" : setHeight = "145";
			break;
		case "menu7.swf" : setHeight = "195";
			break;
		default: break;		
	}
	return setHeight;
}

function mapOver(num) {
	$("mapImg").src = $("mapImg").src.replace(".gif",num+".gif");
}
function mapOut(num) {
	$("mapImg").src = $("mapImg").src.replace(num+".gif", ".gif");
}

function familySiteView() {
	$("footArea").down(".familySite").down("div").show();
}
function familySiteHide() {
	$("footArea").down(".familySite").down("div").hide();
}

function mainLink01(){
 location.href = "/theracne/";
 }
function brandLink01(){
 location.href = "/theracne/brand/introduce.php";
 }
function brandLink02(){
 location.href = "/theracne/brand/info.php";
 }
function productLink01(){
 location.href = "/theracne/product/productMain.php";
 }
function productLink02(){
 location.href = "/theracne/bbs/board.php?bo_table=tb05&sca=¹öºíÅ¬·»Àú";
 }
function productLink03(){
 location.href = "/theracne/bbs/board.php?bo_table=tb05&sca=Åä´Ð¿¡¼¾½º";
 }
function productLink04(){
 location.href = "/theracne/bbs/board.php?bo_table=tb05&sca=ºí·¡¹Ì½¬Æ®¸®Æ®¸ÕÆ®";
 }
function productLink05(){
 location.href = "/theracne/product/productUse.php";
 }
 function productLink06(){ //2011³â 10¿ù 28ÀÏ ±Ý¿äÀÏ
 location.href = "/theracne/bbs/board.php?bo_table=tb05&sca=¼öµù¸ðÀÌ½ºÃ³¶óÀÌÀú";
 }
function infoLink01(){
 location.href = "/theracne/bbs/board.php?bo_table=tb01";
 }
function infoLink02(){
 location.href = "/theracne/bbs/board.php?bo_table=tb02"; //¼öÁ¤ ÇØ¾ßÇÔ
 }
function infoLink03(){
 location.href = "/theracne/bbs/board.php?bo_table=tb03";
 }
function infoLink04(){
 location.href = "/theracne/bbs/board.php?bo_table=tb03&gbn=done#";
 }
function infoLink05(){
 location.href = "/theracne/bbs/board.php?bo_table=tb04";
 }
function infoLink06(){
 location.href = "/theracne/bbs/board.php?bo_table=tb05";
 }
function infoLink07(){
 location.href = "/theracne/bbs/board.php?bo_table=tb11"; //ÀÚ·á½Ç
 }
function customerLink01(){
 location.href = "/theracne/bbs/board.php?bo_table=tb12";//notice
 }
function customerLink02(){
 location.href = "/theracne/bbs/board.php?bo_table=tb13";//faq
 }
function customerLink03(){
 location.href = "/theracne/bbs/board.php?bo_table=tb14";//qna
 }
function customerLink04(){
 location.href = "/theracne/bbs/board.php?bo_table=tb15";//»ùÇÃ
 }
function customerLink05(){
// location.href = "/theracne/";
alert("ÁØºñÁßÀÔ´Ï´Ù.");
 }
function storeLink01(){
 location.href = "/theracne/bbs/board.php?bo_table=tb21";
 }
function mypageLink01(){
 location.href = "/theracne/";
 }
function mypageLink02(){
 location.href = "/theracne/";
 }
function mypageLink03(){
// location.href = "/theracne/";
	onclick=member_leave();
 }
function memberLink01(){
// location.href = "/theracne/";
	onclick=view_cover('LayLoginForm','','');
 }
function memberLink02(){
 location.href = "/theracne/bbs/register.php";
 }
function memberLink03(){
 location.href = "/theracne/member/personal.php";
 }
function memberLink04(){
 location.href = "/theracne/member/agreement.php";
 }
function memberLink05(){
 location.href = "/theracne/bbs/password_forget.php";
 }
function quickLink01(){
// location.href = "/theracne/ion"; /coding/popup/popIon.html
	window.open('/coding/popup/popIon.html' ,'ion',', width=477 height=700,topmargin=0, leftmargin=0, location=0,menubar=0,status=0,scrollbars=yes,resizable=no,titlebar=0,toolbar=0');
 }
function evantLink01(){
 location.href = "/theracne/bbs/board.php?bo_table=tb03";
 }
function evantLink02(){
 location.href = "/theracne/bbs/board.php?bo_table=tb03";
 }
function evantLink03(){
 location.href = "/theracne/bbs/board.php?bo_table=tb03";
 }
/* flash Embed*/


function setEmbed(){ 
	var objId = new String; 
	var parameter = new String; 
	var clsid = new String; 
	var codebase = new String; 
	var pluginspage = new String; 
	var embedType = new String; 
	var src = new String; 
	var width = new String; 
	var height = new String; 

	this.init = function(oSrc, oWidth, oHeight, oId) {
		thisFileName = getFileName(oSrc).split(".")[0];
		thisFileType = getFileName(oSrc).split(".")[1];
		thisFileType = thisFileType.replace(" ", "");
		
		if (!oId){
			oId = thisFileName;
		}

		switch(thisFileType){
			case "swf" : {
				embedType = "application/x-shockwave-flash";
				mediaType = "flash";
				} break;
			case "wmv" : {
				embedType = "video/x-ms-wmv";
				mediaType = "movie";
				} break;
			case "wma" : {
				embedType = "audio/x-ms-wma";
				mediaType = "movie";
				} break;
			case "mp3" : {
				embedType = "audio/mpeg";
				mediaType = "movie";
				} break;
			case "asf" : {
				embedType = "video/x-ms-asf ";
				mediaType = "movie";
				} break;
			case "avi" : {
				embedType = "video/x-msvideo";
				mediaType = "movie";
				} break;
			case "mpeg" :
			case "mpg" : {
				embedType = "video/mpeg";
				mediaType = "movie";
				} break;
		}

		if (mediaType == "flash"){ 
			clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
			codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"; 
			pluginspage = "http://www.macromedia.com/go/getflashplayer"; 
			parameter += "<param name='quality' value='high'>\n"; 
		} 
		else if (mediaType == "movie"){ 
			clsid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6";
			codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715";
			pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp";
		} 

		if (thisFileType == "mov"){ 
			clsid="CLSID:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";
			codebase="http://www.apple.com/qtactivex/qtplugin.cab";
			pluginspage="http://www.microsoft.com/windows/mediaplayer/download/default.asp";
			embedType="video/quicktime";
		} 

		src = oSrc;
		width = oWidth;
		height = oHeight;
		objId = oId;	
	} 

	this.param = function(parm , value) {      
		parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
	}  


	this.show = function(chk) { 
		if (clsid){ 
			obj = '<object classid="clsid:'+ clsid +'" codebase="'+ codebase +'" width="'+ width +'" height="'+ height +'" id="' + objId + '">\n';
			obj += '<param name="src" value="'+ src + '">\n';
			obj += '<param name="url" value="'+ src + '">\n';
			obj += parameter;
			obj += '<!--[if !IE]>-->';
			obj += '<object data="' + src + '" type="' + embedType + '" width="'+ width +'" height="'+ height +'" name="' + objId + '" >';
			obj += '<param name="src" value="'+ src + '">\n';
			obj += parameter;
			obj += 'You need to get the latest <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> to see this object.<br />';
			obj += 'ÃÖ½ÅÀÇ <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=1">ÇÃ·¡½Ã ÇÃ·¹ÀÌ¾î</a>°¡ ÇÊ¿äÇÕ´Ï´Ù.';
			obj += '</object>\n';
			obj += '<!--<![endif]-->';
			obj += '</object>\n'; 
			//eval("window." + objId + " = document.getElementById('" + objId + "');");
		}
		
		if(!chk){
			document.write(obj);
		}else{
			chk.innerHTML = obj;
		}
	}
}

function getFileName(uri){
	if(uri.indexOf("#")>0)uri = uri.substr(0,uri.indexOf("#"));
	if(uri.indexOf("&")>0)uri = uri.substr(0,uri.indexOf("&"));
	if(uri.indexOf("?")>0)uri = uri.substr(0,uri.indexOf("?"));
	var thisUriArray = uri.split(/\//);
	var thisFileName = thisUriArray[thisUriArray.length-1];
	return thisFileName;
}

function getSWF(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
		if (window.document[movieName])	return window.document[movieName];
    }
	else {
		if (!window.document[movieName]) return document.getElementById(movieName);
		if(document[movieName].length != undefined)	return document[movieName][1];
    }
}


function IE_HtmlRewrite(objParent) {
	if (window.ActiveXObject && objParent) {
		objParent.innerHTML = objParent.innerHTML;
	}
}


/*
*
* Stimpack ver 2.0
* reflexion for standard Javascript framework
* Reflexion co.
* make by Dstyle , jejette
*/

var stimpack = new Object();

/*------------------------------Stimpack :: RemoteCtr :: START :: prototype Base --------------------------------------------*/
stimpack.remoteCtr = remoteCtrFn;
function remoteCtrFn(){
	var remoteObj;
	var objWid;
	var objHei;
	var objTop = 0;
	var objBtm = 0;
	var topLimit = 0;
	var btmLimit = 0;
	var moveTop;
	var speedNum = 5;
	var sInterval;
	var Body = document.body ? document.documentElement : document.body ;
	var sideChk = false;
	
	//¿¤¸®¸ÕÆ® (¶Ç´Â ¾ÆÀÌµð) , °¡·Î°ª , ¼¼·Î°ª
	this.init = function(oObj,oWid,oHei){
		remoteObj = $(oObj);
		objWid = oWid;
		objHei = oHei;
	};
	
	//½ÇÁ¦·Î Àû¿ë ±¸¹®
	this.show = function(){
		if(!sideChk){
			remoteObj.setStyle({
				"left":"0px"
			});
			sideChk = true;
		};
		remoteObj.setStyle({
			"position":"absolute",
			"display":"block",
			"top":topLimit+"px",
			"width":objWid+"px",
			"height":objHei+"px"
		});
		sInterval = setInterval(this.sliding,"30");
	};
	
	//½½¶óÀÌµù ÇÔ¼ö
	this.sliding = function(){
		moveTop = topLimit + remoteObj.cumulativeScrollOffset().top;
		btmLimit = Body.scrollHeight - remoteObj.getHeight() - objBtm;
		if(moveTop>btmLimit){
			moveTop = btmLimit;
		}
		objTop += ( Number(moveTop) - Number(objTop) )/speedNum; // ÀÌ°Ô ½½¶óÀÌµù ÇÔ¼ö
		
		remoteObj.setStyle({
			"top":objTop+"px"
		});
		
	};
	
	//¼ÓµµÁ¶Àý
	this.speed = function(num){
		if(num){
			speedNum = Number(num);
		}else{
			speedNum = 5;
		}
	};
	
	//»ó´Ü¿¡¼­ ¾ó¸¶³ª ¶³¾î¶ß¸±°ÍÀÎ°¡.
	this.top = function(num){
		topLimit = Number(num);
	};
	//ÇÏ´Ü¿¡¼­ ¾ó¸¶³ª ¶³¾î¶ß¸±°ÍÀÎ°¡.
	this.btm = this.bottom = function(num){
		objBtm = Number(num);
	};
	
	this.left = function(num){
		if(!sideChk){
			remoteObj.setStyle({
				"left":num+"px"
			});
			sideChk = true;
		};
	};
	this.right = function(num){
		if(!sideChk){
			remoteObj.setStyle({
				"right":num+"px"
			});
			sideChk = true;
		};
	};
	this.pos = this.position = function(top,right,bottom,left){
		right = Number(right);
		right = Number(left);
		if(!top.empty()){
			this.top(top);
		}
		if(!right.empty() || right!=0){
			this.right(right);
		}
		if(!bottom.empty()){
			this.bottom(bottom);
		}
		if(!left.empty() || left!=0){
			this.left(left);
		}
	};
	this.fixed = function(chkId){
		$(chkId).checked
	};
	
};
// È¸¿ø Å»Åð 
function member_leave() 
{ 
    if (confirm("Á¤¸» È¸¿ø¿¡¼­ Å»Åð ÇÏ½Ã°Ú½À´Ï±î?")) 
            location.href = "<?=$g4[bbs_path]?>/member_confirm.php?url=member_leave.php"; 
} 
