function toggle(e) {
  for(i=1;i<=20;i++){
 		if(document.getElementById(eval("'q" + i + "'"))) {
			if(e.style.display=="none") document.getElementById(eval("'q" + i + "'")).style.display="none"; 	
		}
 	}	
  if (e.style.display =="") {e.style.display="none";} 
  else {e.style.display="";}
 }
  function toggle3(e) {
  for(i=1;i<=20;i++){
 		if(document.getElementById(eval("'b" + i + "'"))) {
			if(e.style.display=="none") document.getElementById(eval("'b" + i + "'")).style.display="none"; 	
		}
 	}	
  if (e.style.display =="") {e.style.display="none";} 
  else {e.style.display="";}
 }
 
// ·Î±×ÀÎ
function flash_login() {document.location.href = '/util/Login.asp';}
// È¸¿ø°¡ÀÔ
function flash_member_regist() {window.open('http://211.106.171.91:8330/CS/CSMember_Join.asp');}
// ·Î±×¾Æ¿ô
function flash_logout() {document.location.href = '/util/logout.asp';}
// È¸¿øÁ¤º¸¼öÁ¤
function flash_member_edit() {document.location.href = 'http://www.samil-pharm.com/CS/CSMember_Join_Modify.asp';}
// »çÀÌÆ®¸Ê
function flash_sitemap() {document.location.href = '/util/sitemap.html';}
// ¿µ¹®
function flash_eng() {return;window.open('http://eng.samil-pharm.com');}
// ÄÁÅÃ¾î½º
function flash_contactus() {window.open('http://www.samil-pharm.com/util/contact.html','','resizable=no,width=400,height=330');}
//############### »ó´Ü ÇÃ·¡½¬ ¸ÞÀÎ ¸Þ´º
function flash_link(flag){
	if (flag == 10) {document.location.href = '/restasis/sub01_01.html';}
	if (flag == 11) {document.location.href = '/restasis/sub01_01.html';}
	if (flag == 12) {document.location.href = '/restasis/sub02_01.html';}
	if (flag == 13) {false;}
	if (flag == 14) {document.location.href = '/restasis/sub04_site.html';}
	if (flag == 15) {document.location.href = '/restasis/sub04_01.html';}
	if (flag == 20) {document.location.href = '/rumigan/sub01_01.html';}
	if (flag == 21) {document.location.href = '/rumigan/sub01_01.html';}
	if (flag == 22) {document.location.href = '/rumigan/sub02_01.html';}
	if (flag == 23) {false;}
	if (flag == 24) {document.location.href = '/rumigan/sub04_01.html';}
	if (flag == 30) {document.location.href = '/nabak/sub01_01.html';}
	if (flag == 31) {document.location.href = '/nabak/sub01_01.html';}
	if (flag == 32) {document.location.href = '/nabak/sub02_01.html';}
	if (flag == 33) {document.location.href = '/nabak/sub03_01.html';}
	if (flag == 34) {document.location.href = '/nabak/sub04_01.html';}
	if (flag == 40) {document.location.href = '/blephasol/sub01_01.html';}
	if (flag == 41) {document.location.href = '/blephasol/sub01_01.html';}
	if (flag == 42) {false;}
	if (flag == 43) {document.location.href = '/blephasol/sub03_01.html';}
	if (flag == 44) {document.location.href = '/blephasol/sub04_01.html';}
	if (flag == 50) {document.location.href = '/cscenter/sub01_01.html';}
	if (flag == 51) {document.location.href = '/cscenter/sub01_01.html';}
	if (flag == 52) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=72';}
}

