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 ''; 
	} 

if(window.location.host != 'www.blsplus.co.kr') {
	var toUrl = 'http://www.blsplus.co.kr';
	toUrl += window.location.pathname.toString();
	if(window.location.search) toUrl += window.location.search.toString();
	window.location.href = toUrl;
}


function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

/*****************************************************************
****************** Flash Object Loader ***************************
******************************************************************/
function flashObject(file_name,width,height){
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="' + width + '" height="' + height + '">');
  document.write('<param name="movie" value="' + file_name + '">');
  document.write('<param name="quality" value="high">');
  document.write('<param name="wmode" value="transparent">');
  document.write('<embed src="' + file_name + '" width="' + width + '" height="' + height + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>');
  document.write('</object>');
}

function jjDWL(html) {
	document.writeln(html);
}

/********************************************************************
************** NU_HARDWARE/NEWS Section TAB Processing script *******
********************************************************************/
function pd_layer(nm, id) {
	if(!nm) return false;
	else if(!id) return false;
	
	if(document.all) {
		var tmp = document.getElementsByTagName("DIV");
		var obj = [];
		for(var i=0, j=tmp.length; i<j; i++) {
			if(tmp[i].name != nm) continue;
			obj[obj.length] = tmp[i];
		}
	} else {
		var obj = document.getElementsByName(nm);
	}
	
	for(var i=0, j=obj.length; i<j; i++) {
		if(obj[i].id==id) obj[i].style.display = '';
		else obj[i].style.display = 'none';
	}
	
	return;
}
/*****************************************************************
******************** DIV Change Script ***************************
******************************************************************/
function nTabs(tno){
	var tabList = document.getElementById("gBtn1").getElementsByTagName("a");

	for(i=0; i <tabList.length; i++){
		if (i == tno){
    		document.getElementById("al"+i).className = "gBtn1_on";
    		document.getElementById("gt_Content"+i).className = "tab_on";
		}else{
			document.getElementById("al"+i).className = "gBtn1_off";
    		document.getElementById("gt_Content"+i).className = "tab_off";
		}
	} 

}

/*****************************************************************
************** PNG FILE PROCESSING for IE6 or Etc Browser *******
******************************************************************/
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 ''; 
	} 


//////////////////////// 메인롤링 이미지 //////////////////////
// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수, 윈도우모드) 
function flashWrite(url,w,h,id,bg,vars,win){ 

    // 플래시 코드 정의 
    var flashStr= 
    "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+ 
    "<param name='allowScriptAccess' value='always' />"+ 
    "<param name='movie' value='"+url+"' />"+ 
    "<param name='FlashVars' value='"+vars+"' />"+ 
    "<param name='wmode' value='"+win+"' />"+ 
    "<param name='menu' value='false' />"+ 
    "<param name='quality' value='high' />"+ 
    "<param name='bgcolor' value='"+bg+"' />"+ 
    "<embed src='"+url+"' FlashVars='"+vars+"' wmode='opaque' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+ 
    "</object>"; 

    // 플래시 코드 출력 
    document.write(flashStr); 

} 


/* ------------------------------------------------------------------- *
 * -----   Flash Write V2    ----------------------------------------- *
 * ------------------------------------------------------------------- */
function nuDWF(toObj, fUrl, fW, fH) {
	if(!toObj) {
		alert('대상객체가 없습니다.');
		return;
	}
	
	var html = "";
	html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+fW+'" height="'+fH+'" id="upload" align="middle">';
	html += '<param name="allowScriptAccess" value="sameDomain" />';
	html += '<param name="movie" value="'+fUrl+'" />';
	html += '<param name="quality" value="high" />';
	html += '<param name="bgcolor" value="" />';
	html += '<param name="wmode" value="transparent" />';
	html += '<embed src="'+fUrl+'" quality="high" bgcolor="#ffffff" width="'+fW+'" height="'+fH+'" name="upload" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="opaque" />';
	html += '</object>'
	
	if(typeof(toObj) == 'string') {
		toObj = document.getElementById(toObj);
	}
	toObj.innerHTML = null;
	toObj.innerHTML = html;
	return;
}




