// src   : source url
// fid   : flash id
// width : source width
// height: source height
// mode  : wmode ("" for none, transparent, opaque ...)
function flash(src,fid,width,height,mode){
	document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'");
    document.writeln("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'");
    document.writeln("width=" + width + " height=" + height + " id=" + fid + ">");
    document.writeln("<param name=wmode value=" + mode + " />");
    document.writeln("<param name=movie value=" + src + " />");
    document.writeln("<param name=quality value=high />");
    document.writeln("<embed src='" + src + "' quality='high' wmode='" + mode + "' ");
    document.writeln("type='application/x-shockwave-flash' ");
    document.writeln("pluginspage='http://www.macromedia.com/shockwave/download/index.cgi");
    document.writeln("?p1_prod_version=shockwaveflash' width=" + width + " height=" + height + ">");
    document.writeln("</embed>");
    document.writeln("</object>");
}

// write document contents
function print(src){
  //document.write(src);
}

<!--
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

function bgm_off() {
	var temp_img_name = document.images["btn_bgm"].src;
	var current_img_name = temp_img_name.split("/");
	if (current_img_name[5]=="btn_bgm_off.gif")
	{
		document.images["btn_bgm"].src = "/img/common/btn_bgm_on.gif";
		parent.hidden.location="/nobgm.html";
	} else {
		document.images["btn_bgm"].src = "/img/common/btn_bgm_off.gif";
		parent.hidden.location="/bgm.html";
	}
}

// png24 핵 
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 go_topmenu(main)
{
	// 탑메뉴 클릭 시, 넘어오는 값으로
	// 이 함수를 호출합니다.
	
	if(main==1) goUrl = '/001/c01_01.php';				// 미소사랑치과
	else if(main==2) goUrl = '/002/c01_01.php';			// 임플란트클리닉
	else if(main==3) goUrl = '/003/c01_01.php';			// 치아미백
	else if(main==4) goUrl = '/004/c01_01.php';			// 치아성형
	else if(main==5) goUrl = '/005/c01_01.php';			// 레이저클리닉
	else if(main==6) goUrl = '/006/c01_01.php';			// 일반클리닉
	else if(main==7) goUrl = '/007/c01_01.php';			// 치료사례
	else if(main==8) goUrl = '/008/c01_01.php';			// 상담및예약
	else if(main==9) goUrl = '/009/c01_01.php';			// 상담및예약
	else if(main==10) goUrl = '/010/c01_01.php';			// 상담및예약
	location.href = goUrl;
}



