//----------------------------------------------------------------------- Swap images ------------------------------------------------------
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.0
  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 && document.getElementById) x=document.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];}
}

//--------------------------------------------------------------------------- Path images ------------------------------------------------------------
path = '';
isLoaded = '';

function TopMenu(level,mainlink)
{
	if (level == 0)	path = "";
	else if (level == 1) path = "../";
	else if (level == 2) path = "../../";
 
	 // About Us
	 if (mainlink==1){
		strAbout="<td><a href=\""+path+"about/index_about.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore(); popDown('elMenu1')\" onMouseOver=\"MM_swapImage('Image1','','"+path+"images/home/link1_l.gif',1); popUp('elMenu1',event)\"><img src=\""+path+"images/home/link1_l.gif\" border=\"0\" name=\"Image1\"></a></td>";
	}else{
		strAbout=" <td><a href=\""+path+"about/index_about.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore(); popDown('elMenu1')\" onMouseOver=\"MM_swapImage('Image1','','"+path+"images/home/link1_l.gif',1); popUp('elMenu1',event)\"><img src=\""+path+"images/home/link1_d.gif\"  border=\"0\" name=\"Image1\"></a></td>";
	}

	//Chemecals
	if (mainlink==2){
		strChemecal="<td><a href=\""+path+"chemical/index_products.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore(); popDown('elMenu2')\" onMouseOver=\"MM_swapImage('Image2','','"+path+"images/home/link2_l.gif',1); popUp('elMenu2',event)\"><img src=\""+path+"images/home/link2_l.gif\" border=\"0\" name=\"Image2\" ></a></td>";
	}else{
		strChemecal="<td><a href=\""+path+"chemical/index_products.html\" target=\"_top\"  onMouseOut=\"MM_swapImgRestore(); popDown('elMenu2')\" onMouseOver=\"MM_swapImage('Image2','','"+path+"images/home/link2_l.gif',1); popUp('elMenu2',event)\"><img src=\""+path+"images/home/link2_d.gif\"  border=\"0\" name=\"Image2\" ></a></td>";
	}

	//News Room
	if (mainlink==4){
		strNews="<td><a href=\""+path+"news_room/index_news.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image4','','"+path+"images/home/link4_l.gif',1)\"><img src=\""+path+"images/home/link4_l.gif\"  border=\"0\" name=\"Image4\"></a></td>";
	}else{
		strNews="<td><a href=\""+path+"news_room/index_news.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image4','','"+path+"images/home/link4_l.gif',1)\"><img src=\""+path+"images/home/link4_d.gif\"  border=\"0\" name=\"Image4\"></a></td>";
	}

	//Merck Worldwide
	if (mainlink==5){
		strWorld="<td><a href=\""+path+"index_merck_worldwide.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image5','','"+path+"images/home/link5_l.gif',1)\"><img src=\""+path+"images/home/link5_l.gif\"  border=\"0\" name=\"Image5\"></a></td>";
	}else{
		strWorld="<td><a href=\""+path+"index_merck_worldwide.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image5','','"+path+"images/home/link5_l.gif',1)\"><img src=\""+path+"images/home/link5_d.gif\"  border=\"0\" name=\"Image5\"></a></td>";	
	}

	//Contact Us
	if (mainlink==6){
		strContact="<td><a href=\""+path+"contact/index_contact.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore(); \" onMouseOver=\"MM_swapImage('Image6','','"+path+"images/home/link6_l.gif',1);\"><img src=\""+path+"images/home/link6_l.gif\" border=\"0\" name=\"Image6\"></a></td>";
	}else{
		strContact="<td><a href=\""+path+"contact/index_contact.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore(); \" onMouseOver=\"MM_swapImage('Image6','','"+path+"images/home/link6_l.gif',1);\"><img src=\""+path+"images/home/link6_d.gif\" border=\"0\" name=\"Image6\"></a></td>";		
	}

	//Search
	if (mainlink==7){
		strSearch="<td><a href=\""+path+"search/index_search.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','"+path+"images/home/link7_l.gif',1)\"><img src=\""+path+"images/home/link7_l.gif\"  border=\"0\" name=\"Image7\"></a></td>";
//		strSearch="<td><a href=\"#\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','"+path+"images/home/link7_l.gif',1)\"><img src=\""+path+"images/home/link7_l.gif\"  border=\"0\" name=\"Image7\"></a></td>";
	}else{
		strSearch="<td><a href=\""+path+"search/index_search.html\" target=\"_top\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','"+path+"images/home/link7_l.gif',1)\"><img src=\""+path+"images/home/link7_d.gif\" border=\"0\" name=\"Image7\"></a></td>";	
//		strSearch="<td><a href=\"#\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('Image7','','"+path+"images/home/link7_l.gif',1)\"><img src=\""+path+"images/home/link7_d.gif\" border=\"0\" name=\"Image7\"></a></td>";	
	}

	strTop1="<table width=\"625\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	strTop2="<tr>";
	//strTop3="<td width=\"155\" valign=\"top\"><a href=\""+path+"index.html\" target=\"_top\"><img src=\""+path+"images/home/merck_logo.gif\" width=\"155\" height=\"105\" alt=\"MERCK\" border=\"0\"></a><img src=\""+path+"images/home/15p.gif\" width=\"15\" height=\"15\"></td>";
	strTop4="<td valign=\"top\">";
	strTop5="<table width=\"625\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	strTop6="<tr> ";
	strTop7="<td width=\"35\" valign=\"top\"><img src=\""+path+"images/home/curve_blue.gif\" ></td>";
	strTop8="<td valign=\"top\" width=\"571\">";
	strTop9="<table width=\"571\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> ";
	strTop10="<tr>";
	strTop11="<td><img src=\""+path+"images/home/blue_above.gif\" ></td>";
	strTop12="</tr>";
	strTop13="<tr>";
	strTop14="<td>";
	strTop15="<table width=\"571\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	strTop16="<tr>";
	strTop17="<td><img src=\""+path+"images/home/space_blue.gif\" width=\"122\" height=\"19\"></td>";
	strTop18="</tr>";
	strTop19="</table>";
	strTop20="</td>";
	strTop21="</tr>";
	strTop22="</table>";
	strTop23="</td>";
	strTop24="<td width=\"19\" valign=\"top\"><img src=\""+path+"images/home/blue_side.gif\" ></td>";
	strTop25="</tr>";
	strTop26="</table>";
	strTop27="</td>";
	strTop28="</tr>";
	strTop29="</table>";

	strFinal="";

	strFinal=strTop1+strTop2+strTop4+strTop5+strTop6+strTop7+strTop8+strTop9+strTop10+strTop11+strTop12+strTop13+strTop14+strTop15+strTop16+strAbout+strChemecal+strNews+strTop17+strWorld+strContact+strSearch+strTop18+strTop19+strTop20+strTop21+strTop22+strTop23+strTop24+strTop25+strTop26+strTop27+strTop28+strTop29;
	//strFinal=strTop1+strTop2+strTop3+strTop4+strTop5+strTop6+strTop7+strTop8+strTop9+strTop10+strTop11+strTop12+strTop13+strTop14+strTop15+strTop16+strAbout+strChemecal+strPharmaceutical+strNews+strTop17+strWorld+strContact+strSearch+strTop18+strTop19+strTop20+strTop21+strTop22+strTop23+strTop24+strTop25+strTop26+strTop27+strTop28+strTop29;
	document.write(strFinal);

}