if (window.attachEvent) {
	var addEvent = function (Element,Handle,Action) { return Element.attachEvent(Handle,Action); }
} else if (window.addEventListener) {
	var addEvent = function (Element,Handle,Action) { return Element.addEventListener(Handle.replace(/^on/i,""),Action,false); }
}

function getDocumentDimension(offsetrequired) {
	var w = 0;
	var h = 0;
	w =(window.innerWidth || Math.max(Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), Math.max(document.documentElement.offsetWidth, document.body.offsetWidth)));
	h = (window.innerHeight || Math.max(Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), Math.max(document.documentElement.offsetHeight, document.body.offsetHeight)));
	if (offsetrequired === true) {
		w += Math.max(document.documentElement.offsetWidth, document.body.offsetWidth);
		h += Math.max(document.documentElement.offsetHeight, document.body.offsetHeight);
	}
	return {width: w, height: h};
}

function windowOpen(urls, thisid, features, width, height) {
	var w = screen.availWidth;
	var h = screen.availHeight;
	var windowLeft = w / 2 - width / 2;
	var windowTop = h / 2 - height / 2;
	window.open(urls, thisid, "left=" + windowLeft + ", top=" + windowTop + ", width=" + width + ", height=" + height + ", " + features);
}

function getBounds(tag) {
	var ret = new Object();
	if (tag.getBoundingClientRect) {
		var rect = tag.getBoundingClientRect();
		ret.left = rect.left + (document.documentElement.scrollLeft || document.body.scrollLeft);
		ret.top = rect.top + (document.documentElement.scrollTop || document.body.scrollTop);
		ret.width = rect.right - rect.left;
		ret.height = rect.bottom - rect.top;
	} else if (document.getBoxObjectFor) {
		var box = document.getBoxObjectFor(tag);
		ret.left = box.x;
		ret.top = box.y;
		ret.width = box.width;
		ret.height = box.height;
	} else {
		var realleft = 0;
		var element = tag;
		while (element.parentNode != (document.documentElement.getElementsByTagName("BODY")[0] || document.body)) {
			element = element.parentNode;
			realleft += element.offsetLeft;
		}
		ret.left = realleft; //tag.offsetLeft;
		ret.top = tag.offsetTop;
		ret.width = tag.offsetWidth;
		ret.height = tag.offsetHeight;
	}
	return ret;
}

//new Floating(적용할개체 , 이동방향(b(oth), h(orizontal), v(ertical)), 스크롤시 X축여백 , 최상단시 Y축여백 , 미끄러지는속도:작을수록빠름..기본20 , 빠르기:작을수록부드러움..기본10);

function Floating(FloatingObj,Direction,MarginX,MarginY,Percentage,setTime) {
	this.FloatingObj = FloatingObj;
	this.Direction = Direction;
	this.MarginX = (MarginX) ? MarginX : 0;
	this.MarginY = (MarginY) ? MarginY : 0;
	this.Percentage = (Percentage) ? Percentage : 20;
	this.setTime = (setTime) ? setTime : 10;
	this.FloatingObj.style.position = "absolute";
	this.Body = null;
	this.setTimeOut = null;
	this.Run();
}

Floating.prototype.Stop = function () {
	window.clearTimeout(this.setTimeOut);
}

