var ma=new Array();
var mx=new Array();
var my=new Array();
var mc=new Array();
var mal=0;
var main=0;
var menuw=200;
var psrc=0;
var pname="";
var al="";
var gd=0;
var gx,gy;
var NS7=(!document.all&&document.getElementById);
var NS4=(!document.getElementById);
var IE5=(!NS4&&!NS7&&navigator.userAgent.indexOf('MSIE 5.0')!=-1);
if(navigator.userAgent.indexOf('Opera')!=-1)NS4=1;

var NS6=(NS7&&navigator.userAgent.indexOf('Netscape6')!=-1);
function startMainMenu(file,h,w,dir,space,align)
{
	if(w>0)menuw=w;main=dir;
	if(main==1||main==2)document.write("<table border=\"0\" cellspacing=\""+space+"\" cellpadding=\"0\">");
	if(file!="")
	{
		al="";
		if(align==1)al=" align=\"right\"";
		if(align==2)al=" align=\"center\"";
		if(main==1||main==2)document.write("<tr><td"+al+">");document.write("<img src=\""+loc+file+"\" border=\"0\"");
		if(h>0)document.write(" height=\""+h+"\"");
		if(w>0)document.write(" width=\""+w+"\"");document.write(" />");
		if(main==1||main==2)document.write("</td>");
		if(main==1)document.write("</tr>");
		if(main==3)document.write("<br />");
	}
}
function endMainMenu(file,h,w)
{
	if(file!="")
	{
		if(main==1)document.write("<tr>");
		if(main==1||main==2)document.write("<td"+al+">");document.write("<img src=\""+loc+file+"\" border=\"0\"");
		if(h>0)document.write(" height=\""+h+"\"");
		if(w>0)document.write(" width=\""+w+"\"");document.write(" />");
		if(main==1||main==2)document.write("</td></tr>");
	}
	if(main==1||main==2)document.write("</table>");main=0;
}
function mainMenuItem(name,ext,h,w,url,tar,alt,dir,state,s)
{
	if(NS4&&main==0)return;var isgraphic=ext.charAt(0)==".";
	if(main==1)document.write("<tr>");
	if(main==1||main==2)document.write("<td"+al+">");document.write("<a ");
	if(url!=""||!isgraphic)document.write("href=\""+url+"\" ");
	if(tar!="")document.write("target=\""+tar+"\" ");document.write("onmouseout=\"");
	if(dir>0)document.write("tidyMenu(event);");document.write("\" onmouseover=\"");
	if(dir>0)document.write("openMenu(event, '"+name+"',"+dir+","+bc+","+fc+");");
	if(state>1&&isgraphic)
	{
		document[name+"_over"]=new Image();
		document[name+"_over"].src=loc+name+"_over"+ext;
		document.write("setGraphic(event, '"+loc+name+"_over"+ext+"');");
	}
	document.write("return false;\"");
	if(!isgraphic)document.write(" class=\""+s+"\" style=\"width:"+(w>0?w:menuw)+"px\"");document.write(">");
	if(isgraphic)
	{
		document.write("<img src=\""+loc+name+ext+"\" border=\"0\"");
		if(h>0)document.write(" height=\""+h+"\"");
		if(w>0)document.write(" width=\""+w+"\"");
		if(alt!="")document.write(" alt=\""+alt+"\"");document.write(" />");
	}
	else
	{
		document.write("&nbsp;"+ext+"&nbsp;");
	}
	document.write("</a>");
	if(main==1||main==2)document.write("</td>");
	if(main==1)document.write("</tr>");
	if(main==3)document.write("<br />");
}
function startSubmenu(name,style,sw)
{
	if(NS4)return;
	if(sw>0)menuw=sw;document.write("<div id=\""+name+"\" class=\""+style+"\"  style=\"width:"+(menuw+(NS7?bd*2:0))+"px\">");
}
function endSubmenu(name)
{
	if(NS4)return;document.write("</div>");
	if(!NS7)document.getElementById(name).onmouseout=tidyMenu;
}
function submenuItem(text,url,tar,s)
{
	if(NS4)return;
	if(text=="---")document.write("<img src=\""+loc+"---.gif\" height=\"1\" width=\""+menuw+"\" />");
	else if(text.charAt(0)=='<')document.write(text);
	else
	{
		document.write("<a ");if(url!="")document.write("href=\""+url+"\" ");
		if(tar!="")document.write("target=\""+tar+"\" ");document.write("class=\""+s+"\" style=\"width:"+menuw+"px\">&nbsp;"+text+"&nbsp;</a>");
	}
}
function setGraphic(event,name)
{
	if(NS4)return;psrc=(NS7)?event.target:event.srcElement;pname=psrc.src;
	if(NS7)event.target.src=name;else event.srcElement.src=name;
}
function openMenu(event,id,pos,bc,fc)
{
	if(NS4)return;var el,x,y;
	if(gd==0)
	{
		var p=document.getElementById(id);gx=0;gy=0;
		while(p&&p.parentNode.nodeName!="BODY")
		{
			p=p.parentNode;
			if(p.nodeName=="DIV"||p.nodeName=="LAYER"||p.nodeName=="SPAN")
				if(p.style.position=="absolute")
				{
					gx+=p.offsetLeft;gy+=p.offsetTop;
				}
		}
		if(p)gd=1;
	}
	if(mal>0)
	{
		el=document.getElementById(ma[mal-1]);
		if(mx[mal-1]!=el.offsetLeft||my[mal-1]!=el.offsetTop)
		{
			el.style.left=mx[mal-1];el.style.top=my[mal-1];
		}
		tidyMenu(event);
	}
	if(NS7)
	{
		var p=event.target;
		if(p.nodeName!="A"&&p.nodeName!="IMG"&&p.parentNode.nodeName=="A")p=p.parentNode;dx=p.offsetWidth;dy=p.offsetHeight;
		if(mal==0)
		{
			x=p.x;y=p.y;
			if(typeof(p.x)=="undefined"||!NS6)
			{
				x=p.offsetLeft;y=p.offsetTop;
				while(!NS6&&p.parentNode.nodeName!="BODY")
				{
					p=p.parentNode;
					if(p.nodeName=="TD"||p.nodeName=="TABLE")
					{
						x+=p.offsetLeft;y+=p.offsetTop;
					}
				}
			}
		}
		else
		{
			el=document.getElementById(ma[mal-1]);x=el.offsetLeft;y=el.offsetTop+p.offsetTop;
		}
		if(pos!=3)x-=bd;
		if(pos==3&&mal>0)x+=bd;
	}
	else
	{
		x=event.clientX-event.offsetX+document.body.scrollLeft-document.body.clientLeft;
		y=event.clientY-event.offsetY+document.body.scrollTop-document.body.clientTop;
		dx=event.srcElement.offsetWidth;
		dy=event.srcElement.offsetHeight;
		if(mal>0)
		{
			y-=bd;
			if(pos!=3)x-=2*bd;
		}
		x-=gx;y-=gy;
	}
	el=document.getElementById(id);
	if(el&&el.style.visibility!="visible")
	{
		if(pos==1)
		{
			x+=dx;el.style.left=x-el.offsetWidth+"px";el.style.top=y+"px";nspeed=el.offsetWidth/frames;
		}
		else if(pos==2)
		{
			y+=dy;el.style.left=x+"px";el.style.top=y-el.offsetHeight+"px";nspeed=el.offsetHeight/frames;
		}
		else if(pos==3)
		{
			x-=el.offsetWidth;el.style.left=x+el.offsetWidth+"px";el.style.top=y+"px";nspeed=el.offsetWidth/frames;
		}
		mx[mal]=x;my[mal]=y;
		if(NS7||IE5||frames==0)
		{
			el.style.left=x+"px";el.style.top=y+"px";
		}
		if(!IE5)clipMenu(mal,el);el.style.visibility="visible";ma[mal]=id;
		if(NS7){var p=event.target;
		if(p.nodeName!="A"&&p.parentNode.nodeName=="A")p=p.parentNode;mc[mal]=p.style;el.onmouseout=tidyMenu;
	}
	else
	{
		mc[mal]=event.srcElement.style;
		if(mal>0)
		{
			mc[mal].backgroundColor=bc;mc[mal].color=fc;
		}
	}
	mal++;
	}
}
function overMenu(x,y)
{
	x-=gx;y-=gy;
	for(i=0;i<mal;i++)
	{
		var el=document.getElementById(ma[i]);
		if(el.offsetLeft+el.offsetWidth>x&&el.offsetLeft<=x&&el.offsetTop+el.offsetHeight>y&&el.offsetTop<=y)
		{
			return ma[i];
		}
	}
	return "";
}
function tidyMenu(e)
{
	if(NS4)return;
	if(NS7)
	{
		t=overMenu(e.pageX,e.pageY);
		if(t!=""&&(e.target.firstChild==e.relatedTarget||e.target==e.relatedTarget.firstChild))return;
	}
	else t=overMenu(event.clientX+document.body.scrollLeft-document.body.clientLeft,event.clientY+document.body.scrollTop-document.body.clientTop);om=0;
	for(i=0;i<mal;i++)
	{
		var mail=ma[i].length;
		if(mail>t.length||t.substring(0,mail)!=ma[i])
		{
			var el=document.getElementById(ma[i]);
			el.style.visibility="hidden";
			mc[i].backgroundColor="";
			mc[i].color="";
		}
		else
		{
			ma[om]=ma[i];
			mx[om]=mx[i];
			my[om]=my[i];
			om++;
		}
	}
	mal=om;
	if(mal==0&&psrc)psrc.src=pname;
}
function animate()
{
	for(i=0;i<mal;i++)
	{
		var el=document.getElementById(ma[i]);
		if(el.style.visibility=="visible")
		{
			if(el.offsetLeft<mx[i])el.style.left=Math.min(el.offsetLeft+nspeed,mx[i])+"px";
			if(el.offsetLeft>mx[i])el.style.left=Math.max(el.offsetLeft-nspeed,mx[i])+"px";
			if(el.offsetTop<my[i])el.style.top=Math.min(el.offsetTop+nspeed,my[i])+"px";
			clipMenu(i,el);
		}
	}
	if(mal!=0||frames!=0)setTimeout("animate()",50);
}
function clipMenu(i,el)
{
	if(el.offsetLeft>mx[i])el.style.clip="rect("+(my[i]-el.offsetTop)+"px "+(el.offsetWidth+(mx[i]-el.offsetLeft))+"px "+el.offsetHeight+"px "+0+"px)";else el.style.clip="rect("+(my[i]-el.offsetTop)+"px "+el.offsetWidth+"px "+el.offsetHeight+"px "+(mx[i]-el.offsetLeft)+"px)";
}




