
// png ÀÌ¹ÌÁö
function setPng24(obj) { 
    obj.width=obj.height=1; 
	obj.style.width = obj.width + "px"; 
    obj.style.height = obj.height + "px"; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

// ±âº» ÇÃ·¡½Ã				
function flashObj(URL,SizeX,SizeY,LnkId,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 } 
}

function flashObj_menu(URL,SizeX,SizeY,LnkId,PageNum,Frm,Flag) // quick
{
    document.write('            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
    document.write('                    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    document.write('                    width="'+SizeX+'" height="'+SizeY+'"  id="'+LnkId+'" align="middle">');
    document.write('            <param name="movie"     value="'+URL+'" />');
	document.write('            <param name="FlashVars"     value="PageNum='+PageNum+'" />');
    document.write('            <param name="quality"   value="high" />');
    if ( Flag == null || Flag != 'N' )
    {
        document.write('        <param name="wmode"     value="transparent"/>');
    }
 document.write('   <param name="allowScriptAccess" value="always"/> ');
 document.write('   <param name="base" value="." />');
    document.write('            <embed base="." src="'+URL+'" quality="high" width="'+SizeX+'" height="'+SizeY+'"  align="middle" ');
  if ( Flag == null || Flag != 'N' )
    {
        document.write('         wmode="transparent" ');
    }
    document.write('             type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="always" swLiveConnect=true name="'+LnkId+'"  />');
    document.write('            </embed></object>');
 if ( Frm == 'Y' ) { // form ÅÂ±× µé¾î°¡´Â ÆäÀÌÁö¿¡ Àû¿ë
  eval("window." + LnkId + " = document.forms[0]."+ LnkId +"; ");
 } 
}


//quick_top
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.style.zIndex= "10";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 1000;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ¾ø´Â °Å
function popsn(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=no,resizable=no,copyhistory=no,toolbar=no,status=no'); 
}
//ÆË¾÷¶ç¿ì±â ½ºÅ©·Ñ ÀÖ´Â °Å
function popsy(url,trgt,w,h) { 
    window.open(url,trgt,'width='+w+',height='+h+',scrollbars=yes,resizable=no,copyhistory=no,toolbar=no,status=no,left=0,top=0'); 
}


//ÅÇ
function imgOver(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace(".gif", "_on.gif");
		imgName.src = imgName.src.replace(".jpg", "_on.jpg");
	}
}
function imgOut(imgName) {
	
	if (imgName.getElementsByTagName("img")[0] == null)
	{
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}else{
		imgName = imgName.getElementsByTagName("img")[0];
		imgName.src = imgName.src.replace("_on.gif", ".gif");
		imgName.src = imgName.src.replace("_on.jpg", ".jpg");
	}
}

function tabOver(tabName){	
	tabName = tabName.className = "on";
}
function tabOut(tabName){
	tabName = tabName.className = "";
}

function layer_events()
{
  if (document.layers) {
    document.layers['gnb_area'].captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
    document.layers['gnb_area'].onmouseout = new Function("this.style.height='115'");
    document.layers['gnb_area'].onmouseover = new Function("this.style.height='260'");
  }
}
link_num = 0;
function link_open(n) {
	for(i = 0; i < document.getElementById("link_table").getElementsByTagName("tr").length; i++){		
		if (document.getElementById("link_table").getElementsByTagName("tr")[i].className == "none")
		{
			link_num = link_num+1;
		}
		
	}
	for(i = 1; i <= link_num; i++){		
		trname = document.getElementById("link"+i)			
		if (i == n)
		{
			if (trname.style.display == "")
			{
				trname.style.display = "block"
			}else{
				trname.style.display = ""
			}
		}		
	}	
}
con_num = 0;
img_num = 0;
function doc_info(n) {	
	id_check = document.getElementById("real_content2").getElementsByTagName("div");
	for(i = 0; i < id_check.length; i++){		
		if (id_check[i].id.indexOf("doc_con") != -1)
		{			
			con_num = con_num+1;			
		}		
	}
	a_check = document.getElementById("real_content2").getElementsByTagName("a");
	for(i = 0; i < a_check.length; i++){		
		if (a_check[i].href.indexOf("javascript:doc_info") != -1)
		{			
			img_num = img_num+1;			
			if (a_check[i].href.indexOf("("+n+")") != -1)
			{			
				a_check[i].className = "tab"+img_num+" on";
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace(".gif", "_on.gif");
				a_check[i].onmouseover = "";
				a_check[i].onmouseout = "";
			}else{
				a_check[i].className = "tab"+img_num;
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].onmouseover = function()	{imgOver(this)};
				a_check[i].onmouseout = function()	{imgOut(this)};
			}
		}
	}


	for(i = 1; i <= con_num; i++){		
		con_div = document.getElementById("doc_con"+i);				
		if (i == n)		{
			con_div.style.display = "block";
			if (document.getElementById("player") != null)
			{
				swf_player = document.getElementById("player");
				if (i == 1)
				{				
					swf_player.movie = swf_player.movie.replace(".swf?fpv=off", ".swf")
				}else{
					swf_player.movie = swf_player.movie.replace(".swf", ".swf?fpv=off")
				}
			}
			
		}else{
			con_div.style.display = "none"
		}
		
	}	
	con_num = 0;
	img_num = 0;
}


