function bluring(){ 
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus(); 
} 

document.onfocusin=bluring; 

function MM_openBrWindow(theURL,winName,features){
	window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//lay
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; }
}

//input
var n=false;
function Change (target,type) 
{  
       if ( target.value == target.defaultValue && type==0) target.value = ''; 
       if ( !target.value && type==1) target.value = target.defaultValue; 
} 


//이미지 새창 
var win1Open = null 


function displayImage(picName, windowName, windowWidth, windowHeight){ 
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
} 

function winClose(){ 
if(win1Open != null) win1Open.close() 
} 

function doNothing(){} 

function displayImage(picName, windowName, windowWidth, windowHeight){ 
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight) 
if(winHandle != null){ 
var htmlString = "<html><head><title>Picture</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>" 
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=窓閉め></a>" 
htmlString += "</body></html>" 
winHandle.document.open() 
winHandle.document.write(htmlString) 
winHandle.document.close() 
} 
if(winHandle != null) winHandle.focus() 
return winHandle 
} 

// 즐겨찾기 추가
var favoriteurl="http://www.shesps.jp/"
var favoritetitle="she's 成形外科スキンケアクリニック"
function addfavorites(){
if (document.all)
window.external.AddFavorite(favoriteurl,favoritetitle)}

// 폼배경이미지
function 
    clrImg(obj){
        obj.style.backgroundImage="";obj.onkeydown=obj.onmousedown=null;
    }