function go_menu(main)
{
	//	main 안에 1,1 혹은 1,2 등 다 넘어오도록 변경되었습니다.
	//	그렇기에 여기서는 , 를 기준으로 자르는 작업이 필요하게 되었습니다.

	var menu_index = main.split(",");	
    var goUrl;





// 00. 메인페이지
	if (menu_index[0] == 0)
    {
		if(menu_index[1]==1) goUrl = '/main/main.php';
    }
	
// 01. 병원소개
	else if (menu_index[0] == 1)
    {
      if(menu_index[1]==1) goUrl = '/001/c01_01.php';			// 치과소개
      else if(menu_index[1]==2) goUrl = '/001/c02_01.php';		// 진료이념/진료특징
	  else if(menu_index[1]==3) goUrl = '/001/c03_01.php';		// 의료진소개
	  else if(menu_index[1]==4) goUrl = '/001/c04_01.php';		// 진료안내/진료과정
	  else if(menu_index[1]==5) goUrl = '/001/c05_01.php';		// 첨단장비안내
	  else if(menu_index[1]==6) goUrl = '/001/c06_01.php';		// 고객만족서비스
	  else if(menu_index[1]==7) goUrl = '/001/c07_01.php';		// 클린시스템
	  else if(menu_index[1]==8) goUrl = '/001/c08_01.php';		// 내부미리보기
	  else if(menu_index[1]==9) goUrl = '/001/c09_01.php';		// 오시는길
    }

// 02. 가슴
    else if (menu_index[0] == 2)
    {
      if(menu_index[1]==1) goUrl = '/002/c01_01.php';			// 임플란트란?
	  else if(menu_index[1]==2) goUrl = '/002/c02_01.php';		// 무절개임플란트
	  else if(menu_index[1]==3) goUrl = '/002/c03_01.php';		// 4주임플란트
      else if(menu_index[1]==4) goUrl = '/002/c04_01.php';		// 발치즉시임플란트
	  else if(menu_index[1]==5) goUrl = '/002/c05_01.php';		// 골이식임플란트
	  else if(menu_index[1]==6) goUrl = '/002/c06_01.php';		// 심미임플란트
	  else if(menu_index[1]==7) goUrl = '/002/c07_01.php';		// 임플란트틀니
	  else if(menu_index[1]==8) goUrl = '/002/c08_01.php';		// 임플란트 QnA

	}

// 03. 코
    else if (menu_index[0] == 3)
    {
      if(menu_index[1]==1) goUrl = '/003/c01_01.php';			// 치아미백
	   else if(menu_index[1]==2) goUrl = '/003/c02_01.php';		// 미백시스템소개
	   else if(menu_index[1]==3) goUrl = '/003/c03_01.php';		// 치료과정
	   else if(menu_index[1]==4) goUrl = '/003/c04_01.php';		// 치료전후
	   else if(menu_index[1]==5) goUrl = '/003/c05_01.php';		// 치료전후
	   else if(menu_index[1]==6) goUrl = '/003/c06_01.php';		// 치료전후
	   
	   /* 야매추가 */
	   else if(menu_index[1]==7) goUrl = '/003/c01_01.php';		// 치료전후 
	   else if(menu_index[1]==8) goUrl = '/003/c05_01.php';		// 치료전후 
	   else if(menu_index[1]==9) goUrl = '/003/c03_01.php';		// 치료전후 

	  
	}

// 04. 여유증
    else if (menu_index[0] == 4)
    {
      if(menu_index[1]==1) goUrl = '/004/c01_01.php';			// 라미네이트
	   else if(menu_index[1]==2) goUrl = '/004/c02_01.php';		//  올세라믹
	   else if(menu_index[1]==3) goUrl = '/004/c03_01.php';		// 잇몸성형
	   
	   /* 야매추가 */
	   else if(menu_index[1]==4) goUrl = '/004/c02_01.php';		// 잇몸성형
	   else if(menu_index[1]==5) goUrl = '/004/c02_01.php';		// 잇몸성형

    }
	
// 05. 페이스
    else if (menu_index[0] == 5)
    {
      if(menu_index[1]==1) goUrl = '/005/c01_01.php';			// 물방울레이저
	  else if(menu_index[1]==2) goUrl = '/005/c02_01.php';		// 다이오드레이저
	  else if(menu_index[1]==3) goUrl = '/005/c03_01.php';		// CO2레이저
	  else if(menu_index[1]==4) goUrl = '/005/c04_01.php';		// CO2레이저
	  else if(menu_index[1]==5) goUrl = '/005/c05_01.php';		// CO2레이저 
	  else if(menu_index[1]==6) goUrl = '/005/c06_01.php';		// CO2레이저 
	  
	  /* 야매추가 */
	  else if(menu_index[1]==7) goUrl = '/005/c01_01.php';		// CO2레이저 
	  else if(menu_index[1]==8) goUrl = '/005/c02_01.php';		// CO2레이저 
	  else if(menu_index[1]==9) goUrl = '/005/c05_01.php';		// CO2레이저 
    }
	
	
// 06. 쁘띠
    else if (menu_index[0] == 6)
    {
      if(menu_index[1]==1) goUrl = '/006/c01_01.php';			// 보존클리닉
	  else if(menu_index[1]==2) goUrl = '/006/c02_01.php';		// 보철클리닉
	  else if(menu_index[1]==3) goUrl = '/006/c03_01.php';		// 일반클리닉
	  else if(menu_index[1]==4) goUrl = '/006/c04_01.php';		// 치주클리닉
	  else if(menu_index[1]==5) goUrl = '/006/c05_01.php';		// 소아클리닉
	  
	  /* 야매추가 */
	  else if(menu_index[1]==6) goUrl = '/006/c02_02.php';		// 쁘띠클리닉	
	  else if(menu_index[1]==7) goUrl = '/006/c02_05.php';		// 쁘띠클리닉
	  else if(menu_index[1]==8) goUrl = '/006/c02_04.php';		// 쁘띠클리닉
    }
	
// 07.치료사례
    else if (menu_index[0] == 7)
    {
      if(menu_index[1]==1) goUrl = '/007/c01_01.php';			// 임플란트
	  else if(menu_index[1]==2) goUrl = '/007/c02_01.php';		// 치아성형
	  else if(menu_index[1]==3) goUrl = '/007/c03_01.php';		// 치아미백
	  
	  /* 야매추가 */
	  else if(menu_index[1]==4) goUrl = '/007/c04_01.php';		// 쁘띠클리닉	
	  else if(menu_index[1]==5) goUrl = '/007/c05_01.php';		// 쁘띠클리닉
	  else if(menu_index[1]==6) goUrl = '/007/c06_01.php';		// 쁘띠클리닉
	  else if(menu_index[1]==7) goUrl = '/007/c07_01.php';		// 쁘띠클리닉
	  else if(menu_index[1]==8) goUrl = '/007/c08_01.php';		// 쁘띠클리닉	  
    }	
	
// 08. 상담및예약
   else if (menu_index[0] == 8)
    {
      if(menu_index[1]==1) goUrl = '/008/c01_01.php';			// 공개상담실
	  else if(menu_index[1]==2) goUrl = '/008/c02_01.php';		// 비공개상담실
	  else if(menu_index[1]==3) goUrl = '/008/c03_01.php';		// 온라인예약
	  else if(menu_index[1]==4) goUrl = '/008/c04_01.php';		// 치료후기
	  else if(menu_index[1]==5) goUrl = '/008/c05_01.php';		// 고맙습니다
	  else if(menu_index[1]==6) goUrl = '/008/c06_01.php';		// 공지사항	 
	  else if(menu_index[1]==7) goUrl = '/008/c07_01.php';		// 공지사항	  
    }		


// 09. 상담및예약
   else if (menu_index[0] == 9)
    {
      if(menu_index[1]==1) goUrl = '/009/c01_01.php';			// 공개상담실
	  else if(menu_index[1]==2) goUrl = '/009/c02_01.php';		// 비공개상담실
	  else if(menu_index[1]==3) goUrl = '/009/c03_01.php';		// 온라인예약
	  else if(menu_index[1]==4) goUrl = '/009/c04_01.php';		// 치료후기
	  else if(menu_index[1]==5) goUrl = '/009/c05_01.php';		// 고맙습니다
	  else if(menu_index[1]==6) goUrl = '/009/c06_01.php';		// 공지사항	
	  else if(menu_index[1]==7) goUrl = '/009/c07_01.php';		// FAQ
    }		

// 10. 상담및예약
   else if (menu_index[0] == 10)
    {
      if(menu_index[1]==1) goUrl = '/010/c01_01.php';			// 공개상담실
	  else if(menu_index[1]==2) goUrl = '/010/c02_01.php';		// 비공개상담실
	  else if(menu_index[1]==3) goUrl = '/010/c03_01.php';		// 온라인예약
	  else if(menu_index[1]==4) goUrl = '/010/c04_01.php';		// 치료후기
	  else if(menu_index[1]==5) goUrl = '/010/c05_01.php';		// 고맙습니다
	  else if(menu_index[1]==6) goUrl = '/010/c06_01.php';		// 공지사항	  
    }		



// 16.  멤버쉽
	else if (menu_index[0] == 11)
    {
	  if(menu_index[1]==1) goUrl = '/member/c01_01.php';		// 로그인
	  else if(menu_index[1]==2) goUrl = '/member/c02_01.php';	// 회원가입
	  else if(menu_index[1]==3) goUrl = '/member/c03_01.php';	// 아이디/비번찾기	  
	  else if(menu_index[1]==4) goUrl = '/member/c04_01.php';	// 개인정보취급방침
	  else if(menu_index[1]==5) goUrl = '/member/c06_01.php';	// 정보수정
	  else if(menu_index[1]==6) goUrl = '/member/c07_01.php';	// 회원탈퇴
	  else if(menu_index[1]==7) goUrl = '/cix/member/logout.php';	// 로그아웃	  
    }
	
	
// 13.  이용안내
	else if (menu_index[0] == 12)
    {
	  if(menu_index[1]==1) goUrl = '/user/c01_01.php';		// 사이트맵
	  else if(menu_index[1]==2) goUrl = '/user/c02_01.php';	// 이메일무단수집거부
    }


// 11. 기타
	else if (menu_index[0] == 12)
    {
	  if(menu_index[1]==1) goUrl = '/crmadmin.php';			// 관리자
	  else if(menu_index[1]==2) goUrl = '#';		// spacing
      else if(menu_index[1]==3) {
		 popup_selftest(); 
		 goUrl = '#';
	  }//goUrl = 'http://emedis.goodicon.kr/007/c01_01.php?unit_page=10&mode=view&forum_id=notice&s_cate1=&s_cate2=&s_cate3=&keyfield=&key=&number=2239&page=1';		// 캠페인진행
    }	

	location.href = goUrl;
	//window.open(goUrl,'','');
  }
  
  
  
  // 메뉴를 제외한 링크
  function etc_menu(main)
  {
	  var menu_flag = main.split(",");	
	  var link_url = "";
	  
	  /*
	  	콤마 앞에 거는 메뉴를 뜻함
		콤마 뒤에 거는 새창/셀프/부모창 등을 뜻함.
	  */
	  
	  
	  switch (menu_flag[0])
	  {
			case "admin":
		  		link_url = "/cix/admin/";
				break;

			case "rejection":
				link_url = "/user/c02_01.php";
				break;
						
			case "blog":
		  		link_url = "http://blog.naver.com/miso2820";	//네이버 블로그
				break;
						
			case "cyworld":
		  		link_url = "#";	//싸이월드
				break;	
					
			case "goodicon":
		  		link_url = "http://www.goodicon.kr/";	// 좋은아이콘
				break;
		 
			case "banner1":
		  		link_url = "http://www.kapd.org/";	// 
				break;
		 
			case "banner2":
		  		link_url = "http://www.kda.or.kr/kda/";	// 
				break;
		 
			case "banner3":
		  		link_url = "https://www1.pnuh.co.kr/default.html";	// 
				break;
		 
			case "banner4":
		  		link_url = "";	// 
				break;
		 
			case "banner5":
		  		link_url = "";	// 
				break;
		 
			case "banner6":
		  		link_url = "";	// 
				break;
		 
			case "banner7":
		  		link_url = "";	// 
				break;
		 
			case "banner8":
		  		link_url = "";	// 
				break;
			
			case "Favorites":
				link_url = "#";
				window.external.AddFavorite('http://www.childlang.com', '우리아이 예쁜치아 이금랑어린이치과');
				break;
	  }
	  
	  if (menu_flag[1] == "blank") {

		  window.open(link_url,'_admin')		  
	  } else {
		  location.href=link_url;		  
	  }
  }

