

//롤오버 스크립트

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_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_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];}

}

//



// 새창띄우기

function openwin(theURL,winName,features) { 

  window.open(theURL,winName,features);

}
//



//플래시 

var EmbedStr = "";



function GetFlash(url,x,y) { 

	EmbedStr = "<object id='flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='" + x + "' height='" + y + "'>";

	EmbedStr += "<param name='allowScriptAccess' value='sameDomain' />";

	EmbedStr += "<param name='movie' value='" + url + "' />";

	EmbedStr += "<param name='quality' value='high' />";

	EmbedStr += "<param name='bgcolor' value='#ffffff' />";

	EmbedStr += "<param name='wmode' value='transparent' />";

	EmbedStr += "<embed src='" + url + "' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + x + "' height='" + y + "' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";

	EmbedStr += "</object>";

	

	document.write(EmbedStr);

	return;

}

//



// 퀵메뉴

function getPosition(){
	var start, end, scale, term, doc, body;
	doc = document.documentElement, body = document.body;
	start = parseInt (document.getElementById('quickBox').style.top, 0);
	end = (doc && doc.scrollTop || body && body.scrollTop) + 70;
	term = 1;

	if ( start != end ) {
		scale = Math.ceil( Math.abs( end - start ) / 20 );
		if ( end < start ) scale = -scale;
		document.getElementById('quickBox').style.top = parseInt (document.getElementById('quickBox').style.top, 0)+ scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}

function moveBanner() {
	if (!document.getElementById('quickBox')) return false;
	document.getElementById('quickBox').style.top = document.documentElement.scrollTop + 500 + "px"; //숫자가 같으면 슬라이드 없다.
	getPosition();
	return true;
}







//png코딩



    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 MM_jumpMenu(URL){ //v3.0

  if(URL!="") {

    window.open(URL);

  }

}

//


//풀다운메뉴
function menu(formname) {
var target='_blank' // 타겟
if (formname.value==''){
alert ("메뉴를 선택해주세요."); // 메뉴를 선택하지않고 버튼 클릭시 이벤트
}
else {
window.open(document.flink.url.value,target);
// 새창 옵션
// width : 폭
// height : 높이
// status : 상태바
// toolbar : 도구모음
// resizable : 최대화단추
// scrollbars : 스크롤바
document.flink.url.selectedIndex=0; // 새창을 띄우고 풀다운메뉴 선택해제
}
}
//


//탭(다중)공지사항

//퀵 - 진료시간
  function showTime(show){
				if(show == "1"){
					btn_time1.style.display = '';
					btn_time2.style.display = 'none';


				}else if(show == "2"){
					btn_time1.style.display = 'none';
					btn_time2.style.display = '';

				}
			}

//퀵 - 카카오톡상담
  function showKakao(show){
				if(show == "1"){
					btn_kakao1.style.display = '';
					btn_kakao2.style.display = 'none';


				}else if(show == "2"){
					btn_kakao1.style.display = 'none';
					btn_kakao2.style.display = '';

				}
			}

//메인 - 프로모션
  function showPR(show){
				if(show == "1"){
					PR1.style.display = '';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "2"){
					PR1.style.display = 'none';
					PR2.style.display = '';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "3"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = '';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "4"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = '';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "5"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = '';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "6"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = '';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "7"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = '';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "8"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = '';
					PR9.style.display = 'none';
					PR10.style.display = 'none';

				}else if(show == "9"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = '';
					PR10.style.display = 'none';

				}else if(show == "10"){
					PR1.style.display = 'none';
					PR2.style.display = 'none';
					PR3.style.display = 'none';
					PR4.style.display = 'none';
					PR5.style.display = 'none';
					PR6.style.display = 'none';
					PR7.style.display = 'none';
					PR8.style.display = 'none';
					PR9.style.display = 'none';
					PR10.style.display = 'none';
				}
			}

// 서브 - 하단게시판
  function showBoard(show){
				if(show == "1"){
					board1.style.display = '';
					board2.style.display = 'none';
					board3.style.display = 'none';

				}else if(show == "2"){
					board1.style.display = 'none';
					board2.style.display = '';
					board3.style.display = 'none';

				}else if(show == "3"){
					board1.style.display = 'none';
					board2.style.display = 'none';
					board3.style.display = '';
				}
			}

//


//즐겨찾기추가

function myFavorite(){ 

window.external.AddFavorite('http://eagleeyedshop.3way.co.kr/', '[이글아이드골프화]') 

} 

 
//



//이북

  function show(url,_width,_height) 

	{ 

		if(window.clientInformation.userAgent.indexOf("SV1")>0){ //--WindowXP SP2가 설치된 환경에서의 세팅입니다. 

			newWin = window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top=0 left=0"); 

			newWin.moveTo(0,0); 

			left1=(screen.availWidth-1024-5)/2; //--1024X768 해상도의 모니터에서 나타나는 eBook Popup 창의 가로 중앙 위치를 지정합니다. 

			top1=(screen.availHeight-768-10)/2; //--1024X768 해상도의 모니터에서 나타나는 eBook Popup 창의 세로 중앙 위치를 지정합니다. 

			//위 1024, 768 의 조정으로 창이 나타나는 위치를 조정할 수 있습니다. 



			newWin.resizeTo(1024,768); 

			newWin.moveTo(left1,top1); 

		}

		else{ //--Windows XP SP2 가 설치된 환경을 제외한 환경에서의 세팅입니다. 

			if(screen.width==_width&&screen.height==_height) { 

				window.open(url,"","fullscreen"); 

			} 

			else { 

				left1=(screen.availWidth-1024-5)/2; 

				top1=(screen.availHeight-768-10)/2; 

				window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top="+top1+" left="+left1); 

			} 

		} 

	} 




// SNS 버튼

function sns_sms(msg){
	var href = "/oneday/sms_send.php?msg=" + msg;
	window.open(href, 'sns_sms', 'width=440,height=400,top=100,left=100');
}

function sns_facebook(msg,url){
	var href = "http://www.facebook.com/sharer.php?u=" + url + "&t=" + encodeURIComponent(msg);
	window.open(href, 'facebook', '');
}
function sns_twitter(msg,url){
	var href = "http://twitter.com/home?status=" + encodeURIComponent(msg) + " " + encodeURIComponent(url);
	window.open(href, 'twitter', '');
}

function sns_me2day(msg,url,tag){
	var href = "http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(msg) + " " + encodeURIComponent(url)
	+ "&new_post[tags]=" + encodeURIComponent(tag);
	window.open(href, 'me2day', '');
}
function goYozmDaum(link,prefix,parameter){
	var href = "http://yozm.daum.net/api/popup/prePost?link=" + encodeURIComponent(link) + "&prefix=" + encodeURIComponent(prefix) + "&parameter=" + encodeURIComponent(parameter);
	var a = window.open(href, 'yozmSend', 'width=466, height=356');
	if ( a ) {
		a.focus();
	}
}
function sns_email(msg){
	   var url = "/oneday/send_email.php?msg=" + msg;
	   window.open(url,"sendEmail","height=620, width=700, menubar=no, scrollbars=yes, resizable=no, toolbar=no, status=no, top=100, left=100");
}

function sns_cyworld(msg,url,tag){
	var href="http://csp.cyworld.com/bi/bi_recommend_pop.php?url="+encodeURIComponent(url)+"&summery="+encodeURIComponent(msg)+"&writer=";
	window.open(href, 'me2day', 'width=400,height=364,scrollbars=no,resizable=no');
}