if(typeof(loc)=="undefined"||loc=="")
{
	var loc="";
	if(document.body&&document.body.innerHTML)
	{
		var tt=document.body.innerHTML.toLowerCase();
		var last=tt.indexOf("jei.js\"");
		if(last>0)
		{
			var first=tt.lastIndexOf("\"",last);
			if(first>0&&first<last)
				loc=document.body.innerHTML.substr(first+1,last-first-1);
		}
	}
}

var bd=0
document.write("<style type=\"text/css\">");
document.write("\n<!--\n");
document.write(".jei_menu {border-color:#000000;border-style:solid;border-width:"+bd+"px 0px "+bd+"px 0px;background-color:#970000;position:absolute;left:0px;top:0px;visibility:hidden;}");
document.write("a.jei_plain:link, a.jei_plain:visited{text-align:left;background-color:#970000;color:#ffffff;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:2px 0px 2px 0px;cursor:hand;display:block;font-size:10pt;font-family:Arial, Helvetica, sans-serif;}");
document.write("a.jei_plain:hover, a.jei_plain:active{background-color:#333366;color:#f7f4f4;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:2px 0px 2px 0px;cursor:hand;display:block;font-size:10pt;font-family:Arial, Helvetica, sans-serif;}");
document.write("a.jei_l:link, a.jei_l:visited{text-align:left;background:#970000 url("+loc+"jei_l.gif) no-repeat right;color:#ffffff;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:2px 0px 2px 0px;cursor:hand;display:block;font-size:10pt;font-family:Arial, Helvetica, sans-serif;}");
document.write("a.jei_l:hover, a.jei_l:active{background:#333366 url("+loc+"jei_l2.gif) no-repeat right;color: #f7f4f4;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px "+bd+"px 0px "+bd+"px;padding:2px 0px 2px 0px;cursor:hand;display:block;font-size:10pt;font-family:Arial, Helvetica, sans-serif;}");
document.write("\n-->\n");
document.write("</style>");

