
function toggle(e) {
  for(var i=1;i<=4;i++){
	if(document.getElementById('font'+i).style.fontWeight=="bold") {
	document.getElementById('font'+i).style.fontWeight = "normal"; 
    document.getElementById('pio'+i).style.display = "none"; 
    document.getElementById('pin'+i).style.display = "inline"; 
    document.getElementById('content'+i).style.display = "none"; 
	}
	else {
    document.getElementById('font'+i).style.fontWeight = (e==i)?"bold":"normal"; 
    document.getElementById('pio'+i).style.display = (e==i)?"inline":"none"; 
    document.getElementById('pin'+i).style.display = (e==i)?"none":"inline"; 
    document.getElementById('content'+i).style.display = (e==i)?"inline":"none"; 
	}
  } 
 } 

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];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function IrOpen(){
	var irwin = window.open('http://dart.fss.or.kr/dart/SimpleSearch?crpNm=000520&term=3&sort=date','','width=770,height=600');
}
// ·Î±×ÀÎ
function flash_login() {document.location.href = '/util/Login.asp';}
// È¸¿ø°¡ÀÔ
function flash_member_regist() {window.open('http://www.samil-pharm.com/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('/util/pop_contactus.html','','resizable=no,width=400,height=370');}

function flash_top(flag){
	if (flag == 10) {document.location.href = '/story/firstrelis.html';}
	if (flag == 11) {document.location.href = '/story/firstrelis.html';}
	if (flag == 12) {document.location.href = '/story/story_faq.asp?toggle=1';}
	if (flag == 20) {document.location.href = '/guide/guide.html';}
	if (flag == 21) {document.location.href = '/guide/guide.html';}
	if (flag == 22) {document.location.href = '/guide/notice.html';}
	if (flag == 30) {document.location.href = '/about/principal.html';}
	if (flag == 31) {document.location.href = '/about/principal.html';}
	if (flag == 32) {document.location.href = '/about/effect.html';}
	if (flag == 33) {document.location.href = '/about/about.html';}
	if (flag == 40) {document.location.href = '/cscenter/qna_list.asp';}
	if (flag == 41) {document.location.href = '/cscenter/qna_list.asp';}
	if (flag == 42) {document.location.href = '/cscenter/news_list.asp';}
}

// ¸ÞÀÎ ºñÁê¾ó
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=7,0,19,0' width='"+width+"' height='"+height+"'><param name='movie' value='"+dir+"?pageNum="+mainPos+"&subNum="+subPos+"&threeD="+subPos2+"'><param name='quality' value='high'><PARAM name='wmode' value='transparent'><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='transparent'><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 width=''><table width='100%' border='0' cellspacing='0' cellpadding='0'>" +
"		<tr>" +
"			<td width='103' rowspan='2'><a href='http://www.samil-pharm.com' target='_blank'><img src='../images/footer/footer_logo.gif' width='68' height='48' border='0'></a></td>" +
"			<td width='13' rowspan='2'><img src='../images/footer/footer_bar1.gif' width='1' height='45'></td>" +
"			<td width='505'><img src='../images/footer/footer_addr.gif' width='258' height='11'><a href='mailto:webmaster@samil-pharm.com'><img src='../images/footer/footer_mailto.gif' width='84' height='11' border='0'></a><br>" +
"			<img src='../images/footer/footer_copy.gif' width='258' height='12'></td>" +
"			<td>" +
"			<table border='0' cellpadding='0' cellspacing='0' bgcolor='#F6DAD5'>" +
"			<tr>" +
"				<td width='20'><img src='../images/footer/footer_bar2.gif' width='8' height='18'></td>" +
"				<td width='42'><a href='http://www.samil-pharm.com/util/Legal.html' target=_blank><img src='../images/footer/footer_law.gif' width='33' height='10' border='0'></a></td>" +
"				<td width='7'><img src='../images/footer/footer_bar3.gif' width='1' height='7'></td>" +
"				<td width='58'><a href='http://www.samil-pharm.com/util/Protection.html' target='_blank'><img src='../images/footer/footer_person1.gif' width='75' height='10' border='0'></a></td>" +
"				<td width='7'><img src='../images/footer/footer_bar3.gif' width='1' height='7'></td>" +
"				<td width='90'><a href='#' onclick=window.open('/util/pop_email.html','','width=400,height=285')><img src='../images/footer/footer_email.gif' width='78' height='10' border='0'></a></td>" +
"				<td><img src='../images/footer/footer_bar4.gif' width='7' height='18'></td>" +
"			</tr>" +
"			</table>" +
"			</td>" +
"		</tr>" +
"		<tr>" +
"			<td colspan='2'><img src='../images/footer/footer_brand.jpg' border='0' usemap='#map'></td>" +
"		</tr>" +
"		</table>" +
"		</td>" +
"	</tr>" +
"	</table>" +
"	<map name='Map'>" +
"	<area alt='' coords='75,0,116,21' href='http://www.samil-pharm.com' target='_blank'>" +
"	<area alt='' coords='122,2,246,25' href='http://www.samil-kids.com' target='_blank'>" +
"	<area alt='' coords='251,0,288,31' href='http://www.zyrtec.co.kr' target='_blank'>" +
"	<area alt='' coords='301,-1,345,32' href='http://www.zyloric.co.kr' target='_blank'>" +
"	<area alt='' coords='349,-2,415,26' href='http://www.firstrel.com' target='_blank'>" +
"	<area alt='' coords='423,0,504,27' href='http://www.samil-dental.com' target='_blank'>" +
"   <area alt='' coords='512,1,581,27' href='http://www.samil-eyes.com' target='_blank'>" +
"	<area alt='' coords='600,0,655,25' href='http://www.eye2o.com/' target='_blank'></map>" +
"	</map>"
//<a href='#' onClick=\'MM_openBrWindow('http://www.samil-pharm.com/util/NotEmail.html','','width=400,height=230')\'>



	var footer = ""+

	"<table width='100' border='0' cellspacing='0' cellpadding='0'> " +
"  <tr>    <td> " +
"    <img src='/images/footer/first.gif' width='859' height='48' usemap='#ftMap' border='0'> " +
	"</td>  </tr> " +
"</table> " +

"<map name='ftMap'> " +
"<area shape='rect' coords='5,5,65,30' href='http://www.samil-pharm.com' target='_blank'> " +
"<area shape='rect' coords='388,12,474,24' href='mailto:webmaster@samil-pharm.com'> " +
"<area shape='rect' coords='764,7,851,16' href='http://www.samil-pharm.com/util/Protection.html#' target='_blank'> " +
"<area shape='rect' coords='686,8,755,16' href='http://www.samil-pharm.com/util/Protection.html' target='_blank'> " +
"<area shape='rect' coords='630,8,672,16' href='http://www.samil-pharm.com/util/Legal.html' target='_blank'> " +
"<area shape='rect' coords='704,26,756,43' href='http://www.eye2o.com' target='_blank'> " +
"<area shape='rect' coords='629,26,696,43' href='http://www.samil-eyes.com/' target='_blank'> " +
"<area shape='rect' coords='533,25,617,42' href='http://www.samil-dental.com/' target='_blank'> " +
"<area shape='rect' coords='465,28,525,43' href='http://www.firstrel.com' target='_blank'> " +
"<area shape='rect' coords='414,29,457,43' href='http://www.zyloric.co.kr' target='_blank'> " +
"<area shape='rect' coords='363,28,407,43' href='http://www.zyrtec.co.kr' target='_blank'> " +
"<area shape='rect' coords='240,28,360,42' href='http://www.samil-kids.com' target='_blank'> " +
"<area shape='rect' coords='192,28,230,43' href='http://www.samil-pharm.com' target='_blank'> " +
"</map>"
	document.write(footer)
}

function searchform(){
	var searchform = ""+
"	<div id='search'>" +
"	<table width='220' height='31' border='0' cellpadding='0' cellspacing='0' background='../images/main/img_search05.gif'>" +
"	<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 class='form_03' size='13'></td>" +
"		<td width='33'><img src='../images/main/img_search02.gif' width='32' height='17'></td>" +
"		<td width='15'><img src='../images/main/img_search04.gif' width='15' height='31'></td>" +
"	</tr>" +
"	</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 top(img) {
	var top =""+
	"	<div id='sideBtn' style='LEFT: 910px;WIDTH: 21px;height:71px;TOP: 100px; z-index:1;POSITION: absolute;VISIBILITY: visible;'><a href='#'><img src='"+img+"' border=0></a></div>"
	document.write(top);
}