var curPanel;
curPanel=1;

function act(imgName) {
	document[imgName].src = eval(imgName + "on.src");
}

function unact(imgName) {
	document[imgName].src = eval(imgName + "off.src");
}

function openIt(url, name, w, h)
{
	window.open(url, name, 'width='+w+',height='+h+',resizable=yes,scrollbars=yes');
}

function openVOD(movie, tp, sp, num)
{
	window.open('http://www.movist.com/multi/view.asp?mid='+movie+'&tp='+tp+'&sp='+sp+'&num='+num, 'VOD', 'width=502,height=480,resizable=no,scrollbars=no');
}

function openWindow(url, name)
{
	window.open(url, name, 'width=780,height=750,resizable=yes,scrollbars=yes');
}

function viewGallery(movie, tp, num)
{
	openIt('http://www.movist.com/movies/viewgallery.asp?mid='+movie+'&tp='+tp+'&num='+num, 'vg', '850', '700');
}

function check()
{
	if (curPanel==1)
	{
		var search_what = document.f_search.f_text.value;
		if (search_what=="" || search_what==" ")
		{
			alert("[ DVASE ]\n°Ë»öÇÏ½Ç ¹®ÀÚ¿­À» ÀÔ·ÂÇÏ¼¼¿ä");
			document.f_search.f_text.focus();
			return;
		}
	}


	switch (curPanel)
	{
		case "1" : document.f_search.action="/cinema/search_title.asp"; break;
		case "2" : document.f_search.action="/cinema/search_genre.asp?n1=" + document.f_search.f_genre.options[document.f_search.f_genre.selectedIndex].value; break;
		case "3" : document.f_search.action="/cinema/search_country.asp?n1=" + document.f_search.f_country.options[document.f_search.f_country.selectedIndex].value; break;
		case "4" : document.f_search.action="/cinema/search_makeyear.asp?year=" + document.f_search.f_myear.value; break;
		case "5" : document.f_search.action="/cinema/search_opendate.asp?year=" + document.f_search.f_oyear.value + "&month=" + document.f_search.f_omonth.options[document.f_search.f_omonth.selectedIndex].value; break;
	}

	document.f_search.submit();
}


function check_email(bReturn)
{
	var email = document.f_mz.f_email.value;
	var Options = "toolbar=0,location=0,top=100,left=100,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,width=300,height=350" ;
	var pos_http = email.indexOf("http:", 0);
	var pos_at = email.indexOf("@", 0);
	var pos_p = email.indexOf(".", pos_at);

	if (email.length == 0)
	{
		alert("[DVASE]\nE-Mail ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		document.f_mz.f_email.focus();
	}
	else if (pos_http > 0)
	{
		alert("[DVASE]\nE-Mail ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.f_mz.f_email.focus();
	}
	else if (pos_at <= 0)
	{
		alert("[DVASE]\nE-Mail ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.f_mz.f_email.focus();
	}
	else if (pos_p <= 0)
	{
		alert("[DVASE]\nE-Mail ÁÖ¼Ò°¡ ¿Ã¹Ù¸£Áö ¾Ê½À´Ï´Ù.");
		document.f_mz.f_email.focus();
	}
	else
	{
		document.f_mz.f_email.value="";
		var Url = "http://211.35.73.72:1999/mz.asp?email=" + email;
		var win = open(Url, "subscribe_mailzine", Options);
		if(!win.focus) win.focus();
	}

	if (bReturn == true) return false;
}

function showPanel(num)
{
	switch (num)
	{
		case "title"	: document.f_search.title.value = "¿µÈ­Á¦¸ñ"; break;
		case "keyword"	: document.f_search.title.value = "DVD Å¸ÀÌÆ²"; break;
		case "name" 	: document.f_search.title.value = "¿µÈ­ÀÎ ÀÌ¸§"; break;
		case "theater"	: document.f_search.title.value = "±ØÀåÀÌ¸§"; break;
		case "article"	: document.f_search.title.value = "°Ë»öÇÒ Å°¿öµå"; break;
	}
}

function check_msearch(bReturn)
{
	if (document.f_search.title.value=="")
	{
		alert("[DVASE]\n°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		document.f_search.title.focus();
	}
	else
	{
		switch (document.f_search.tp.value)
		{
			case "title" :
				document.f_search.action = "http://www.movist.com/movies/search.asp";
				document.f_search.method = "post";
				break;

			case "keyword" :
				document.f_search.action = "http://www.dvase.com/shop/search.asp";
				document.f_search.method = "get";
				break;

			case "name" :
				document.f_search.action = "http://www.movist.com/movies/search2.asp";
				document.f_search.method = "get";
				break;

			case "article" :
				document.f_search.action = "http://www.movist.com/focus/search.asp";
				document.f_search.method = "get";
				break;

			case "theater" :
				document.f_search.action = "http://www.movist.com/ticketing/search.asp";
				document.f_search.method = "get";
				break;
		}

		document.f_search.submit();
	}

	if (bReturn == true) return false;
}


function check_asearch(bReturn)
{
	if (document.f_asearch.title.value=="")
	{
		alert("[DVASE]\n°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		document.f_asearch.title.focus();
	}
	else
		document.f_asearch.submit();

	if (bReturn == true) return false;
}
/* ¸Þ´º ¹öÆ°Ãß°¡½Ã ¾Æ·¡ Ç×¸ñÁß for "(i=0 ; i<=8 ; i ++)" ºÎºÐÀÇ i<=8 ºÎ´«À»  ¼öÁ¤ÈÄ Ãß°¡ ÇÏ±â ¹Ù¶ø´Ï´Ù.*/
function showMenu(num)
{
	for (i=0 ; i<=6 ; i ++)
		document.all["menu"+i].style.display = 'none';


	document.all["menu"+num].style.display = '';
	curMenu = num;
}
/* ¸Þ´º ¹öÆ°Ãß°¡½Ã ¾Æ·¡ Ç×¸ñÁß for "(i=0 ; i<=8 ; i ++)" ºÎºÐÀÇ i<=8 ºÎ´«À»  ¼öÁ¤ÈÄ Ãß°¡ ÇÏ±â ¹Ù¶ø´Ï´Ù.*/
function hideMenu(num)
{
	for (i=0 ; i<=6 ; i ++)
		document.all["menu"+i].style.display = 'none';

	document.all["menu"+thisMenu].style.display = '';
}

function actMenu(num)
{
	if (curMenu!=thisMenu)
		unactMenu(curMenu);

	act('img'+num);
	showMenu(num);

	if (timer_id!=0)
		window.clearTimeout(timer_id);

	timer_id = window.setTimeout('unactMenu(' + num + ');', 300000); /* Rollover ¼­ºê¸Þ´º ½Ã°£ Á¶Á¤. ¹Ð¸®ÃÊ·Î ¼³Á¤ (10000=10ÃÊ)*/
}

function unactMenu(num)
{
	unact('img'+num);
	hideMenu(num);
}
/* ¸Þ´º¹Ù  ¹öÆ°ÀÌ¹ÌÁö, Rollover ÀÌ¹ÌÁö Ãß°¡  */
img0on = new Image();	img0off = new Image();
img1on = new Image();	img1off = new Image();
img2on = new Image();	img2off = new Image();
img3on = new Image();	img3off = new Image();
img4on = new Image();	img4off = new Image();
img5on = new Image();	img5off = new Image();
img6on = new Image();	img6off = new Image();