Floating.prototype.Run = function () {
	if ((document.documentElement.scrollLeft + document.documentElement.scrollTop) > (document.body.scrollLeft + document.body.scrollTop)) {
		this.Body = document.documentElement;
	} else {
		this.Body = document.body;
	}

	var This = this;
	var FloatingObjLeft = (this.FloatingObj.style.left) ? parseInt(this.FloatingObj.style.left,10) : this.FloatingObj.offsetLeft;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;
	var DocLeft = this.Body.scrollLeft + this.MarginX;
	var DocTop = this.Body.scrollTop + this.MarginY;

	var MoveX = Math.abs(FloatingObjLeft - DocLeft);
	MoveX = Math.ceil(MoveX / this.Percentage);
	var MoveY = Math.abs(FloatingObjTop - DocTop);
	MoveY = Math.ceil(MoveY / this.Percentage);

	if (this.Direction == "b" || this.Direction == "h") {
		if (FloatingObjLeft < DocLeft) {
			this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
		} else {
			this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
		}
	}

	if (this.Direction == "b" || this.Direction == "v") {
		if (FloatingObjTop < DocTop) {
			this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
		} else {
			this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
		}
	}

	this.Stop();
	this.setTimeOut = window.setTimeout(function () { This.Run(); },this.setTime);
}
/*function Floating ( FloatingObj , MarginY , TopLimit , Percentage , setTime ) {
	//this.FloatingObj = FloatingObj;
	// 여서부터
	//var div = document.createElement('DIV');
	//div.innerHTML = FloatingObj.innerHTML;
	//div.id = FloatingObj.id + '_clone';
	document.write("<div id='"+FloatingObj.id+"_clone'>"+FloatingObj.innerHTML+"</div>");
	this.FloatingObj = document.getElementById(FloatingObj.id + '_clone');
	// 여까이
	
	this.MarginY     = (MarginY) ? MarginY : 0;
	this.TopLimit    = (TopLimit) ? TopLimit : 0;
	this.Percentage  = (Percentage) ? Percentage : 20;
	this.setTime     = (setTime) ? setTime : 10;
	this.FloatingObj.style.position = "absolute";
	this.Body        = null;
	this.setTimeOut  = null;
	this.Run();
}

Floating.prototype.Run = function () {
	this.Body = document.documentElement.scrollTop>document.body.scrollTop ? document.documentElement : document.body;
	var This = this;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.FloatingObj.offsetTop;
	var DocTop = this.Body.scrollTop + this.MarginY;
	var MoveY = Math.abs(FloatingObjTop - DocTop);
	if ( DocTop > this.TopLimit ) {
		if ( FloatingObjTop < DocTop ) {
			this.FloatingObj.style.top = FloatingObjTop + Math.ceil( MoveY/this.Percentage ) + "px" ;
		} else {
			this.FloatingObj.style.top = DocTop + "px" ;
		}
	} else {
			this.FloatingObj.style.top = this.TopLimit + "px" ;
	}
	// 레이어 위치 표시 (삭제해도 무방) 
	//document.getElementById('rTop').innerHTML = 'FloatingObjTop:'+FloatingObjTop+'<br />DocTop:'+DocTop +'<br />MoveY:'+MoveY ;
	//
	window.clearTimeout(this.setTimeOut);
	this.setTimeOut = window.setTimeout( function () { This.Run(); } , this.setTime );
}*/




// 메뉴 관련 스크립트 시작 //
var resImg = '';
var resImgSrc = '';
var resDiv = '';
var resTO = '';
function jjTabRestore() {
	if(resDiv) {
		resDiv.style.display = 'none';
		resDiv = '';
	}
	if(resImg) {
		resImg.src = resImgSrc;
		resImg = resImgSrc = '';
	}
	setTimeout(function(){clearTimeout(resTO)}, 10);
}

function jjTabMove(imgObj, overImg, viewObj) {
	if(!imgObj) return;
	
	jjTabRestore();
	
	if(overImg) {
		resImg = imgObj;
		resImgSrc = imgObj.src;
		imgObj.src = overImg;
	}
	
	if(viewObj) {
		if(typeof viewObj != 'object') viewObj = document.getElementById(viewObj);
		resDiv = viewObj;
		viewObj.style.display = 'block';
	}
	imgObj.parentElement.focus();
	
	imgObj.parentElement.onblur = function() {
		resTO = setTimeout(function() {
			jjTabRestore();
		}, 500);
	}
}