con_num2 = 0;
img_num2 = 0;
function con_info(n) {	
	id_check = document.getElementById("contents").getElementsByTagName("div");
	for(i = 0; i < id_check.length; i++){		
		if (id_check[i].id.indexOf("con_info") != -1)
		{			
			con_num2 = con_num2+1;			
		}		
	}
	a_check = document.getElementById("contents").getElementsByTagName("a");
	for(i = 0; i < a_check.length; i++){		
		if (a_check[i].href.indexOf("javascript:con_info") != -1)
		{			
			img_num2 = img_num2+1;			
			if (a_check[i].href.indexOf("("+n+")") != -1)
			{			
				a_check[i].className = "tab"+img_num2+" on";
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace(".gif", "_on.gif");
				a_check[i].onmouseover = "";
				a_check[i].onmouseout = "";
			}else{
				a_check[i].className = "tab"+img_num2;
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].onmouseover = function()	{imgOver(this)};
				a_check[i].onmouseout = function()	{imgOut(this)};
			}
		}
	}


	for(i = 1; i <= con_num2; i++){		
		con_div = document.getElementById("con_info"+i);		
		if (i == n)		{
			con_div.style.display = "block";			
			if(con_div.getElementsByTagName("object").length != 0){
				con_div.getElementsByTagName("object")[0].movie = con_div.getElementsByTagName("object")[0].movie.replace(".swf?fpv=off", ".swf")
			}
		}else{
			con_div.style.display = "none"			
			if(con_div.getElementsByTagName("object").length != 0){
				con_div.getElementsByTagName("object")[0].movie = con_div.getElementsByTagName("object")[0].movie.replace(".swf", ".swf?fpv=off")
			}
		}
		
		
	}	

	con_num2 = 0;
	img_num2 = 0;
	
	
}

function con_infoCure(n) {	
	id_check = document.getElementById("contents").getElementsByTagName("div");
	for(i = 0; i < id_check.length; i++){		
		if (id_check[i].id.indexOf("con_info") != -1)
		{			
			con_num2 = con_num2+1;			
		}		
	}
	a_check = document.getElementById("contents").getElementsByTagName("a");
	for(i = 0; i < a_check.length; i++){		
		if (a_check[i].href.indexOf("javascript:con_info") != -1)
		{			
			img_num2 = img_num2+1;			
			if (a_check[i].href.indexOf("("+n+")") != -1)
			{			
				a_check[i].className = "tab"+img_num2+" on";
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace(".gif", "_on.gif");
				a_check[i].onmouseover = "";
				a_check[i].onmouseout = "";
			}else{
				a_check[i].className = "tab"+img_num2;
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].onmouseover = function()	{imgOver(this)};
				a_check[i].onmouseout = function()	{imgOut(this)};
			}
		}
	}


	for(i = 1; i <= con_num2; i++){		
		con_div = document.getElementById("con_info"+i);		
		if (i == n)		{
			con_div.style.display = "block";			
			if(con_div.getElementsByTagName("object").length != 0){
				con_div.getElementsByTagName("object")[0].movie = con_div.getElementsByTagName("object")[0].movie.replace(".swf?fpv=off", ".swf")
			}
		}else{
			con_div.style.display = "none"			
			if(con_div.getElementsByTagName("object").length != 0){
				con_div.getElementsByTagName("object")[0].movie = con_div.getElementsByTagName("object")[0].movie.replace(".swf", ".swf?fpv=off")
			}
		}
		
		
	}	

	switch (n)
	{
		case 1 : document.getElementById("curetitle").innerHTML = "±Ù½ÃÅðÇà";break;
		case 2 : document.getElementById("curetitle").innerHTML = "°¢¸·È¥Å¹";break;
		case 3 : document.getElementById("curetitle").innerHTML = "ºÎÁ¤³­½Ã/°¢¸·À¶±â";break;
		case 4 : document.getElementById("curetitle").innerHTML = "¾ß°£ºû¹øÁü";break;
		case 5 : document.getElementById("curetitle").innerHTML = "»óÇÇ´«¼ÓÁõ½ÄÁõ";break;
		case 6 : document.getElementById("curetitle").innerHTML = "°¢¸·È®ÀåÁõ";break;
	}
	con_num2 = 0;
	img_num2 = 0;
	
	
}
// layer tab
function con_view(n) {
	main_table_tr =  document.getElementById("con_table").getElementsByTagName("tr");	
	con_num = (main_table_tr.length - 1)/2;
	
	for (var i=1; i <= con_num; i++) {
		trname = document.getElementById("con"+i);
		tr_con = document.getElementById("con"+i+"_con");
		if (i == n)
		{
			trname.className = "on";
			tr_con.style.display = "";
		}else{
			trname.className = "";
			tr_con.style.display = "none";
		}		
	}	
}

