if(isID==1){
var checkLoops=0;
/*Begin javascript for w3c browsers*/
/*Find the width of the window*/
if(window.innerWidth!=null){compareWidth=window.innerWidth;};
if(document.body.clientWidth!=null){compareWidth=document.body.clientWidth;};
if((hdngLength-1)*90<compareWidth){totalWidth=compareWidth;}
else{
	totalWidth=90*(hdngLength-1);
};
individualWidth=Math.round(totalWidth/(hdngLength-1));

/*Write ephysics heading*/
document.write('<div id="topMost" style="background-color: #0000FF; font-size: 32px !important; text-align: center; color: #FFD700; font-weight: bold; position: absolute; left: 5px; top: 0px; width: '+totalWidth+'px; height: 40px; z-index:3" onMouseover="raiseall();">'+
'UCLA\'s&nbsp;ePhysics'+
'</div>');
/*Write the menu headings*/
document.write('<div id="nextToTop" style="background-color: #0000FF; position: absolute; top: 40px; left: 5px; width: '+totalWidth+'px; height: 33px; z-index: 3">');
for(i=1;i<hdngLength;i=i+1){
leftLoc=(i-1)*individualWidth+5;
document.write('<span id="head'+i+'" class="heading" style="position: absolute; left: '+leftLoc+'px; height: 32px; width: '+individualWidth+'px;" onMouseover="select('+i+');raisemost('+i+');"><a href="#" style="position: absolute; width: 88px" class="headingText">'+hdng[i]+'</a></span>');
checkLoops=checkLoops+1;
};
document.write('</div>');
for(i=1;i<hdngLength;i=i+1){
if(menuLength[i]>1 && menuRepeat[i]==0){
	leftLoc=(i-1)*individualWidth+5;
	menuHeight[i]=20*menuItems[i].length+30;
	if(totalWidth<leftLoc+120){leftLoc=totalWidth-120;};
	document.write('<div id="menu'+i+'" class="menu" style="position: absolute; width: 130px; height: '+menuHeight[i]+'px; top: '+-menuHeight[i]+'px; left: '+leftLoc+'px; z-index: 2;" onMouseover="clearTimeout(delay['+i+']);" onMouseout="delay['+i+']=setTimeout(\'deselect('+i+')\',300);">');
	document.write('<table>');
	menuLength[i]=menuItems[i].length;
	document.write('&nbsp;\n');
	for(k=1;k<menuLength[i];k=k+1){
		spaceNum=14-menuItems[i][k].length;
		itemValue=i*10+k;
		if(individualWidth*(i-1)+355<totalWidth){
		if(spaceNum>0){
		spaceString='&nbsp;';
		for(p=2;p<spaceNum+1;p=p+1){
			spaceString=spaceString+'&nbsp;';
		};
		spaceString=spaceString+'&gt;';
		}	else{
		spaceString='&gt;';
		};
			document.write('<tr>');
			document.write('<td id="item'+itemValue+'" class="item" style="text-align: left" onMouseover="subAppear('+i+','+k+');"><a href="#" class="linkText">'+menuItems[i][k]+spaceString+'</a></td>');
			document.write('</tr>');
		}	else{
		if(spaceNum>0){
		spaceString='&lt;';
		for(p=1;p<spaceNum+1;p=p+1){
			spaceString=spaceString+'&nbsp;';
		};
		}	else{
		spaceString='&lt;';
		};
			document.write('<tr>');
			document.write('<td id="item'+itemValue+'" class="item" style="text-align: right" onMouseover="subAppear('+i+','+k+');"><a href="#" class="linkText">'+spaceString+menuItems[i][k]+'</a></td>');
			document.write('</tr>');
		};
	};
	document.write('</table>');
	document.write('</div>');
	if(menuLength[i]>1){
	for(k=1;k<menuLength[i];k=k+1){
		if(subMenuItems[i][k].length>0){
			subMenuHeight[i][k]=20*subMenuItems[i][k].length+30;
			subMenuValue=i*10+k;
			subTop=-menuHeight[i]+20*k-10;
			if(individualWidth*(i-1)+355<totalWidth){
				subLeft=leftLoc+130;
			}	else{
				subLeft=leftLoc-240;
			};
			document.write('<div id="subMenu'+subMenuValue+'" class="sub" style="position: absolute; width: 240px; height: '+subMenuHeight[i][k]+'px; top: '+subTop+'px; left: '+subLeft+'px; z-index: 2; visibility: hidden;" onMouseover="clearTimeout(delay['+i+']);" onMouseout="delay['+i+']=setTimeout(\'deselect('+i+')\',300);">');
			document.write('<table>');
			for(p=1;p<subMenuItems[i][k].length;p=p+1){
				if(subLinks[i][k][p]!=''){
					subAdress=subLinks[i][k][p];
				}	else{
					subAdress='#';
				};
				subItemValue=i*100+k*10+p;
				document.write('<tr>');
				document.write('<td class="subItem" width="230px"><a href="'+subAdress+'" class="sublinkText">'+subMenuItems[i][k][p]+'</a></td>');
				document.write('</tr>');
			};
			document.write('</table>');
			document.write('</div>');
		};
	};
	};
	menuRepeat[i]=1;
};
};
/*End javascript for w3c browsers*/
}	else{
/*Begin javascript for Netscape 4.x browsers*/
/*Find the width of the window*/
clearMenu=new Array();
colMenu=hdngLength-1;
for(i=1;i<hdngLength;i=i+1){
clearMenu[i]=0;
}
if(window.innerWidth!=null){
	compareWidth=window.innerWidth;
}	else{
	if(document.body.clientWidth!=null){
		compareWidth=document.body.clientWidth;
	}	else{
		compareWidth=99*hdngLength;
	};
};
if(hdngLength*99<compareWidth){totalWidth=compareWidth;}
else{
	totalWidth=99*hdngLength-99;
};

document.write('<div id="top">');
document.write('<table id="headingTable" border="0" width="800" bordercolor="#0000FF">'+
'<tr>'+
'<td id="topMost" width="100%" height="40px" colspan="'+colMenu+'"><a href="#" id="topText" onmouseover="netAllDisappear();">UCLA\'s&nbsp;ePhysics</a></td>'+
'</tr>'+
'<tr>');
for(i=1;i<hdngLength;i=i+1){
	document.write('<td id="head'+i+'" class="netHeading" width="100px" height=40px"><a href="#" class="netHeadingText" onmouseover="netAppear('+i+');netAlmostAllDisappear('+i+');if(clearMenu['+i+']==1){clearTimeout(delay'+i+');};">'+hdng[i]+'</a></td>');
};
document.write('</tr>');
document.write('</table>');
document.write('</div>');
for(i=1;i<hdngLength;i=i+1){
if(menuItems[i][1]!=undefined && menuRepeat[i]==0){
	document.write('<div id="menu'+i+'" class="netMenu">');
	document.write('<table border="0" bordercolor="lime" width="120px">');
	menuLength[i]=menuItems[i].length;
	for(k=1;k<menuLength[i];k=k+1){
		spaceNum=Math.round((26-menuItems[i][k].length)/2.0);
		itemValue=i*10+k;
		document.write('<tr border="0">');
		document.write('<td id="item'+itemValue+'" class="netItem" border="0" width="120px" height="20px"><a href="#" class="netItemText" onmouseover="netAlmostAllSubDisappear('+i+','+k+');netSubAppear('+i+','+k+');if(clearMenu['+i+']==1){clearTimeout(delay'+i+');};" onmouseout="delay'+i+'=setTimeout(\'netDisappear('+i+')\',1500);clearMenu['+i+']=1;">');
		for(p=1;p<spaceNum+1;p=p+1){
			document.write('&nbsp;');
		};
		document.write(menuItems[i][k]);
		for(p=1;p<spaceNum+1;p=p+1){
			document.write('&nbsp;');
		};
		document.write('</a></td>');
		document.write('</tr>');
	};
	document.write('</table>');
	document.write('</div>');
	menuRepeat[i]=1;
	netMenuName='menu'+i;
	document.layers[netMenuName].left=99*i-99;
};
	if(menuItems[i][1]!=undefined){
	for(k=1;k<menuLength[i];k=k+1){
		if(subMenuItems[i][k].length>0){
			subMenuHeight[i][k]=20*subMenuItems[i][k].length+30;
			subMenuValue=i*10+k;
			document.write('<div id="subMenu'+subMenuValue+'" class="netSub">');
			document.write('<table>');
			for(p=1;p<subMenuItems[i][k].length;p=p+1){
				if(subLinks[i][k][p]!=undefined){
					subAdress=subLinks[i][k][p];
				}	else{
					subAdress='#';
				};
				subItemValue=i*100+k*10+p;
				document.write('<tr>');
				document.write('<td class="netSubItem" width="230px"><a href="'+subAdress+'" class="netSubItemText" onmouseover="netNothing();if(clearMenu['+i+']==1){clearTimeout(delay'+i+');};" onmouseout="delay'+i+'=setTimeout(\'netDisappear('+i+')\',1500);clearMenu['+i+']=1;">'+subMenuItems[i][k][p]+'</a></td>');
				document.write('</tr>');
			};
			document.write('</table>');
			document.write('</div>');
		netSubMenuName='subMenu'+subMenuValue;
		document.layers[netSubMenuName].top=100+20*k;
		if(99*(i-1)+350<800){
			document.layers[netSubMenuName].left=99*i-99+117;
		}	else{
			document.layers[netSubMenuName].left=99*i-99-227;
		};
		};
		document.layers[netSubMenuName].top=50+20*k;
	};
	};
};
/*End javascript for Netscape 4.x browsers*/
};