// 메뉴관련 스크립트 끝

////// AJAX 제어 ///////
var objRequest = false;
try {
	objRequest = new XMLHttpRequest();
} catch (trymicrosoft) {
	try {
		objRequest = new ActiveXObject("Msxml2.XMLHTTP.3.0");
	} catch (othermicrosoft) {
		try {
			objRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (failed) {
			objRequest = false;
		}
	}
}

var cBoard = null;
var ajaxRun = false;
var boardElementSize = 17;
var bbsList = new Array("notice","event","brand","goodreview","reviewtoday","global_news","freeboard","qna","hard_forum","newgood","PhotoBBS","SysGall","buysell");
var bbsPageList = new Array();
for(i = 0; i < bbsList.length; i++) {
	bbsPageList[i] = 1;
}

var tObj = null;

function pageFinder(board_id) {
	var cnt;
	for(cnt = 0; cnt < boardElementSize; cnt++) {
		if(bbsList[cnt] == board_id) {
			return cnt;
		}
	}
}

function divChange(origObj, newObj) {
	var oObj = document.getElementById(origObj);
	var nObj = document.getElementById(newObj);
	oObj.style.display = "none";
	nObj.style.display = "";
}
//

/*---------------------------------------------------------------------------*
/*---------- 위아래로 스크롤 토글 제어 스크립2007-11-25 -------------*
/*---------------------------------------------------------------------------*/

function topbottom() {
 if (document.body.scrollTop == 0) {
  window.scrollTo(0,document.body.scrollHeight);
 } else {
  window.scrollTo(0,0);
 }
}

function gotoupdown() {
 document.body.ondblclick = topbottom;
}

function showPostLayer(oAnchor, sCntsId, event) { 
    var oResultDiv = document.getElementById('resultarea'); 
    oResultDiv.innerHTML = (document.getElementById(sCntsId)? document.getElementById(sCntsId).innerHTML : ""); 
     
    if(oAnchor == null) return; 
    var position = getPosition(oAnchor); 
    var nAncX = position.x; 
    var nAncY = position.y; 
    var nAncWidth = oAnchor.offsetWidth; 
    var nAncHeight = oAnchor.offsetHeight; 

    var nDocX =  (document.documentElement.clientWidth || document.body.clientWidth); 
    var nDocY = (document.documentElement.scrollHeight || document.body.scrollHeight); 

    var oDashBoard = document.getElementById("dashboard"); 
    oDashBoard.style.display = "block"; 


    var nDashX = nAncX; 
    var nDashY = nAncY; 
    var nCntsHeight = oResultDiv.offsetHeight; 
    var oResultBox = document.getElementById('resultBox'); 
    if(nAncX > nDocX/2) { //right 
        nDashX -= 309 + 3; 
        if(nAncY > nDocY - 200) { //예상 bot 
            nDashY -= nCntsHeight + Math.ceil(nAncHeight/2); 
            oResultBox.className = "rightbot"; 
        } else { //top 
            nDashY += Math.ceil(nAncHeight/2); 
            oResultBox.className = "righttop"; 
        } 
    } else { //left 
        nDashX += nAncWidth + 3; 
        if(nAncY > nDocY - 200) { //예상 bot 
            nDashY -= nCntsHeight + Math.ceil(nAncHeight/2); 
            oResultBox.className = "leftbot"; 
        } else { //top 
            nDashY += Math.ceil(nAncHeight/2); 
            oResultBox.className = "lefttop"; 
        } 
    } 
     
    oDashBoard.style.left = (nDashX) + "px"; 
    oDashBoard.style.top = (nDashY) + "px"; 
} 
     
function showDashBoard(){ 
    var obj = document.getElementById("dashboard"); 
    obj.style.display="block"; 
    viewLayer = true; 
} 

function hideDashBoard(){ 
    var obj = document.getElementById("dashboard"); 
    obj.style.display="none"; 
    viewLayer = false; 
} 

function getPosition(object) { 
  var valueT = 0, valueL = 0; 
    do { 
      valueT += object.offsetTop  || 0; 
      valueL += object.offsetLeft || 0; 
      object = object.offsetParent; 
      if (object) { 
        if(object.tagName.toUpperCase()=='BODY') break; 
      } 
    } while (object); 
    return {x: valueL, y:valueT}; 
} 


/*---------------------------------------------------------------------------------------*/
/*-----------------------------  DIV CHANGE    -----------------------------------*/
/*---------------------------------------------------------------------------------------*/
function show_div_change(lay) 
{ 
if(this.prev_lay){ 
document.getElementById(this.prev_lay).style.display="none"; 
document.getElementById(lay).style.display="block"; 
}else{ 
document.getElementById(lay).style.display="block"; 
} 
this.prev_lay=lay; 
} 


var dolphintabs={
    subcontainers:[], last_accessed_tab:null,

    revealsubmenu:function(curtabref){
    this.hideallsubs()
    if (this.last_accessed_tab!=null)
        this.last_accessed_tab.className=""
    if (curtabref.getAttribute("rel")) //If there's a sub menu defined for this tab item, show it
    document.getElementById(curtabref.getAttribute("rel")).style.display="block"
    curtabref.className="current"
    this.last_accessed_tab=curtabref
    },

    hideallsubs:function(){
    for (var i=0; i<this.subcontainers.length; i++)
        document.getElementById(this.subcontainers[i]).style.display="none"
    },


    init:function(menuId, selectedIndex){
    var tabItems=document.getElementById(menuId).getElementsByTagName("a")
        for (var i=0; i<tabItems.length; i++){
            if (tabItems[i].getAttribute("rel"))
                this.subcontainers[this.subcontainers.length]=tabItems[i].getAttribute("rel") //store id of submenu div of tab menu item
            if (i==selectedIndex){ //if this tab item should be selected by default
                tabItems[i].className="current"
                this.revealsubmenu(tabItems[i])
            }
        tabItems[i].onmouseover=function(){
        dolphintabs.revealsubmenu(this)
        }
        } //END FOR LOOP
    }

}


/*---------------------------------------------------------------------------------------*/
/*-----------------------------     LOGIN BOX     ---------------------------------*/
/*---------------------------------------------------------------------------------------*/


//
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 ''; 
}