function check_man(n) {	
	for (var i=1; i <= 2; i++) {
		con =  document.getElementById("check_man"+i);	
		if (i == n)
		{
			con.style.display = "block";
		}else{
			con.style.display = "none";
		}		
	}	
}
function after_con(n) {	
	con1 =  document.getElementById("after_con1");	
	con2 =  document.getElementById("after_con2");	
	if (n == "1³â¹Ì¸¸")
	{
		con1.style.display = "none";
		con2.style.display = "none";
	}else{
		con1.style.display = "block";
		con2.style.display = "block";
	}	
}
function select_re(n) {
	for (var i=1; i <= 3; i++) {
		con =  document.getElementById("content"+i);	
		right =  document.getElementById("right_con"+i);	
		if (i == n)
		{
			con.style.display = "block";
			right.style.display = "block";
		}else{
			con.style.display = "none";
			right.style.display = "none";
		}		
	}	
}
function select_re_ant(n,j) {
	if(j>0)
	{
		if(n!=j)
		{
			alert("¿¹¾à À¯ÇüÀÌ ´Ù¸£¸é ³¯Â¥ ¹× ½Ã°£À» ´Ù½Ã ¼±ÅÃÇØ¾ßÇÕ´Ï´Ù.");	
			document.bcheck.enableDatechk.value="N"
		}
		else
		{
			document.bcheck.enableDatechk.value=""
		}
	}
	for (var i=1; i <= 3; i++) {
		con =  document.getElementById("content"+i);	
		right =  document.getElementById("right_con"+i);	
		if (i == n)
		{
			con.style.display = "block";
			right.style.display = "block";
		}else{
			con.style.display = "none";
			right.style.display = "none";
		}		
	}	
}
num = 1;
function alert_con_chg(n,list) {	
	con_num =  document.getElementById("alert_con").getElementsByTagName("p");	
	
	
	if (n == "next")
	{
		if (num == con_num.length)
		{
			num = 1;
		}else{
			num = num+1;
		}
	}
	if (n == "prev")
	{
		if (num == 1)
		{
			num = con_num.length;
		}else{
			num = num-1;
		}
	}
	if (list != null)
	{
		
		num = list;
	}
	
	for (var i=1; i <= con_num.length; i++) {		
		if (i == num)
		{
			con_num[i-1].style.display ="block";
		}else{
			con_num[i-1].style.display ="none";
		}
	}	
}



function flashResize(s){
	var flashObj = document.getElementById("lnb");
	var width;
	if(s=="open"){
		width = 950;
	}else{		
		width = 305;
	}
	flashObj.style.width = width;
}