//############### ÁÂÃø ÇÃ·¡½¬ ¸Þ´º
// ·¹½ºÅ¸½Ã½º
function flash_left_menu1(flag){
	if (flag == 10) {document.location.href = '/restasis/sub01_01.html';}
	if (flag == 11) {document.location.href = '/restasis/sub01_01.html';}
	if (flag == 12) {document.location.href = '/restasis/sub01_02.html';}
	if (flag == 20) {document.location.href = '/restasis/sub02_01.html';}
	if (flag == 21) {document.location.href = '/restasis/sub02_01.html';}
	if (flag == 22) {document.location.href = '/restasis/sub02_02.html';}
	if (flag == 23) {document.location.href = '/restasis/sub02_03.html';}
	if (flag == 24) {document.location.href = '/restasis/sub02_04.html';}
	if (flag == 30) {false;}
	if (flag == 31) {false;}
	if (flag == 32) {document.location.href = '/restasis/sub03_02.html';}
	if (flag == 33) {document.location.href = '/restasis/sub03_03.html';}
	if (flag == 40) {document.location.href = '/restasis/sub04_site.html';}
	if (flag == 50) {document.location.href = '/restasis/sub04_01.html';}
	if (flag == 51) {document.location.href = '/restasis/sub04_01.html';}
	if (flag == 52) {document.location.href = '/restasis/qna_list.asp';}
}
// ·ç¹Ì°£
function flash_left_menu2(flag){
	if (flag == 10) {document.location.href = '/rumigan/sub01_01.html';}
	if (flag == 11) {document.location.href = '/rumigan/sub01_01.html';}
	if (flag == 12) {document.location.href = '/rumigan/sub01_02.html';}
	if (flag == 20) {document.location.href = '/rumigan/sub02_01.html';}
	if (flag == 21) {document.location.href = '/rumigan/sub02_01.html';}
	if (flag == 22) {document.location.href = '/rumigan/sub02_02.html';}
	if (flag == 23) {document.location.href = '/rumigan/sub02_03.html';}
	if (flag == 24) {document.location.href = '/rumigan/sub02_04.html';}
	if (flag == 30) {false;}
	if (flag == 31) {false;}
	if (flag == 32) {document.location.href = '/rumigan/sub03_02.html';}
	if (flag == 33) {false;}
	if (flag == 40) {document.location.href = '/rumigan/sub04_01.html';}
	if (flag == 41) {document.location.href = '/rumigan/sub04_01.html';}
	if (flag == 42) {document.location.href = '/rumigan/qna_list.asp';}
}
// ³ª¹Ú
function flash_left_menu3(flag){
	if (flag == 10) {document.location.href = '/nabak/sub01_01.html';}
	if (flag == 11) {document.location.href = '/nabak/sub01_01.html';}
	if (flag == 12) {document.location.href = '/nabak/sub01_02.html';}
	if (flag == 20) {document.location.href = '/nabak/sub02_01.html';}
	if (flag == 21) {document.location.href = '/nabak/sub02_01.html';}
	if (flag == 22) {false;}
	if (flag == 30) {document.location.href = '/nabak/sub03_01.html';}
	if (flag == 31) {document.location.href = '/nabak/sub03_01.html';}
	if (flag == 32) {document.location.href = '/nabak/sub03_02.html';}
	if (flag == 40) {document.location.href = '/nabak/sub04_01.html';}
	if (flag == 41) {document.location.href = '/nabak/sub04_01.html';}
	if (flag == 42) {document.location.href = '/nabak/qna_list.asp';}
}
// ºí·¹ÆÄÁ¹
function flash_left_menu4(flag){
	if (flag == 10) {document.location.href = '/blephasol/sub01_01.html';}
	if (flag == 11) {document.location.href = '/blephasol/sub01_01.html';}
	if (flag == 12) {document.location.href = '/blephasol/sub01_02.html';}
	if (flag == 20) {false;}
	if (flag == 21) {false;}
	if (flag == 22) {false;}
	if (flag == 30) {document.location.href = '/blephasol/sub03_01.html';}
	if (flag == 31) {document.location.href = '/blephasol/sub03_01.html';}
	if (flag == 32) {document.location.href = '/blephasol/sub03_02.html';}
	if (flag == 40) {document.location.href = '/blephasol/sub04_01.html';}
	if (flag == 41) {document.location.href = '/blephasol/sub04_01.html';}
	if (flag == 42) {document.location.href = '/blephasol/qna_list.asp';}
}
// °í°´Áö¿ø
function flash_left_menu5(flag){
	if (flag == 10) {document.location.href = '/cscenter/sub01_01.html';}
	if (flag == 11) {document.location.href = '/cscenter/sub01_01.html';}
	if (flag == 12) {document.location.href = '/cscenter/sub02_01.html';}
	if (flag == 13) {document.location.href = '/cscenter/sub03_01.html';}
	if (flag == 14) {document.location.href = '/cscenter/sub04_01.html';}
	if (flag == 20) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=72';}
	if (flag == 21) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=72';}
	if (flag == 22) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=73';}
	if (flag == 23) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=74';}
	if (flag == 24) {document.location.href = '/cscenter/qna_list.asp?qna_brd_id=75';}
}

