var root_o = "http://www.ymedi.com"
var root_s = "https://www.ymedi.com:446"

function main()			{window.location = root_o + "/";}

function ab()			{window.location = root_o + "/ab/ab01.asp";}//°ËÁø¼¾ÅÍ¼Ò°³
function ab01()			{window.location = root_o + "/ab/ab01.asp";}//ÀÎ»ç¸»
function ab02()			{window.location = root_o + "/ab/ab02.asp";}//¿ì¸® ¼¾ÅÍ¸¸ÀÇ Æ¯º°ÇÔ
function ab03()			{window.location = root_o + "/ab/ab03.asp";}//ÃÖÃ·´Ü °ËÁø ½Ã½ºÅÛ
function ab04()			{window.location = root_o + "/ab/ab04.asp";}//¹ÏÀ» ¼ö ÀÖ´Â ÀÇ·áÁø
function ab05()			{window.location = root_o + "/ab/ab05.asp";}//¿øµ¥ÀÌ ¿ø½ºÅé
function ab06()			{window.location = root_o + "/ab/ab06.asp";}//After care
function ab07()			{window.location = root_o + "/ab/ab07.asp";}//¼¾ÅÍ¹Ì¸®º¸±â
function ab08()			{window.location = root_o + "/ab/ab08.asp";}//What's news
function ab09()			{window.location = root_o + "/ab/ab09.asp";}//Ã£¾Æ¿À½Ã´Â±æ
function ab10()			{window.location = root_o + "/ab/ab10.asp";}//ÁÖ¿äÀüÈ­¹øÈ£ ¾È³»
function ab11()			{window.location = root_o + "/ab/ab11.asp";}//»çÀÌÆ®¸Ê

function info()			{window.location = root_o + "/info/info01.asp";}//Á¾ÇÕ°ËÁø ¾È³»
function info01()		{window.location = root_o + "/info/info01.asp";}//ÇÁ·Î±×·¥ ¾È³»
function info02()		{window.location = root_o + "/info/info02.asp";}//°ËÁø¼ø¼­µµ
function info03()		{window.location = root_o + "/info/info03.asp";}//Á¾ÇÕ°ËÁø À¯ÀÇ»çÇ×
function info04()		{window.location = root_o + "/info/info04.asp";}//°Ë»ç¾È³»

function my()			{window.location = root_o + "/my/my01.asp";}//My chart
function my01()			{window.location = root_o + "/my/my01.asp";}//¿¹¾à ¹× °á°ú¾È³»
function my02()			{window.location = root_o + "/my/rsv_select.asp";}//¿¹¾à½ÅÃ»
function my03()			{window.location = root_o + "/my/rsv_confirm.asp";}//¿¹¾àÈ®ÀÎ
function my04()			{window.location = root_o + "/my/result/choice.asp";}//°ËÁø°á°úº¸±â

function vod()			{window.location = root_o + "/vod/vod01.asp";}//°ËÁø Ã¼Çè µ¿¿µ»ó
//function vod()			{window.location = "javascript:alert('ÆäÀÌÁö¸¦ ÁØºñÁßÀÔ´Ï´Ù.');";}//°ËÁø Ã¼Çè µ¿¿µ»ó
function vod01()		{window.location = root_o + "/vod/vod01.asp";}//È¿µµ°ËÁø
//function vod01()		{window.location = "javascript:alert('ÆäÀÌÁö¸¦ ÁØºñÁßÀÔ´Ï´Ù.');";}//È¿µµ°ËÁø
function vod02()		{window.location = root_o + "/vod/vod02.asp";}//Ã»¼Ò³â°ËÁø
//function vod02()		{window.location = "javascript:alert('ÆäÀÌÁö¸¦ ÁØºñÁßÀÔ´Ï´Ù.');";}//Ã»¼Ò³â°ËÁø
function vod03()		{window.location = root_o + "/vod/vod03.asp";}//ºñÅ¸¹Î ÃÔ¿µ µ¿¿µ»ó

function vt()			{window.location = root_o + "/vt/vt01.asp";}//ºñÅ¸¹ÎÁ¤º¸
function vt01()			{window.location = root_o + "/vt/vt01.asp";}//ºñÅ¸¹Î¼Ò½Ä
function vt02()			{window.location = root_o + "/vt/vt02.asp";}//À§´ëÇÑ¹ä»ó
function vt03()			{window.location = root_o + "/vt/vt03.asp";}//ºñÅ¸¹Î¹æ¼Û