var js_rolling = function(this_s){
	// ½Ã°£´ÜÀ§´Â ms·Î 1000ÀÌ 1ÃÊ
	if(this_s.nodeType==1){
		this.this_s = this_s;
	}else{
		this.this_s = document.getElementById(this_s);
	}
	this.is_rolling = false;
	this.direction = 1; //1:top, 2:right, 3:bottom, 4:left (½Ã°è¹æÇâ) // 1¹ø°ú 4¹ø¸¸ µÊ
	this.children =	null;
	this.move_gap = 1;	//¿òÁ÷ÀÌ´Â ÇÈ¼¿´ÜÀ§
	this.time_dealy = 100; //¿òÁ÷ÀÌ´Â Å¸ÀÓµô·¹ÀÌ
	this.time_dealy_pause = 1000;//ÇÏ³ªÀÇ ´ë»óÀÌ »õ·Î ½ÃÀÛÇÒ ¶§ ¸ØÃß´Â ½Ã°£, 0 ÀÌ¸é Àû¿ë ¾ÈÇÔ
	this.time_timer=null;
	this.time_timer_pause=null;
	this.mouseover=false;
	this.init();
	this.set_direction(this.direction);
}
js_rolling.prototype.init = function(){
	this.this_s.style.position='relative';
	this.this_s.style.overflow='hidden';
	var children = this.this_s.childNodes;
	for(var i=(children.length-1);0<=i;i--){
		if(children[i].nodeType==1){
			children[i].style.position='relative';
		}else{
			this.this_s.removeChild(children[i]);
		}
	}
	var this_s=this;
	this.this_s.onmouseover=function(){
		this_s.mouseover=true;
		if(!this_s.time_timer_pause){
			this_s.pause();
		}
	}
	this.this_s.onmouseout=function(){
		this_s.mouseover=false;
		if(!this_s.time_timer_pause){
			this_s.resume();
		}
	}	
}
js_rolling.prototype.set_direction = function(direction){
	this.direction=direction;
	if(this.direction==2 ||this.direction==4){
		this.this_s.style.whiteSpace='nowrap';
	}else{
		this.this_s.style.whiteSpace='normal';
	}
	var children = this.this_s.childNodes;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.display='block';
			}else if(this.direction==2){
				children[i].style.textlign='right';
				children[i].style.display='inline';
			}else if(this.direction==3){
				children[i].style.display='block';
			}else if(this.direction==4){
				children[i].style.display='inline';
			}
	}
	this.init_element_children();	
}
js_rolling.prototype.init_element_children = function(){
	var children = this.this_s.childNodes;
	this.children = children;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.top='0px';
			}else if(this.direction==2){
				children[i].style.left='-'+this.this_s.firstChild.offsetWidth+'px';
			}else if(this.direction==3){
				children[i].style.top='-'+this.this_s.firstChild.offsetHeight+'px';
			}else if(this.direction==4){
				children[i].style.left='0px';
			}
	}
}
js_rolling.prototype.act_move_up = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)-this.move_gap)+'px';
	}
	if((this.children[0].offsetHeight+parseInt(this.children[0].style.top))<=0){
		this.this_s.appendChild(this.children[0]);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_up = function(){
	if(this.direction!=1&&this.direction!=3){return false;}
	this.this_s.appendChild(this.children[0]);
	this.init_element_children();
	this.pause_act();	
}
js_rolling.prototype.act_move_down = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)+this.move_gap)+'px';
	}
	if(parseInt(this.children[0].style.top)>=0){
		this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();	
	}
}
js_rolling.prototype.move_down = function(){
	if(this.direction!=1&&this.direction!=3){return false;}	
	this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.act_move_left = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)-this.move_gap)+'px';
	}
	if((this.children[0].offsetWidth+parseInt(this.children[0].style.left))<=0){
		this.this_s.appendChild(this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_left = function(){
	if(this.direction!=2&&this.direction!=4){return false;}		
	this.this_s.appendChild(this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();		
}
js_rolling.prototype.act_move_right = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)+this.move_gap)+'px';
	}
	
	if(parseInt(this.this_s.lastChild.style.left)>=0){
		this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_right = function(){
	if(this.direction!=2&&this.direction!=4){return false;}			
	this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.start = function(){ //·Ñ¸µ ½ÃÀÛ
	var this_s = this;
	this.stop();
	this.is_rolling = true;
	var act = function(){
		if(this_s.is_rolling){
			if(this_s.direction==1){this_s.act_move_up();}
			else if(this_s.direction==2){this_s.act_move_right();}
			else if(this_s.direction==3){this_s.act_move_down();}
			else if(this_s.direction==4){this_s.act_move_left();}
		}
	}
	this.time_timer = setInterval(act,this.time_dealy);
}
js_rolling.prototype.pause_act = function(){ //ÀÏ½Ã µ¿ÀÛ
	if(this.time_dealy_pause){
		var this_s = this;
		var act = function(){this_s.resume();this_s.time_timer_pause=null;}
		if(this.time_timer_pause){clearTimeout(this.time_timer_pause);}
		this.time_timer_pause = setTimeout(act,this.time_dealy_pause);
		this.pause();
	}
}
js_rolling.prototype.pause = function(){ //ÀÏ½Ã ¸ØÃã
	this.is_rolling = false;
}
js_rolling.prototype.resume = function(){ //ÀÏ½Ã ¸ØÃã ÇØÁ¦
	if(!this.mouseover){
		this.is_rolling = true;
	}
}
js_rolling.prototype.stop = function(){ //·Ñ¸µÀ» ³¡³¿
	this.is_rolling = false;
	if(!this.time_timer){
		clearInterval(this.time_timer);
	}
	this.time_timer = null
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
}
function moviePlayControl(value) {
	thisMovie("main_swf").moviePlayControl(value);
}

var reservation_pop;
function showPopup() { 
	if(BlockReserve=="Y")
	{
		alert("¼­¹ö Á¡°ËÁßÀÔ´Ï´Ù. \n\nÁ¡°Ë½Ã°£ : 2010³â 01¿ù 12ÀÏ 0½Ã ~ 2010³â 01¿ù 12ÀÏ 6½Ã");
		return;	
	}	

	var el = document.getElementById('media_view_area');
	if(el) {
		el.style.display="none";
	} else {
	} 

	var mainobj = document.getElementById('mainobj');
	if(mainobj) {
		moviePlayControl('pause');			
	} 

	pop_url = "/reservation/pop_reservation.asp";
	//pop_url = "/reservation/reservation_step01.asp";
	reservation_pop = new Popup("popOrderList", pop_url, {overlay:true});
}

function showPopupParam(param) { 
 pop_url = "/reservation/pop_reservationmodify.asp?ReqRnum="+param;
 reservation_pop = new Popup("popOrderList", pop_url, {overlay:true});
}

function swf_close(){
	var el = parent.document.getElementById('media_view_area');
	if(el) {
		el.style.display="";
	} else {
	} 

	var mainobj = parent.document.getElementById('mainobj');
	if(mainobj) {
		parent.moviePlayControl('play');			
	} 

	 parent.reservation_pop.close();
}

var sitemap;
function sitemap_pop() { 
	var mainobj = document.getElementById('mainobj');
	if(mainobj) {
		//alert("¸ÞÀÎÆäÀÌÁöÀÏ¶§ ½ÇÇà");
		moviePlayControl('pause');			
	} 
	pop_url = "/footer/sitemap.asp";
	sitemap= new Popup("popsitemap", pop_url, {overlay:true});
}

function sitemap_close(){ 
	var mainobj = parent.document.getElementById('mainobj');
	if(mainobj) {
		moviePlayControl('play');			
	} 
	sitemap.close();
}

var experience_swf;
function experience(n) { 
	swf_url = "/experience/pop_experience.asp?num="+n;
	experience_swf = new Popup("popexperience", swf_url, {overlay:true});	
}
function xclose(){ 
 experience_swf.close();
}

var dmpop;
function dm_Popup(n) {
	var mainobj = document.getElementById('mainobj');
	if(mainobj) {
		moviePlayControl('pause');			
	} 
	dmpop= new Popup("popdm", n, {overlay:true});
}

function dm_Popup_close(){ 
	var mainobj = parent.document.getElementById('mainobj');
	if(mainobj) {
		parent.moviePlayControl('play');			
	} 
	dmpop.close();
}

var JoinAuth;
function JoinAuth_pop() { 
	pop_url = "/member/pop_agree.asp";
	JoinAuth= new Popup("popagree", pop_url, {overlay:true});
}

function JoinAuth_close(){ 
 	JoinAuth.close();
}

var Event_pop;
function EventPopup(p,w,h) { 
 pop_url = "/event/pop_event.asp?p="+p+"&w="+w+"&h="+h;
 Event_pop = new Popup("EventPop", pop_url, {overlay:true});
}

function EventPopup_close(){
 parent.Event_pop.close();
}

var Main_pop;
function MainPopup(p,w,h) { 
 pop_url = "/event/pop_eventmain.asp?p="+p+"&w="+w+"&h="+h;
 Main_pop = new Popup2("Main_pop", pop_url, {overlay:false});
}

function MainPopup_close(){
 parent.Main_pop.close();
}


td_num = 0;
function select_time(n) {
	for(i = 1; i <= document.getElementById("select_table").getElementsByTagName("td").length; i++){		
		if (document.getElementById("select_table").getElementsByTagName("td")[i-1].id != "")
		{
			td_id=document.getElementById("select_table").getElementsByTagName("td")[i-1].id;
			if(td_id==n)
			{
				document.getElementById(td_id).className="on";
			}
			else
			{
				document.getElementById(td_id).className="ok";
			}
		}		
	}
}


function select_day(n) {
	for(i = 1; i <= document.getElementById("day_table").getElementsByTagName("td").length; i++){
		if (document.getElementById("day_table").getElementsByTagName("td")[i-1].id != "")
		{
			td_id=document.getElementById("day_table").getElementsByTagName("td")[i-1].id;
			
			if(td_id==n)
			{
				document.getElementById(td_id).className="on";
			}
			else
			{
				document.getElementById(td_id).className="ok";
			}
		}		
	}
}



function jsh01(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0000";
}
function jsh02(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0102";
}
function jsh03(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0619";
}
function jsh04(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0625";
}
function jsh05(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD6000";
}
function jsh06(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD9999";
}


function home(){
	location.href="/";
}
function kim0101(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0000";
}
function kim0102(){
	popsn("/movie/main.asp","",850,540)
}
function kim0201(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0102";
}
function kim0301(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0619";
}
function kim0401(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD0625";
}
function kim0501(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD6000";
}
function kim0601(){
	location.href = "/intro/doc_detailinfo.asp?doc_cd=KD9999";
}


function index_swf(){
	if (document.documentElement.clientHeight < 760)
	{
		document.getElementById("main").style.height = 760+"px";
	}else{
		document.getElementById("main").style.height = document.documentElement.clientHeight+"px";
	}
	if (document.documentElement.clientWidth < 974)
	{
		document.getElementById("main_swf").style.width = 974+"px";
	}else{
		document.getElementById("main_swf").style.width = document.documentElement.clientWidth+"px";
	}
	
}

//ÇÏ´Ü ÇªÅÍ ¸µÅ©
function ft01(){
	location.href = "/footer/agree.asp";
}
function ft02(){
	location.href = "/footer/privacy.asp";
}
function ft03(){
	location.href = "/intro/time.asp";
}
function ft04(){
	location.href = "/sitemap.asp";
}

//ÇÏ´Ü Æä¹Ð¸®»çÀÌÆ® ¸µÅ©
function fmy01(){
	window.open("http://www.bswebzine.com/");
}
function fmy02(){
	//window.open("http://cafe.daum.net/ilovenoon");
	window.open("http://cafe.daum.net/bseye");
}
function fmy03(){
	//window.open("http://blog.daum.net/bright-world");	
	window.open("http://blog.daum.net/ljhoons?t__nil_loginbox=blog1");	
}
function fmy08(){
	window.open("http://cafe.naver.com/bseye1");	
}
function fmy09(){
	window.open("http://blog.naver.com/zkandl090909");	
}
function fmy05(){
	window.open("http://english.bseye.com/");
//	alert("ÆäÀÌÁö ÁØºñÁßÀÔ´Ï´Ù.");
//	window.open("/foreign/English.asp");	
}
function fmy06(){
	window.open("http://japanese.bseye.com/");
//	alert("ÆäÀÌÁö ÁØºñÁßÀÔ´Ï´Ù.");
//	window.open("/foreign/Japanese.asp");	
}
function fmy07(){
	window.open("http://chinese.bseye.com/");
//	alert("ÆäÀÌÁö ÁØºñÁßÀÔ´Ï´Ù.");
//	window.open("/foreign/Chinese.asp");	
}
function fmy21(){
	window.open("http://twitter.com/BestJinkuk");	
}
function fmy22(){
	window.open("http://twitter.com/BS_EYE");	
}
function fmy23(){
	location.href = "/mypage/news_view.asp?intSeq=230693";
//	window.open("/foreign/Japanese.asp");	
}
function fmy24(){
	alert("ÆäÀÌÁö ÁØºñÁßÀÔ´Ï´Ù.");
//	window.open("/foreign/Chinese.asp");	
}

//¿ÞÂÊ¸Þ´º º£³Ê ¸µÅ©µé

function gsc01(){
	location.href = "/experience/star_list.asp";
}
function gsc02(){
	location.href = "/experience/experience_01.asp";
}
function gsc03(){
	location.href = "/reservation/counsel_list.asp";	
}


function pwc01(){
	location.href = "/intro/doc_info.asp";	
}

function pwc02(){
	location.href = "/eyesight_center/good_info.asp";	
}

function mapg01(){
	location.href = "/intro/map.asp";	
}

function mapg02(){
	location.href = "/intro/intro.asp";	
}

//°­³²¹àÀº¼¼»ó ·Î°í¼Ûµè±â
function song01(){
	alert("ÁØºñÁßÀÔ´Ï´Ù.");
}
//¹«·á¹®ÀÚ ´Ù¿î·Îµå
function song02(){
	popsn("/sms/popup_sms.htm","sms",500,300);
}

function chg_img(n){
	document.getElementById('new_04').src = "/images/eyesight_center/pop_con_new_04_0"+n+".jpg";
}


function jhc01(){
	document.getElementById("map_img").src="/images/intro/map_img_01_01.gif";
}
function jhc02(){
	document.getElementById("map_img").src="/images/intro/map_img_01_02.gif";
}
function jhc03(){
	document.getElementById("map_img").src="/images/intro/map_img_01_03.gif";
}
function jhc04(){
	document.getElementById("map_img").src="/images/intro/map_img_01_04.gif";
}


function submain_cure(n) {	
	link = document.getElementById("link_box").getElementsByTagName("a");
	
	simg_link = document.getElementById("link_go");
	simg= document.getElementById("link_go").getElementsByTagName("img");

	
	for(i = 1; i <= link.length; i++){		
		con_div = document.getElementById("sub_con"+i);		
		if (i == n)		{
			con_div.style.display = "block";
			simg[0].src = "/images/complication_center/submain_simg_0"+i+".gif";
			simg_link.href = "/complication_center/cure_0"+i+".asp";
			link[i-1].className = "on";
			
		}else{
			con_div.style.display = "none"
			link[i-1].className = "";
		}
		
	}	
}

function getNewsURL(){
	return "http://www.bseye.com/swf/xml/news.asp";
}

imgnum = 1;
function star_chg(n) {	
	border =  document.getElementById("rolling").getElementsByTagName("div");
	for (var i=1; i <= border.length; i++) {		
		if (i == n)
		{
			border[i-1].style.display ="block";
		}else{
			border[i-1].style.display ="none";
		}
	}	
}
function star_list(n) {	
	img_num =  document.getElementById("rolling").getElementsByTagName("div");						
	
	if (n == "prev")
	{
		if (imgnum == 1)
		{
			imgnum = img_num.length;
			star_chg(imgnum);
		}else{
			imgnum = imgnum-1;
			star_chg(imgnum);
		}
	}
	else if (n == "next")
	{
		if (imgnum < img_num.length)
		{
			imgnum = imgnum+1;
			star_chg(imgnum);
		}else{
			imgnum = 1;
			star_chg(imgnum);
		}
	}else{
		imgnum = n;
		star_chg(imgnum);
	}
	
}




//----------------------------------------------
//Floating v1.1 Source By Bermann
//dobermann75@gmail.com
//----------------------------------------------

//new Floating(Àû¿ëÇÒ°³Ã¼ , XÃà¿©¹é , YÃà¿©¹é , ¹Ì²ô·¯Áö´Â¼Óµµ:ÀÛÀ»¼ö·Ïºü¸§..±âº»20 , ºü¸£±â:ÀÛÀ»¼ö·ÏºÎµå·¯¿ò..±âº»10);

function Floating(FloatingObj,MarginX,MarginY,Percentage,setTime,Mstart) {
	this.FloatingObj = FloatingObj;
	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.Mstart = (Mstart) ? Mstart : 0;
	this.Run();
}

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.MarginX;//this.FloatingObj.offsetLeft;
	var FloatingObjTop = (this.FloatingObj.style.top) ? parseInt(this.FloatingObj.style.top,10) : this.Mstart;//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 (FloatingObjLeft < DocLeft) {
		this.FloatingObj.style.left = FloatingObjLeft + MoveX + "px";
	} else {
		this.FloatingObj.style.left = FloatingObjLeft - MoveX + "px";
	}

	if (FloatingObjTop < DocTop) {
		this.FloatingObj.style.top = FloatingObjTop + MoveY + "px";
	} else {
		this.FloatingObj.style.top = FloatingObjTop - MoveY + "px";
	}

	window.clearTimeout(this.setTimeOut);
	this.setTimeOut = window.setTimeout(function () { This.Run(); },this.setTime);
}