// ¸ÞÀÎ ºñÁê¾ó
function visual_object(width,height,dir,mainPos,subPos,subPos2){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'><PARAM NAME=wmode VALUE=opaque><param name='movie' value='"+dir+"?click="+mainPos+"&"+subPos+"="+subPos2+"'><param name='quality' value='high'><embed src='"+dir+"?pageNum="+mainPos+"&subNum="+subPos+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed></object>");	
//	document.write("<img src='"+dir+"' width='"+width+"' height='"+height+"'  border='0'>"); //ÀÓ½Ã
}

// ¼­ºê¸Þ´ºÆ®¸®
function sub_menu_object(width,height,dir,mainPos,subPos){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'><param name='movie' value='"+dir+"?PageNum="+mainPos+"&subNum="+subPos+"'><param name='quality' value='high'><PARAM NAME=wmode VALUE=opaque><embed src='"+dir+"?pageNum="+mainPos+"&subNum="+subPos+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed></object>");	
//	document.write("<img src='"+dir+"' width='"+width+"' height='"+height+"'  border='0'>"); //ÀÓ½Ã
}

// ÇÏ´Ü ÀÎÅ©·çµå
function footer_inc(){
	var footer = ""+
	"<table border='0' cellspacing='0' cellpadding='0'>"+
	"<tr>"+
	"<td rowspan='2'><a href='http://www.samil-pharm.com' target=_blank><img src='../images/footer/rst_fme_logo1.gif' width='83' height='47' border='0' /></a></td>"+
	"<td colspan='4'><table border='0' cellpadding='0' cellspacing='0'>"+
    "  <tr>"+
    "    <td><img src='../images/footer/rst_fme_addr.gif' width='247' height='14' /></td>"+
    "    <td><a href='mailto:webmaster@samil-pharm.com'><img src='../images/footer/rst_fme_mailto.gif' width='95' height='14' border='0' /></a></td>"+
    "    <td rowspan='2'><a href='http://www.samil-pharm.com/util/Legal.html' target=_blank><img src='../images/footer/rst_fme_law.gif' width='58' height='10' border=0 /></a></td>"+
    "   <td rowspan='2'><a href='http://www.samil-pharm.com/util/Protection.html' target=_blank><img src='../images/footer/rst_fme_person.gif' border=0 /></a></td>"+
    "    <td rowspan='2'><a href='#' onClick=\"MM_openBrWindow('http://www.samil-pharm.com/util/NotEmail.html','','width=400,height=230')\"><img src='../images/footer/rst_fme_email.gif' width='94' height='10' border=0 /></a></td>"+
    "  </tr>"+
    "  <tr>"+
    "    <td colspan='2'><img src='../images/footer/rst_fme_copy.gif' width='342' height='9' /></td>"+
    "  </tr>"+
    "</table></td>"+
	"</tr>"+
	"<tr>" +
	"	<td colspan='6' style='padding:0 0 0 9'><img src='../images/footer/rst_brand.gif' border=0 usemap='#Map'></td>" +
	"</tr>" +
	"</table>" +
	"<map name='Map'>"+
	"<area shape='rect' coords='77,3,117,17' href='http://www.samil-pharm.com' target='_blank'>"+
	"<area shape='rect' coords='122,2,247,18' href='http://www.samil-kids.com' target='_blank'>"+
	"<area shape='rect' coords='252,3,292,17' href='http://www.zyrtec.co.kr' target='_blank'>"+
	"<area shape='rect' coords='297,2,341,19' href='http://www.zyloric.co.kr' target='_blank'>"+
	"<area shape='rect' coords='348,3,420,20' href='http://www.firstrel.com' target='_blank'>"+
	"<area shape='rect' coords='425,2,508,18' href='http://www.samil-dental.com' target='_blank'>"+
	"<area shape='rect' coords='513,3,582,19' href='http://www.samil-eyes.com' target='_blank'>"+
	"<area shape='rect' coords='589,2,645,19' href='http://www.eye2o.com/' target='_blank'>"+
	"</map>"


	
	var footer2=  ''+
	"<table width='100' border='0' cellspacing='0' cellpadding='0'> " +
 " <tr>    <td>"+
  "  <img src='/images/footer/eyes.gif' width='739' height='47' usemap='#Map' border='0'> " +
	"</td> " +
 " </tr></table> " +

"<map name='Map'> " +
"<area shape='rect' coords='10,4,70,29' href='http://www.samil-pharm.com' target='_blank'> " +
"<area shape='rect' coords='367,12,453,24' href='mailto:webmaster@samil-pharm.com'> " +
"<area shape='rect' coords='657,6,744,15' href='http://www.samil-pharm.com/util/Protection.html#' target='_blank'> " +
"<area shape='rect' coords='575,7,644,15' href='http://www.samil-pharm.com/util/Protection.html' target='_blank'> " +
"<area shape='rect' coords='523,6,565,14' href='http://www.samil-pharm.com/util/Legal.html' target='_blank'> " +
"<area shape='rect' coords='682,26,734,43' href='http://www.eye2o.com' target='_blank'> " +
"<area shape='rect' coords='606,26,673,43' href='http://www.samil-eyes.com/' target='_blank'> " +
"<area shape='rect' coords='516,25,600,42' href='http://www.samil-dental.com/' target='_blank'> " +
"<area shape='rect' coords='441,28,504,42' href='http://www.firstrel.com' target='_blank'> " +
"<area shape='rect' coords='390,29,433,43' href='http://www.zyloric.co.kr' target='_blank'> " +
"<area shape='rect' coords='342,28,386,43' href='http://www.zyrtec.co.kr' target='_blank'> " +
"<area shape='rect' coords='216,27,336,41' href='http://www.samil-kids.com' target='_blank'> " +
"<area shape='rect' coords='169,27,207,42' href='http://www.samil-pharm.com' target='_blank'> " +
"</map>"


	
	var footer3=  ''+
	"<table width='100' border='0' cellspacing='0' cellpadding='0'> " +
 " <tr>    <td>"+
  "  <img src='/images/footer/eyes2.gif' width='739' height='47' usemap='#Map' border='0'> " +
	"</td> " +
 " </tr></table> " +

"<map name='Map'> " +
"<area shape='rect' coords='10,4,70,29' href='http://www.samil-pharm.com' target='_blank'> " +
"<area shape='rect' coords='367,12,453,24' href='mailto:webmaster@samil-pharm.com'> " +
"<area shape='rect' coords='657,6,744,15' href='http://www.samil-pharm.com/util/Protection.html#' target='_blank'> " +
"<area shape='rect' coords='575,7,644,15' href='http://www.samil-pharm.com/util/Protection.html' target='_blank'> " +
"<area shape='rect' coords='523,6,565,14' href='http://www.samil-pharm.com/util/Legal.html' target='_blank'> " +
"<area shape='rect' coords='682,26,734,43' href='http://www.eye2o.com' target='_blank'> " +



"<area shape='rect' coords='685,22,736,443' href='http://www.eye2o.co.kr/' target='_blank'> " +
"<area shape='rect' coords='619,23,674,41' href='http://www.zoomnow.co.kr/' target='_blank'> " +
"<area shape='rect' coords='499,26,603,43' href='http://www.samilallergan.co.kr/' target='_blank'> " +
"<area shape='rect' coords='422,23,479,45' href='http://www.zyloric.co.kr' target='_blank'> " +
"<area shape='rect' coords='236,26,415,45' href='http://www.samil-kids.com' target='_blank'> " +
"<area shape='rect' coords='177,24,226,44' href='http://www.samil-pharm.com' target='_blank'> " +
"</map>"
	document.write(footer3)
}

