ie = document.all;
n4 = document.layers;
w3 = document.getElementById;

/*ROLLOVER oben----------------------------------------------------------------------------------------------------*/
function navTop(imgIndex,path,img,isOver)
{
		if(isOver)
			{document.images[imgIndex].src   = path + 'h' + img + '.gif';}
		else
			{document.images[imgIndex].src   = path + 'n' + img + '.gif';}
}


/*ROLLI fuer Layer-----------------------------------------------*/
function rolliNav(pfad,L,LimgIndex,imgIndex,imgNr,isOver)
{
	if(document.getElementById)
		{
			if(isOver)
				{document.images[imgIndex].src   = pfad + '_h_' + imgNr + '.gif';}
			else
				{document.images[imgIndex].src   = pfad + '_n_' + imgNr + '.gif';}
		}
	else
		{
			if(ie)
				{
					if(isOver)
						{document.images[imgIndex].src   = pfad + '_h_' + imgNr + '.gif';}
					else
						{document.images[imgIndex].src   = pfad + '_n_' + imgNr + '.gif';}
				}
			else
				{
					if(document.layers)
						{
							if(isOver)
								{document.layers[L].document.images[LimgIndex].src   = pfad + '_h_' + imgNr + '.gif';}
							else
								{document.layers[L].document.images[LimgIndex].src   = pfad + '_n_' + imgNr + '.gif';}
						}
				}
		}
				

}



/*LAYER Oeffnen-----------------------------------------------------------------------------------------------------------*/
function openLayer(MAZ,ALayer,hight,MoveA,MoveE)
{
closeAll(6,48,90,132,174,216,258,300,342,10);

	if(document.getElementById)
		{
			wert = hight;
			diff = wert-39;
			/*vom Wert wird die Höhe des HM-Buttons abgezogen*/
			if(document.getElementById(ALayer).style.clip == 'rect(0px 138px ' + wert + 'px 0px)')
				{
					a=1; 
				}
			else
				{
					document.getElementById(ALayer).style.clip = 'rect(0px 138px ' + wert + 'px 0px)';
					for(Start=MoveA; Start<MoveE; Start++)
						{
							c = 'UM' + Start;

							d = parseFloat(document.getElementById(c).style.top);

							d += diff;	
					
							Layer = 'UM' + Start;
		
							document.getElementById(Layer).style.top = d;
			
						}		
				}
		}
	else
		{
			if(document.all)
				{
					wert = hight;
					diff = wert-39;
					/*vom Wert wird die Höhe des HM-Buttons abgezogen*/
					if(document.all[ALayer].style.clip == 'rect(0px 138px ' + wert + 'px 0px)')
						{
							a=1; 
						}
					else
						{
							document.all[ALayer].style.clip = 'rect(0px 138px ' + wert + 'px 0px)';
							for(Start=MoveA; Start<MoveE; Start++)
								{
									c = 'UM' + Start;
									d = parseFloat(document.all[c].style.top);
									d += diff;							
									Layer = 'UM' + Start;
									document.all[Layer].style.top = d;
								}
						}
				}
			else
				{
					if(document.layers)
						{
							wert = hight;
							diff = wert-39;
							/*vom Wert wird die Höhe des HM-Buttons abgezogen*/
							if(document.all[ALayer].style.clip == 'rect(0px 138px ' + wert + 'px 0px)')
								{
									a=1; 
								}
							else
								{
									document.all[ALayer].style.clip = 'rect(0px 138px ' + wert + 'px 0px)';
									Start = MoveA;
									while(MoveA <= MoveE)
									{
										c = 'nav' + Start;
										c = parseFloat(document.all[c].style.top);
										c += diff;
										Layer = 'nav' + Start;
										document.all[Layer].style.top = c;
										Start +=1;
									}
								}
							}
					}
			}
			}




function closeAll(Pos1,Pos2,Pos3,Pos4,Pos5,Pos6,Pos7,Pos8,Pos9,MAZ)
{
a=1;
Position = a;
Position -=1;
Pos = arguments[Position];


if(document.getElementById)
	{
		while(a < MAZ)
			{
				
				b = 'UM' + a;
				Pos = arguments[Position];
				document.getElementById(b).style.clip = 'rect(0px 138px 39px 0px)';
				document.getElementById(b).style.top = Pos;
				a +=1;
				Position +=1;
			}
	}
else
	{	
		if(document.layers)
			{
				while(a < MAZ)
					{
						b = 'UM' + a;
						Pos = arguments[Position];
						document.layers[b].clip.bottom = 39;
						document.layers[b].top = Pos;
						a +=1;
						Position +=1;													
					}
			}
		else
			{
				while(a < MAZ)
					{
						b = 'UM' + a;
						Pos = arguments[Position];
						document.all[b].style.clip = 'rect(0px 138px 39px 0px)';
						document.all[b].style.top = Pos;
						a +=1;
						Position +=1;
					}
			}
}
}