function locationtxttoarrow(){
	var lobj=document.getElementById('contents');
	if(!lobj) return;
	lobj=lobj.getElementsByTagName('div')[0];
	if(!lobj || lobj.className!='navi') return;
	lobj.innerHTML=lobj.innerHTML.replace(/ - /g,' <img src="/images/common/icn_locationarr.gif" alt=">" /> ');
}

function check_Form(FormName,TagName,AlertMSG,MinLength,MaxLength) {
	var Status ="false";
	if (FormName=="" && TagName=="") {
		return false;
	} else {
		var FormTagName = eval("document."+FormName+"."+TagName);
		if (AlertMSG == "") {
		AlertMSG ="ÇØ´ç³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä";
		}
		if (FormTagName.value=="") {
			alert(AlertMSG);
			FormTagName.focus();
			return false;
		} else {
			Status ="true";
		}
		if (MinLength != "") {
			if (FormTagName.value.length < MinLength) {
				alert(MinLength+"ÀÚ ÀÌ»ó ÀÔ·ÂÇØÁÖ¼¼¿ä");
				FormTagName.focus();
				return false;
			} else {
				Status ="true";
			}
		}
		if (MaxLength != "") {
			if (FormTagName.value.length > MaxLength ) {
				alert(MaxLength+"ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇØÁÖ¼¼¿ä");
				FormTagName.focus();
				return false;
			} else {
				Status ="true";
			}
		}
	}
	if (Status=="true") {
		return true;
	}
}