function cs()			{window.location = root_o + "/cs/cs01.asp";}//¼öÁøÀÚÄÚ³Ê
function cs01()			{window.location = root_o + "/cs/cs01.asp";}//ÀÚÁÖÇÏ´ÂÁú¹®
function cs02()			{window.location = root_o + "/cs/cs02.asp";}//°Ç°­»ó´ã
function cs03()			{window.location = root_o + "/cs/cs03.asp";}//°Ç°­Á¤º¸
function cs04()			{window.location = root_o + "/cs/cs04.asp";}//½ÅÃ»,¹ß±Þ¾È³»
function cs05()			{window.location = root_o + "/cs/poll.asp";}//¸¸Á·µµ ¼³¹®Á¶»ç

function mb01()			{window.location = root_s + "/mb/login.asp?prevURL=/mb/login.asp";}//È¸¿ø·Î±×ÀÎ
function mb02()			{window.location = root_s + "/mb/join.asp";}//È¸¿ø°¡ÀÔ
function mb03()			{window.location = root_s + "/mb/find.asp";}//¾ÆÀÌµð/ºñ¹Ð¹øÈ£Ã£±â

function down()			{window.location = "javascript:openCenterWindow('/popup/down/down.html','newCenter','407','295')"; } //¹®ÁøÇ¥´Ù¿î·Îµå
function layerpop()		{window.location = root_o + "/ab/ab08_v.asp?seq=2086&page=1&cond1=title&cond2=";}//¸ÞÀÎ·¹ÀÌ¾îÆË¾÷
function layerpop2()	{window.location = root_o + "/ab/ab08_v.asp?seq=2085&page=1&cond1=title&cond2=";}
function layerpop4()	{window.location = root_o + "/ab/ab08_v.asp?seq=2085&page=1&cond1=title&cond2=";}

function cm01()			{window.location = root_o + "/my/result/out01.asp";}
function cm02()			{window.location = root_o + "/my/result/out02.asp";}
function cm03()			{window.location = root_o + "/my/result/out03.asp";}
function cm04()			{window.location = root_o + "/my/result/out04.asp";}
function cm05()			{window.location = root_o + "/my/result/out05.asp";}
function cm06()			{window.location = root_o + "/my/result/out06.asp";}
function cm07()			{window.location = root_o + "/my/result/out07.asp";}
function cm08()			{window.location = root_o + "/my/result/out08.asp";}
function cm09()			{window.location = root_o + "/my/result/out09.asp";}
function cm10()			{window.location = root_o + "/my/result/out10.asp";}
function cm11()			{window.location = root_o + "/my/result/out11.asp";}

function info2()			{window.location = root_o + "/info2/info01.asp";}//±â¾÷°ËÁø ¾È³»
function info201()			{window.location = root_o + "/info2/info01.asp";}//±â¾÷°ËÁø ¾È³»
function info202()			{window.location = root_o + "/info2/info02.asp";}//±â¾÷°ËÁø ÇÁ·Î±×·¥
function info203()			{window.location = root_o + "/info2/info03.asp";}//±â¾÷°ËÁø Q&A

// flash embed patch
function ShowFlash(url, width, height) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ width +'" height="'+ height +'" VIEWASTEXT>');
	document.write('<param name="movie" value="' + url + '">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<param name="menu" value="false">');
	document.write('<embed src="' + url + '" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'" menu="'+ false +'"></embed>');
	document.write('</object>');
}

// tab menu | À§´ëÇÑ¹ä»ó, ºñÅ¸¹Î¼Ò½Ä
function premier(n) {
	for(var i = 1; i < 3; i++) {
		obj = document.getElementById('premier'+i);
		img = document.getElementById('premier_button'+i);
		if ( n == i ) {
			obj.style.display = "block";
			img.height = 20;
			img.src = "/main/img/tab"+i+"_on.gif";
		} else {
			obj.style.display = "none";
			img.height = 20;
			img.src = "/main/img/tab"+i+"_off.gif";
		}
	}
}
// tab menu | °Ç°­»ó´ã, °Ç°­Ä®·³
function premier2(n) {
	for(var i = 1; i < 3; i++) {
		obj = document.getElementById('premier2'+i);
		img = document.getElementById('premier2_button'+i);
		if ( n == i ) {
			obj.style.display = "block";
			img.height = 20;
			img.src = "/main/img/tab"+i+"_2on.gif";
		} else {
			obj.style.display = "none";
			img.height = 20;
			img.src = "/main/img/tab"+i+"_2off.gif";
		}
	}
}
function Popup(url,w,h,l,t,r,s,p) {
	window.open(url,"win2"+p,"width="+w+",height="+h+",left="+l+",top="+t+",location=0,menubar=0,toolbar=0,directories=0,resizable="+r+",scrollbars="+s);
}
function isEmpty(data) {
	for ( var i = 0 ; i < data.length ; i++ ) {
		if ( data.substring( i, i+1 ) != " " ) {
			return false;
		}
	}
	return true;
}
function NumOnly() {
	if ((event.keyCode < 48) || (event.keyCode > 57)) {
		return false;
	}
}
function doBlink() {
	var blink = document.all.tags("BLINK")
	for (var i=0; i < blink.length; i++)
		blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}