var fc=0xf7f4f4;
var bc=0x333366;
if(typeof(frames)=="undefined"){var frames=0;}

startMainMenu("jei_top.gif",15,181,1,0,0)
mainMenuItem("jei_b1",".gif",19,181,"http://www.metallurgist.com/html/services.html","","Services",1,2,"jei_plain");
mainMenuItem("jei_b2",".gif",19,181,"http://www.metallurgist.com/html/experience.html","","Experience",1,2,"jei_plain");
mainMenuItem("jei_b3",".gif",19,181,"http://www.metallurgist.com/html/vitae.html","","Vitae of Dr. Jerner",1,2,"jei_plain");
mainMenuItem("jei_b4",".gif",19,181,"http://www.metallurgist.com/html/recent_investigations.html","","Recent Investigations",1,2,"jei_plain");
mainMenuItem("jei_b12",".gif",19,181,"http://www.metallurgist.com/html/FailureByType.htm","","Failure Type",1,2,"jei_plain");
mainMenuItem("jei_b5",".gif",19,181,"http://www.metallurgist.com/html/news.html","","Recent News and Safety",2,2,"jei_plain");
mainMenuItem("jei_b11",".gif",19,181,"http://www.metallurgist.com/html/Education.html","","Education/Definitions",2,2,"jei_plain");
mainMenuItem("jei_b10",".gif",19,181,"http://www.metallurgist.com/html/presentations.html","","Presentations",2,2,"jei_plain");
mainMenuItem("jei_b13",".gif",19,181,"http://www.metallurgist.com/html/newsletter.htm","","Newsletter",2,2,"jei_plain");
mainMenuItem("jei_b7",".gif",19,181,"http://www.metallurgist.com/html/resources.html","","Helpful Links",2,2,"jei_plain");
mainMenuItem("jei_b6",".gif",19,181,"http://www.metallurgist.com/html/contact_us.html","","Contact Us",1,2,"jei_plain");
mainMenuItem("jei_b8",".gif",19,181,"http://www.metallurgist.com/html/sitemap.html","","Sitemap",2,2,"jei_plain");
mainMenuItem("jei_b9",".gif",19,181,"http://www.metallurgist.com/index.html","","Home",2,2,"jei_plain");
endMainMenu("jei_bottom.gif",15,181)