function doc_infoTest(n) {
	id_check = document.getElementById("real_content2").getElementsByTagName("div");
	for(i = 0; i < id_check.length; i++){		
		if (id_check[i].id.indexOf("doc_con") != -1)
		{			
			con_num = con_num+1;			
		}		
	}
	a_check = document.getElementById("real_content2").getElementsByTagName("a");
	for(i = 0; i < a_check.length; i++){		
		if (a_check[i].href.indexOf("javascript:doc_info") != -1)
		{			
			img_num = img_num+1;			
			if (a_check[i].href.indexOf("("+n+")") != -1)
			{			
				a_check[i].className = "tab"+img_num+" on";
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace(".gif", "_on.gif");
				a_check[i].onmouseover = "";
				a_check[i].onmouseout = "";
			}else{
				a_check[i].className = "tab"+img_num;
				a_check[i].getElementsByTagName("img")[0].src = a_check[i].getElementsByTagName("img")[0].src.replace("_on.gif", ".gif");
				a_check[i].onmouseover = function()	{imgOver(this)};
				a_check[i].onmouseout = function()	{imgOut(this)};
			}
		}
	}


	for(i = 1; i <= con_num; i++){		
		con_div = document.getElementById("doc_con"+i);				
		if (i == n)		{
			con_div.style.display = "block";
			if (document.getElementById("player") != null)
			{
				swf_player = document.getElementById("player");
				if (i == 1)
				{				
					swf_player.movie = swf_player.movie.replace(".swf?fpv=off", ".swf")
				}else{
					swf_player.movie = swf_player.movie.replace(".swf", ".swf?fpv=off")
				}
			}
			
		}else{
			con_div.style.display = "none"
		}
		
	}	
	con_num = 0;
	img_num = 0;
}