function OnSearch() {
	if (document.searchForm.srch_word.value==""){
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		document.searchForm.srch_word.focus();
		return false;
	} else {
		document.searchForm.target='_blank';
		document.searchForm.submit();
	}
}

function searchform(){
	var searchform = ""+

	"	<div id='search'>" +
"	<table width='220' height='31' border='0' cellpadding='0' cellspacing='0'>" +
"	<form name='searchForm' action='http://www.samil-pharm.com/Product/PrInfo_List.asp' method='post' onsubmit='return false;'>" +
"	<input type='hidden' name='srch_flag' value='prod_name'>" +
"	<tr>" +
"		<td><img src='../images/main/img_search03.gif' width='15' height='31'></td>" +
"		<td width='61' background='../images/main/img_search05.gif' style='padding:0 0 0 4'><img src='../images/main/img_search01.gif' width='48' height='15'></td>" +
"		<td background='../images/main/img_search05.gif'><input type=text name='srch_word' class='form_03' size='13'></td>" +
"		<td width='33' background='../images/main/img_search05.gif'><img src='../images/main/img_search02.gif' width='32' height='17' border='0' style='cursor:hand' onclick='OnSearch();'></td>" +
"		<td width='15'><img src='../images/main/img_search04.gif' width='15' height='31'></td>" +
"	</tr>" +
"	</form>" +
"	</table></div>"


//"	<div id='search'>" +
//"	<table width='220' height='31' border='0' cellpadding='0' cellspacing='0' background='../images/main/img_search05.gif'>" +
//"	<form name='searchForm' action='http://www.samil-pharm.com/Product/PrInfo_List.asp' method='post' onsubmit='return false;'>" +
//"	<input type='hidden' name='srch_flag' value='prod_name'>" +
//"	<tr>" +
//"		<td width='19' background='../images/main/img_search05.gif'><img src='../images/main/img_search03.gif' width='15' height='31'></td>" +
//"		<td width='57'><img src='../images/main/img_search01.jpg' width='48' height='15'></td>" +
//"		<td><input type=text name='srch_word' class='form_03' size='13'></td>" +
//"		<td width='33'><img src='../images/main/img_search02.gif' width='32' height='17' border='0' style='cursor:hand' onclick='OnSearch();'></td>" +
//"		<td width='15'><img src='../images/main/img_search04.gif' width='15' height='31'></td>" +
//"	</tr>" +
//"	</form>" +
//"	</table></div>"
	document.write(searchform)	
}
// °øÅë ÇÃ·¡½¬
function common_object(width,height,dir){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"'><param name='movie' value='"+dir+"'><param name='quality' value='high'><param name='wmode' value='transparent'><embed src='"+dir+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"'></embed></object>");	
//	document.write("<img src='"+dir+"' width='"+width+"' height='"+height+"'  border='0'>"); //ÀÓ½Ã
}