/*Submenu removed, redundant*/
//startSubmenu("jei_b6","jei_menu",105);
//submenuItem("Feedback Form","http://www.metallurgist.com/html/feedback.html","","jei_plain");
//endSubmenu("jei_b6");


//startSubmenu("*Main menu title*","*STYLE*",?)
//Template -- Remove words between **  submenItem("*NAME*","*URL (Absolute)*","*TARGET(leave blank by default)*","*STYLE*"); 


startSubmenu("jei_b4","jei_menu",194);
submenuItem("Automobile Accidents","http://www.metallurgist.com/html/auto.html","","jei_plain");
submenuItem("Construction Accidents","http://www.metallurgist.com/html/construction_accidents.htm","","jei_plain");
submenuItem("Consumer Product Accidents","http://www.metallurgist.com/html/consumer_products.html","","jei_plain");
submenuItem("Explosions", "http://www.metallurgist.com/html/explosions.html","","jei_plain");
submenuItem("Hand Tool Accidents","http://www.metallurgist.com/html/hand_tools.html","","jei_plain");
submenuItem("Industrial Equipment Accidents","http://www.metallurgist.com/html/industrial.html","","jei_plain");
submenuItem("Medical Device Failures", "http://www.metallurgist.com/html/medicalfailures.html","","jei_plain");
submenuItem("Oil Field Accidents","http://www.metallurgist.com/html/oilfield.html","","jei_plain");
submenuItem("Plant Accidents","http://www.metallurgist.com/html/plant.html","","jei_plain");
submenuItem("Recreational Vehicle Accidents","http://www.metallurgist.com/html/RecreationalVehicle.html","","jei_plain");
submenuItem("Truck Accidents","http://www.metallurgist.com/html/truck.html","","jei_plain");
endSubmenu("jei_b4");