/*--------------------------------------------------------------------------------------*/
/*------------------------------  Active RunContentsJS ------------------------*/
/*---------------------------------------------------------------------------------------*/
// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function isExplore() {
	return sUserAgent.indexOf("compatible") > -1 
           && sUserAgent.indexOf("MSIE") > -1
           && !isOpera;	
}

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
			alert("flashVer="+flashVer);
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

//see below URL's comments to solove externalInterface in form problem 
//  http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002200.html
//  http://egoing.net/268 (Korean)
function ExternalInterfaceManager() { 
	this.registerMovie = function(movieName) { 
		if(!window.fakeMovies) window.fakeMovies = new Array(); 
		window.fakeMovies[window.fakeMovies.length] = movieName; 
	} 
	this.initialize = function() { 
		if(document.all) {
			if(window.fakeMovies) { 
				for(i=0;i<window.fakeMovies.length;i++) { 
					window[window.fakeMovies[i]] = new Object(); 
				} 
				STD.addEventListener(window);
				window.addEventListener("load", initializeExternalInterface, false);
			} 
		} 
	} 
} 
function initializeExternalInterface() { 
	for(i=0;i<window.fakeMovies.length;i++) { 
		var movieName = window.fakeMovies[i]; 
		var fakeMovie = window[movieName]; 
		var realMovie = document.getElementById(movieName); 
		for(var method in fakeMovie) { 
			realMovie[method] = function() {
				flashFunction = "<invoke name=\"" + method.toString() + "\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments, 0) + "</invoke>";this.CallFunction(flashFunction);
			} 
		} 
		window[movieName] = realMovie; 
	} 
}