/********************************************************************
*  Function Name	: movePage(page, url)
*  Description		: ÄÚµåº° ¸Þ½ÃÁö Ã³¸® ÇÔ¼ö
*								pCurrentPage °¢ÆäÀÌÁö¿¡ È÷µç°ªÀ¸·Î ¼±¾ð.
*  Input Data       : page(ÀÌµ¿ÇÒÆäÀÌÁöno), url(ÀÌµ¿ÇÒ ÆäÀÌÁö)
*  Output Data		: none 
*  »ç¿ëµÇ´Â Function : 
/********************************************************************/
function movePage(page, url) {
	
	var form = document.frmMain;
	form.action = url;
	form.pCurrentPage.value = page;		
	form.submit();
}

/********************************************************************
*  Function Name : isNumCk2
*  Description   : ¼ýÀÚ ÀÇ¿ÜÀÇ Å°º¸µå ¾È´­·¯Áü
*  Input Data    :
*  Output Data   : event.returnValue=false
*  ¼ýÀÚ, -, ., ÀÔ·Â¸¸ ÀÔ·Â °¡´É .
********************************************************************/
function isNumCk2()
{
    
    if(!(event.keyCode == 47)){
        if ((event.keyCode<45)||(event.keyCode>57))
            if(event.keyCode!=8)
                event.returnValue=false;
    }else {
        event.returnValue=false
    }
}

function goRstsLogOut(){
    document.location.href = "/expertRoom/logOut.asp";
}