function startBlink() {
	if (document.all)
		setInterval("doBlink()",800)
}

/* Ç³¼±±Û */
var offsetfromcursorX=12
var offsetfromcursorY=10

var offsetdivfrompointerX=10
var offsetdivfrompointerY=14

document.write('<div id="dhtmltooltip"></div>')
document.write('<img id="dhtmlpointer" src="/inc/img/arrow2.gif">') //È­»ìÇ¥ ÀÌ¹ÌÁö

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

function ietruebody() {
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function ddrivetip(thetext, thewidth, thecolor) {
	if (ns6||ie) {
		if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
		if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
		tipobj.innerHTML=thetext
		enabletip=true
		return false
	}
}
function positiontip(e) {
	if (enabletip){
		var nondefaultpos=false
		var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
		var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
		var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
		var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

		var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
		var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

		var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

		if (rightedge<tipobj.offsetWidth) {
			tipobj.style.left=curX-tipobj.offsetWidth+"px"
			nondefaultpos=true
		} else if (curX<leftedge)
			tipobj.style.left="5px"
	else {
		tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
		pointerobj.style.left=curX+offsetfromcursorX+"px"
	}

	if (bottomedge<tipobj.offsetHeight) {
		tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
		nondefaultpos=true
	} else {
		tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
		pointerobj.style.top=curY+offsetfromcursorY+"px"
	}
	tipobj.style.visibility="visible"
	if (!nondefaultpos)
		pointerobj.style.visibility="visible"
	else
		pointerobj.style.visibility="hidden"
	}
}
function hideddrivetip() {
	if (ns6||ie) {
		enabletip=false
		tipobj.style.visibility="hidden"
		pointerobj.style.visibility="hidden"
		tipobj.style.left="-1000px"
		tipobj.style.backgroundColor=''
		tipobj.style.width=''
	}
}
document.onmousemove = positiontip
function changeBox(cbox) {
	box = eval(cbox);
	box.checked = !box.checked;
}
// È­¸é °¡¿îµ¥ ÆË¾÷¶ç¿ì±â
var win = null;
function openCenterWindow(mypage,myname,w,h) {
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',toolbar=no,menubar=no,scrollbars=no,resizable=no';
	win = window.open(mypage,myname,settings)
}

function myFavorite() {					//Áñ°ÜÃ£±â Ãß°¡
window.external.AddFavorite('http://www.ymedi.com', '¿©ÀÇµµÁß¾Ó°ËÁø¼¾ÅÍ')
}
function isHangul(str) {				//ÇÑ±ÛÃ¼Å©
	var re = /[a-zA-Z0-9\s~!@#\$%\^&\*\(\)_\+\{\}|:"<>\?`\-=\[\]\\;',\.\/]/;
	//matches a alphanumeric character or space
	if (re.test(str))
		return false;
	return true;
}
function checkLength(obj, min, max, nullable) {				//±æÀÌ check
	if (!nullable) {
		len = obj.value.length;
		if (len < min || len > max)
			return false;
	}
	return true;
}

//°øÁö·¹ÀÌ¾î
function setCookie( name, value, expiredays ) {
    var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
    }

function closeWin() { //·Ñ¸µ¹è³Ê ÆË¾÷
    if ( document.notice_form.chkbox.checked ){
        setCookie( "maindiv", "done" , 1 );
    }
    document.all['divpop'].style.visibility = "hidden";
}
function closeWin2() { //ºñÅ¸¹Î°ËÁø
    if ( document.notice_form2.chkbox.checked ){
        setCookie( "maindiv2", "done" , 1 );
    }
    document.all['divpop2'].style.visibility = "hidden";
}
function closeWin3() { //¼³¿¬ÈÞ ÈÞ¹«¾È³»
    if ( document.notice_form3.chkbox.checked ){
        setCookie( "maindiv3", "done" , 1 );
    }
    document.all['divpop3'].style.visibility = "hidden";
}
function bt(id,after) {
	eval(id+'.filters.blendTrans.stop();');
	eval(id+'.filters.blendTrans.Apply();');
	eval(id+'.src="'+after+'";');
	eval(id+'.filters.blendTrans.Play();');
}