//-------------------------------------------------------Random---------------------------------------------------------------------------------------
function randomlead(limit) {
     today = new Date();
     return(today.getSeconds() % limit);
}

function lead() {
tagLineslead = new Array(4);
tagLineslead[0] = "<img src='"+path+"images/home/random1.jpg' border=0 >";
tagLineslead[1] = "<img src='"+path+"images/home/random2.jpg' border=0 >";
tagLineslead[2] = "<img src='"+path+"images/home/random3.jpg' border=0 >";
tagLineslead[3] = "<img src='"+path+"images/home/random4.jpg' border=0 >";
document.write(tagLineslead[randomlead(4)]);
}

//-------------------------------------------------------Footer---------------------------------------------------------------------------------------
function footer(level){
if (level == 0)	path = "";
else if (level == 1) path = "../";
else if (level == 2) path = "../../";

document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); 
document.write("<tr>"); 
document.write("<td class=\"body1\">〒153-8927 <br>東京都目黒区下目黒 1-8-1 アルコタワー 5F<br>Tel: 03-5434-4700 e-mail: "); 
document.write("<a href=\""+path+"contact/index_feedback.asp?To_Email=merck@merck.co.jp\" target=\"_top\">merck@merck.co.jp</a> "); 
document.write("<br>"); 
document.write("</td>"); 
document.write("</tr>"); 
document.write("</table>"); 
}