// 이메일무단수집거부
  function rejection()
  {
	// 팝업 띄우기.
//	alert("이메일 무단 수집을 거부합니다.");
	window.open('/member/mem_email.htm','','width=400, height=400')
  }
  
  
  // 치아미백 셀프테스트
  function popup_selftest()
  {
	  window.open('/004/self_test.html','','width=1000, height=500')	  
  }

  
   // 약력신청
  function popup_application(flag)
  {
	  window.open('/001/email.php?flag='+flag,'','width=400, height=250')	  
  }

  // 프로모션 동영상 팝업 띄우기
  function go_promotion()
  {
	this.document.all["LayerPopup_movie1"].style.visibility = "visible";
	var myplayer = document.getElementById("myplayer"); 
	myplayer.play();
  }


//-->


<!-- 

function ShowTab(val){ 
  for (i=0; i<6; i++) { 
  var tb = document.getElementById('tab_' + i); 
  if (i != val) tb.style.display = "none"; 
  else tb.style.display = "block"; 
  } 
} 


obj_old = null;
function show_list(obj){
	if(obj_old != null)	{
		if(obj.id != obj_old.id){
			change_old()
		}
	}
	if (obj.style.display == "" || obj.style.display == "show")	{
		obj.style.display = "none";
	} else if (obj.style.display == "none")	{
		obj.style.display = "";
	}
	obj_old = obj;
}

function change_old(){
	obj_old.style.display = "none";
}

function popup_wmv(path, w, h) {
	var winl = (screen.width - w) / 2; 
	var wint = (screen.height - h) / 2; 
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
	w=open(path,'movie',winprops);
	w.focus();
}
//--> 