startSubmenu("jei_b3","jei_menu",194);
submenuItem("Vitae of Dr. Jerner","http://www.metallurgist.com/html/vitae.html","","jei_plain");
submenuItem("Qualifications","http://www.metallurgist.com/html/Qualifications.htm","","jei_plain");
submenuItem("News Articles","http://www.metallurgist.com/html/news_articles.htm","","jei_plain");
submenuItem("Forensic Investigations","http://www.metallurgist.com/html/ForensicInvestigations.htm","","jei_plain");
endSubmenu("jei_b3");

startSubmenu("jei_b12","jei_menu",194);
submenuItem("Casting Porosity","http://www.metallurgist.com/html/FailurebyCastingPorosity.htm","","jei_plain");
submenuItem("Corrosion","http://www.metallurgist.com/html/FailureByCorrosion.htm","","jei_plain");
submenuItem("Design Defect","http://www.metallurgist.com/html/FailurebyDesign.htm","","jei_plain");
submenuItem("Human Error","http://www.metallurgist.com/html/FailureByHumanError.htm","","jei_plain");
submenuItem("Manufacturing Defect","http://www.metallurgist.com/html/FailureByManufacturingDefect.htm","","jei_plain");
submenuItem("Metal Fatigue","http://www.metallurgist.com/html/FailurebyMetalFatigue.htm","","jei_plain");
submenuItem("Overstress","http://www.metallurgist.com/html/FailurebyStress.htm","","jei_plain");
submenuItem("Thread Damage","http://www.metallurgist.com/html/FailurebyThreadDamage.htm","","jei_plain");
submenuItem("Welding Defect","http://www.metallurgist.com/html/FailureByWeldingDefect.htm","","jei_plain");
endSubmenu("jei_b4");

startSubmenu("jei_b2","jei_menu",135);
submenuItem("Background","http://www.metallurgist.com/html/experience.html","","jei_plain");
submenuItem("Litigation Clients","http://www.metallurgist.com/html/litigation_clients.html","","jei_plain");
submenuItem("Industrial Clients","http://www.metallurgist.com/html/industrial_clients.html","","jei_plain");
submenuItem("Governmental Clients","http://www.metallurgist.com/html/government_clients.html","","jei_plain");
endSubmenu("jei_b2");

startSubmenu("jei_b1_3","jei_menu",141);
submenuItem("Fast Response","http://www.metallurgist.com/html/fast_response.html","","jei_plain");
submenuItem("Evidence Preservation","http://www.metallurgist.com/html/evidence_preservation.html","","jei_plain");
endSubmenu("jei_b1_3");

startSubmenu("jei_b1","jei_menu",228);
submenuItem("Overview of Metallurgical Services","http://www.metallurgist.com/html/services.html","","jei_plain");
submenuItem("Litigation Consulting","http://www.metallurgist.com/html/litigation_consulting.html","","jei_plain");
mainMenuItem("jei_b1_3","Accident Investigation",0,0,"http://www.metallurgist.com/html/accident_investigation.html","","",1,1,"jei_l");
submenuItem("Failure Analysis","http://www.metallurgist.com/html/failure_analysis.html","","jei_plain");
endSubmenu("jei_b1");

loc="";

