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 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 flash_search(keyword) {
	if (keyword != "undefined") {
		document.location.href = '/Product/Product.asp?srch_flag=prod_name&srch_word='+keyword;
	} else {
		alert("Enter your search words.");
		return;
	}
}
// ÇÑ±¹¾î
function flash_kor() {window.open('http://www.samil-pharm.com');}
// »çÀÌÆ®¸Ê
function flash_sitemap() {document.location.href = '/util/sitemap.html';}
// ÄÁÅÃ¾î½º
function flash_contactus() {document.location.href = '/util/contact_us.html';}

//############### ¸ÞÀÎ ÁÖ¿äÀü¹®ÀÇ¾à ¸µÅ© #########################
function flash_cpr_link(flag){
	if (flag == 1) {document.location.href = '/product/special01.html';}
	if (flag == 2) {document.location.href = '/product/special02.html';}
	if (flag == 3) {document.location.href = '/product/special03.html';}
	if (flag == 4) {document.location.href = '/product/special04.html';}
	if (flag == 5) {document.location.href = '/product/special05.html';}
}

//############### ÇÑ´Ü brand ÇÃ·¡½¬ ¸Þ´º ##########################
// ºê·çÆæ
function flash_brand_menu1() {window.open('http://www.samil-kids.com');}
// ÄÝµð
function flash_brand_menu2() {window.open('http://www.samil-kids.com');}
// ¾×Æ¼ÇÇµå
function flash_brand_menu3() {window.open('http://www.samil-kids.com');}
// Áö¸£ÅØ
function flash_brand_menu4() {window.open('http://220.64.24.138:8334');}
// ÀÚÀÌ·Î¸¯
function flash_brand_menu5() {window.open('http://www.zyloric.co.kr');}
// Ä¡°ú»ç¾÷ºÎ
function flash_brand_menu6() {window.open('http://www.samil-dental.com');}

//############### »ó´Ü ÇÃ·¡½¬ ¸ÞÀÎ ¸Þ´º
function flash_top_menu(flag){
	if (flag == 1) {document.location.href = '/about/overview.html';}
	if (flag == 11) {document.location.href = '/about/overview.html';}
	if (flag == 12) {document.location.href = '/about/ceo.html';}
	if (flag == 13) {document.location.href = '/about/vision.html';}
	if (flag == 14) {document.location.href = '/about/AbHistory_01.html';}
	if (flag == 15) {document.location.href = '/about/public_affair.html';}
	if (flag == 16) {document.location.href = '/about/location.html';}
	if (flag == 17) {document.location.href = '/about/News_List.asp';}
	if (flag == 2) {document.location.href = '/Investor/financial01.html';}
	if (flag == 21) {document.location.href = '/Investor/financial01.html';}
	if (flag == 22) {document.location.href = '/Investor/stock01.html';}
	if (flag == 3) {document.location.href = '/product/product.asp';}
	if (flag == 31) {document.location.href = '/product/product.asp';}
	if (flag == 32) {document.location.href = '/product/special01.html';}
	if (flag == 33) {document.location.href = '/product/partnership.html';}
	if (flag == 4) {document.location.href = '/util/contact_us.html';}
}
//############### ¿ÞÂÊ ÇÃ·¡½¬ ¸Þ´º

function flash_left_menu1(flag){
	if (flag == 1) {document.location.href = '/about/overview.html';}
	if (flag == 2) {document.location.href = '/about/ceo.html';}
	if (flag == 3) {document.location.href = '/about/vision.html';}
	if (flag == 4) {document.location.href = '/about/AbHistory_01.html';}
	if (flag == 5) {document.location.href = '/about/public_affair.html';}
	if (flag == 6) {document.location.href = '/about/location.html';}
	if (flag == 7) {document.location.href = '/about/News_List.asp';}
}


function flash_left_menu2(flag){
	if (flag == 1) {document.location.href = '/Investor/financial01.html';}
	if (flag == 2) {document.location.href = '/Investor/stock01.html';}
}


function flash_left_menu3(flag){
	if (flag == 1) {document.location.href = '/product/product.asp';}
	if (flag == 2) {document.location.href = '/product/special01.html';}
	if (flag == 21) {document.location.href = '/product/special01.html';}
	if (flag == 22) {document.location.href = '/product/special02.html';}
	if (flag == 23) {document.location.href = '/product/special03.html';}
	if (flag == 24) {document.location.href = '/product/special04.html';}
	if (flag == 25) {document.location.href = '/product/special05.html';}
	if (flag == 3) {document.location.href = '/product/partnership.html';}
}

// ¸ÞÀÎ ºñÁê¾ó
function visual_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+"?oneD=1&twoD="+mainPos+"&threeD="+subPos+"'><param name='quality' value='high'><param name='wmode' value='transparent'><embed src='"+dir+"?oneD=1&twoD="+mainPos+"&threeD="+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 style='padding-left : 40'><img src='/images/main/copy.gif' alt='' width='444' height='29' border='0' usemap='#Map'></td></tr></table>" +
	"<map name='Map'>" +
	"<area alt='' coords='360,5,444,18' href='mailto:webmaster@samil-pharm.com'>" +
	"<area alt='' coords='0,0,59,29' href='http://www.samil-pharm.com' target='_blank'>" +
	"</map>"
	document.write(footer);
}

// °øÅë ÇÃ·¡½¬
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'>"); //ÀÓ½Ã
}