function getVariableFromFlash(myFlashElementID, myVariableName){
	if(document.getElementById(myFlashElementID))
		return document.getElementById(myFlashElementID).GetVariable(myVariableName);
	return "";
}

function AC_FL_RunContentNotWriteGetString(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  return AC_GenerateobjNotWriteGetString(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GenerateobjNotWriteGetString(objAttrs, params, embedAttrs) 
{
  	var str = '';
	if(isExplore()) {
		str += '<object ';
		for (var i in objAttrs)
			str += i + '="' + objAttrs[i] + '" ';
		str += '>';
		for (var i in params)
			str += '<param name="' + i + '" value="' + params[i] + '" /> ';	
	}
	str += '<embed ';
	for (var i in embedAttrs)
		str += i + '="' + embedAttrs[i] + '" ';
	str += ' ></embed>';
	if(isIE) {
		str += '</object>';
	}
  return str;
}

/* SHORT KEY */
function shortcut(shortcut,callback,opt) {
	//Provide a set of default options
	var default_options = {
		'type':'keydown',
		'propagate':false,
		'target':document
	}
	if(!opt) opt = default_options;
	else {
		for(var dfo in default_options) {
			if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
		}
	}

	var ele = opt.target
	if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
	var ths = this;

	//The function to be called at keypress
	var func = function(e) {
		e = e || window.event;
		
		//Find Which key is pressed
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
		var character = String.fromCharCode(code).toLowerCase();

		var keys = shortcut.toLowerCase().split("+");
		//Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
		var kp = 0;
		
		//Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
		var shift_nums = {
			"`":"~",
			"1":"!",
			"2":"@",
			"3":"#",
			"4":"$",
			"5":"%",
			"6":"^",
			"7":"&",
			"8":"*",
			"9":"(",
			"0":")",
			"-":"_",
			"=":"+",
			";":":",
			"'":"\"",
			",":"<",
			".":">",
			"/":"?",
			"\\":"|"
		}
		//Special Keys - and their codes
		var special_keys = {
			'esc':27,
			'escape':27,
			'tab':9,
			'space':32,
			'return':13,
			'enter':13,
			'backspace':8,

			'scrolllock':145,
			'scroll_lock':145,
			'scroll':145,
			'capslock':20,
			'caps_lock':20,
			'caps':20,
			'numlock':144,
			'num_lock':144,
			'num':144,
			
			'pause':19,
			'break':19,
			
			'insert':45,
			'home':36,
			'delete':46,
			'end':35,
			
			'pageup':33,
			'page_up':33,
			'pu':33,

			'pagedown':34,
			'page_down':34,
			'pd':34,

			'left':37,
			'up':38,
			'right':39,
			'down':40,

			'f1':112,
			'f2':113,
			'f3':114,
			'f4':115,
			'f5':116,
			'f6':117,
			'f7':118,
			'f8':119,
			'f9':120,
			'f10':121,
			'f11':122,
			'f12':123
		}


		for(var i=0; k=keys[i],i<keys.length; i++) {
			//Modifiers
			if(k == 'ctrl' || k == 'control') {
				if(e.ctrlKey) kp++;

			} else if(k ==  'shift') {
				if(e.shiftKey) kp++;

			} else if(k == 'alt') {
					if(e.altKey) kp++;

			} else if(k.length > 1) { //If it is a special key
				if(special_keys[k] == code) kp++;

			} else { //The special keys did not match
				if(character == k) kp++;
				else {
					if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
						character = shift_nums[character]; 
						if(character == k) kp++;
					}
				}
			}
		}

		if(kp == keys.length) {
			callback(e);

			if(!opt['propagate']) { //Stop the event
				//e.cancelBubble is supported by IE - this will kill the bubbling process.
				e.cancelBubble = true;
				e.returnValue = false;

				//e.stopPropagation works only in Firefox.
				if (e.stopPropagation) {
					e.stopPropagation();
					e.preventDefault();
				}
				return false;
			}
		}
	}

	//Attach the function with the event	
	if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
	else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func);
	else ele['on'+opt['type']] = func;
}

 var DYNIFS = {
  // Storage for known IFrames.
  iframes: {},
  // Here we save any previously installed onresize handler.
  oldresize: null,
  // Flag that tell us if we have already installed our onresize handler.
  ready: false,
  // The document dimensions last time onresize was executed.
  dim: [-1,-1],
  // Timer ID used to defer the actual resize action.
  timerID: 0,
  // Obtain the dimensions (width,height) of the given document.
  getDim: function(d) {
   var w=200, h=200, scr_h, off_h;
   if( d.height ) { return [d.width,d.height]; }
   with( d.body ) {
    if( scrollHeight ) { h=scr_h=scrollHeight; w=scrollWidth; }
    if( offsetHeight ) { h=off_h=offsetHeight; w=offsetWidth; }
    if( scr_h && off_h ) h=Math.max(scr_h, off_h);
   }
   return [w,h];
  },
  // This is our window.onresize handler.
  onresize: function() {
   // Invoke any previously installed onresize handler.
   if( typeof this.oldresize == 'function' ) { this.oldresize(); }
   // Check if the document dimensions really changed.
   var dim = this.getDim(document);
   if( this.dim[0] == dim[0] && this.dim[1] == dim[1] ) return;
   // Defer the resize action to prevent endless loop in quirksmode.
   if( this.timerID ) return;
   this.timerID = setTimeout('DYNIFS.deferred_resize();', 10);
  },
  // This is where the actual IFrame resize is invoked.
  deferred_resize: function() {
   // Walk the list of known IFrames to see if they need to be resized.
   for( var id in this.iframes ) this.resize(id);
   // Store resulting document dimensions.
   this.dim = this.getDim(document);
   // Clear the timer flag.
   this.timerID = 0;
  },
  // This is invoked when the IFrame is loaded or when the main window is resized.
  resize: function(id) {
   // Browser compatibility check.
   if( !window.frames || !window.frames[id] || !document.getElementById || !document.body )
    return;
   // Get references to the IFrame window and layer.
   var iframe = window.frames[id];
   var div = document.getElementById(id);
   if( !div ) return;
   // Save the IFrame id for later use in our onresize handler.
   if( !this.iframes[id] ) {
    this.iframes[id] = true;
   }
   // Should we inject our onresize event handler?
   if( !this.ready ) {
    this.ready = true;
    this.oldresize = window.onresize;
    window.onresize = new Function('DYNIFS.onresize();');
   }
   // This appears to be necessary in MSIE to compute the height
   // when the IFrame'd document is in quirksmode.
   // OTOH, it doesn't seem to break anything in standards mode, so...
   if( document.all ) div.style.height = '0px';
   // Resize the IFrame container.
   var dim = this.getDim(iframe.document);
   div.style.height = (dim[1]+30) + 'px';
  }
 };



/* 로그인박스 */
var jjLoginBoxObj = null;
var jjLoginRealBoxObj = null;
var jjLoginBlind = null;

function jjLoginBox() {
	jjLoginBlind.style.left = '0px';
	jjLoginBlind.style.top  = '0px';
	jjLoginBlind.style.display = '';

	//jjLoginBoxObj.style.top = (0 - getBounds(jjLoginBoxObj).height) + 'px';
	jjLoginBoxObj.style.display = '';
	jjLoginRealBoxObj.style.display = '';

	// 포커스주기
	document.loginForm.user_id.focus();
}

function jjLoginBoxHide() {
	jjLoginBlind.style.display = 'none';
	jjLoginBoxObj.style.display = 'none';
	jjLoginRealBoxObj.style.display = 'none';
}