// 메인 최신글
function ChangeLayer(str) 
{ 
	var table_num = "3";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.latest" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 


// 서브 인기글
function ChangeLayer1(str) 
{ 
	var table_num = "2";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.hot" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 서브 news
function ChangeLayer2(str) 
{ 
	var table_num = "2";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.news" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 서브 쉬즈데이
function Change(str) 
{ 
	var table_num = "4";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.day" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 수술정보
function Change1(str) 
{ 
	var table_num = "4";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.ope" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 수술정보
function Change3(str) 
{ 
	var table_num = "10";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.op" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 수술정보
function Change4(str) 
{ 
	var table_num = "6";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.oper" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 


// 쉬즈뉴스
function Change2(str) 
{ 
	var table_num = "3";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.shesnews" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 수술정보
function Change6(str) 
{ 
	var table_num = "6";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.op" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

// 수술정보
function Change7(str) 
{ 
	var table_num = "7";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.op" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 


function Change33(str) 
{ 
	var table_num = "3";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.op" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

function Change5(str) 
{ 
	var table_num = "5";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.op" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

function Change55(str) 
{ 
	var table_num = "5";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.ope" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 



function Change66(str) 
{ 
	var table_num = "6";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

//		str1 = eval("document.all.ope" + i ); 
		str1 = document.getElementById("ope" + i); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 


function Change22(str) 
{ 
	var table_num = "2";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

		str1 = eval("document.all.ope" + i ); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
}


//  성형비용보기
function Cash(str) 
{ 
	var table_num = "20";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 
		if(i == str){ 
			document.getElementById("cos_type_"+i).style.display = ""; 
			document.getElementById("tab"+i).src = '../images/07counseling/ore'+ i +'_on.gif';
		}else{ 
			document.getElementById("cos_type_"+i).style.display = "none"; 
			document.getElementById("tab"+i).src = '../images/07counseling/ore'+ i +'.gif';
		} 

	} 
} 

//스킨케어비용보기
function SCash(str) 
{ 
	var table_num = "7";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 
		if(i == str){ 
			document.getElementById("cos_type_"+i).style.display = ""; 
			document.getElementById("tab"+i).src = '../images/07counseling/care'+ i +'_on.gif';
		}else{ 
			document.getElementById("cos_type_"+i).style.display = "none"; 
			document.getElementById("tab"+i).src = '../images/07counseling/care'+ i +'.gif';
		} 

	} 
} 



function loginChk(obj){
	 
	var frm = document.frm;

	if(isNull(frm.log_id.value)){
		alert("アイディーを入力してください");
		frm.log_id.focus();
		return;
	}
	if(isNull(frm.log_pwd.value)){
		alert("パスワードを入力してください");
		frm.log_pwd.focus();
		return;
	}

	frm.submit();
}

//특정영역 인쇄
  var win=null;
  function printIt(printThis)  {
    win = window.open();
    self.focus();
    win.document.open();
    win.document.write('<'+'html'+'><'+'head'+'><'+'style'+'>');
    win.document.write('body, td { font-family: Verdana; font-size: 10pt;}');
    win.document.write('<'+'/'+'style'+'><'+'/'+'head'+'><'+'body'+'>');
    win.document.write(printThis);
    win.document.write('<'+'/'+'body'+'><'+'/'+'html'+'>');
    win.document.close();
    win.print();
    win.close();
  }


function adjustImageW(target_img, mmWid) {
	var newX, newY;
	var newHeight, newWidth;
	var newImg;
	var maxWidth = mmWid;
 
	newImg = new Image();
	newImg.src = target_img.src;
	imgw = newImg.width;
	imgh = newImg.height;
 
	if (imgw > maxWidth) {
		newWidth = maxWidth;
 
		target_img.onload = null;
		target_img.src = newImg.src;
		target_img.width = newWidth;
	} else {
		newWidth = imgw;
		newHeight = imgh;
 
		target_img.onload = null;
		target_img.src = newImg.src;
		target_img.width = newWidth;
		target_img.height = newHeight;
	}
}


//메인 뉴스,이벤트
function chgMain(str) 
{ 
	var table_num = "2";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 
		if(i == str){ 
			document.getElementById("mnews_"+i).style.display = ""; 
			document.getElementById("tab"+i).src = '../images/00main/latest'+ i +'_on.gif';
		}else{ 
			document.getElementById("mnews_"+i).style.display = "none"; 
			document.getElementById("tab"+i).src = '../images/00main/latest'+ i +'.gif';
		} 

	} 
} 


//메인 뉴스,이벤트
function rightKey(str) 
{ 
	var table_num = "2";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 
		if(i == str){ 
			document.getElementById("rkey_"+i).style.display = ""; 
			document.getElementById("tabb"+i).src = '../images/00common/tabnews'+ i +'_on.gif';
		}else{ 
			document.getElementById("rkey_"+i).style.display = "none"; 
			document.getElementById("tabb"+i).src = '../images/00common/tabnews'+ i +'.gif';
		} 

	} 
} 


function changeTD(n){

oldNum="";

	if(document.getElementById("item_"+n).style.display==""){
		document.getElementById("item_"+n).style.display="none";
	}else if(document.getElementById("item_"+n).style.display=="none"){
		document.getElementById("item_"+n).style.display="";
	}
 
	if(n != oldNum){
		if(oldNum!=""){
			document.getElementById("item_"+oldNum).style.display="none";
		}
	}
	oldNum=n;
}

// 수술정보
function Change55(str) 
{ 
	var table_num = "5";//div 갯수지정 

	for(i=1; i<=table_num; i++){ 

//		str1 = eval("document.all.ope" + i ); 
		str1 = document.getElementById("ope" + i); 

		if(i == str){ 
		str1.style.display = "block"; 
		//ChangeIMG(i, div_num) 
		}else{ 
			str1.style.display = "none"; 
		} 

	} 
} 

function winOpen(url,w,h,wname,fname) {
	var newWin;

	LP=(screen.width)?(screen.width-w)/2:100;
	TP=(screen.height)?(screen.height-h)/3:100;

	setting = "height="+h+",width="+w+",top="+TP+",left="+LP+",statusbars=no";
	newWin = window.open(url+"?fname="+fname,'',setting);
	newWin.focus();
}

function chk_del() {
	var  conf = confirm("削除しますか?");
	if (conf == true) {
		document.frm.action = "05_del.asp";  
		document.frm.submit();
	}
}

function chk_il() {

	if (document.frm.ok_date.value == "") {
		alert("確定された日付を入力してください.");
		document.frm.ok_date.focus();
		return;
	}
	if (document.frm.ok_time.value == "") {
		alert("確定された日付を入力してください.");
		document.frm.ok_time.focus();
		return;
	}
	document.frm.submit();
}

function overInput(f) {
    f.className = "onInput3";
}

function outInput(f) {
    f.className = "offInput3";
}

function overInput_y(f) {
    f.className = "onInput3_y";
}

function outInput_y(f) {
    f.className = "offInput3_y";
}


function overInput_sub(f) {
    f.className = "onInput3_sub";
}

function outInput_sub(f) {
    f.className = "offInput3_sub";
}

function overInput_y_sub(f) {
    f.className = "onInput3_y_sub";
}

function outInput_y_sub(f) {
    f.className = "offInput3_y_sub";
}