function modifyReserve(sMode,intIdx) { 
	var el = document.getElementById('media_view_area');
	if(el) {
		el.style.display="none";
	} else {
	}
	var mainobj = document.getElementById('mainobj');
	if(mainobj) {
		moviePlayControl('pause');			
	}
	pop_url = "/reservation/pop_reservation.asp?sMode="+sMode+"&intIdx="+intIdx;
	reservation_pop = new Popup("popOrderList", pop_url, {overlay:true});
}

function showPopupParam(param) { 
 pop_url = "/reservation/pop_reservationmodify.asp?ReqRnum="+param;
 reservation_pop = new Popup("popOrderList", pop_url, {overlay:true});
}

function check_Form_Radio(FormName,TagName,AlertMSG) {
	var Status ="false";
	if (FormName=="" && TagName=="") {
		return false;
	} else {
		var FormTagName = eval("document."+FormName+"."+TagName);
		for (i=0; i < FormTagName.length; i++) {
			if (FormTagName[i].checked==true ) {
				Status="true";
			}
		}
	}
	if (Status=="true") {
		return true;
	} else {
		alert(AlertMSG);
		return false;
	}
}

if(window.attachEvent) window.attachEvent('onload',locationtxttoarrow);
else window.addEventListener('load',locationtxttoarrow,false);



