	var ims = new Array ("img/menu/smbg.png", "img/menu/smbgo.png", "img/menu/2xk.gif", "img/menu/2xkb.gif", "img/menu/b.gif", "img/menu/bb.gif", "img/menu/j.gif", "img/menu/jb.gif"); 
	
	var i; 
	for (i=0; i<ims.length; i++) { 
		var img = new Image(); 
		img.src = ims[i]; 
	}
	
	var zInd=300
	var tN1, tN2, tN3, tN4, tN5, tN6, tN7, tN8, tN9, tN10, tN11, tN12;   
	var tC1, tC2, tC3, tC4, tC5, tC6, tC7, tC8, tC9, tC10, tC11, tC12;
	var tO1, tO2, tO3, tO4, tO5, tO6, tO7, tO8, tO9, tO10, tO11, tO12;
	var n1=0, n2=0, n3=0, n4=0, n5=0, n6=0, n7=0, n8=0, n9=0, n10=0, n11=0, n12=0;

	function show(id, height){	
		switch(id){
			case 1  : clearTimeout(tO1);  clearInterval(tC1);  clearInterval(tN1); break;
			case 2  : clearTimeout(tO2);  clearInterval(tC2);  clearInterval(tN2); break;
			case 3  : clearTimeout(tO3);  clearInterval(tC3);  clearInterval(tN3); break;
			case 4  : clearTimeout(tO4);  clearInterval(tC4);  clearInterval(tN4); break;
			case 5  : clearTimeout(tO5);  clearInterval(tC5);  clearInterval(tN5); break;
			case 6  : clearTimeout(tO6);  clearInterval(tC6);  clearInterval(tN6); break;
			case 7  : clearTimeout(tO7);  clearInterval(tC7);  clearInterval(tN7); break;
			case 8  : clearTimeout(tO8);  clearInterval(tC8);  clearInterval(tN8); break;
			case 9  : clearTimeout(tO9);  clearInterval(tC9);  clearInterval(tN9); break;
			case 10 : clearTimeout(tO10); clearInterval(tC10); clearInterval(tN10); break;
			case 11 : clearTimeout(tO11); clearInterval(tC11); clearInterval(tN11); break;
			default : clearTimeout(tO12); clearInterval(tC12); clearInterval(tN12);
		}

		
		switch(id){
			case 1 : if (!n1) { tN1 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 2 : if (!n2) { tN2 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 3 : if (!n3) { tN3 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 4 : if (!n4) { tN4 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 5 : if (!n5) { tN5 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 6 : if (!n6) { tN6 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 7 : if (!n7) { tN7 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 8 : if (!n8) { tN8 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 9 : if (!n9) { tN9 = setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 10: if (!n10){ tN10= setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
      case 11: if (!n11){ tN11= setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
     default : if (!n12){ tN12= setInterval("SN("+id+", "+height+")", 10);  document.getElementById(id).style.height="0pt"; document.getElementById(id).style.display="block"; document.getElementById(id).style.zIndex=zInd++;	}	break;
		}
	}

	function hide(id){
		switch(id){
			case 1 : clearInterval(tN1); tC1 = setInterval("SC("+id+")", 10); n1=0; break;
			case 2 : clearInterval(tN2); tC2 = setInterval("SC("+id+")", 10); n2=0; break;
			case 3 : clearInterval(tN3); tC3 = setInterval("SC("+id+")", 10); n3=0; break;
			case 4 : clearInterval(tN4); tC4 = setInterval("SC("+id+")", 10); n4=0; break;
			case 5 : clearInterval(tN5); tC5 = setInterval("SC("+id+")", 10); n5=0; break;
			case 6 : clearInterval(tN6); tC6 = setInterval("SC("+id+")", 10); n6=0; break;
			case 7 : clearInterval(tN7); tC7 = setInterval("SC("+id+")", 10); n7=0; break;
			case 8 : clearInterval(tN8); tC8 = setInterval("SC("+id+")", 10); n8=0; break;
			case 9 : clearInterval(tN9); tC9 = setInterval("SC("+id+")", 10); n9=0; break;
			case 10: clearInterval(tN10);tC10= setInterval("SC("+id+")", 10); n10=0; break;
			case 11: clearInterval(tN11);tC11= setInterval("SC("+id+")", 10); n11=0; break;
		 default : clearInterval(tN12);tC12= setInterval("SC("+id+")", 10); n12=0; 
		}
	}

	function waitTO(id){
		switch(id){
			case 1 : tO1 = setTimeout("hide("+id+")", 300); break;
			case 2 : tO2 = setTimeout("hide("+id+")", 300); break;
			case 3 : tO3 = setTimeout("hide("+id+")", 300); break;
			case 4 : tO4 = setTimeout("hide("+id+")", 300); break;
			case 5 : tO5 = setTimeout("hide("+id+")", 300); break;
			case 6 : tO6 = setTimeout("hide("+id+")", 300); break;
			case 7 : tO7 = setTimeout("hide("+id+")", 300); break;
			case 8 : tO8 = setTimeout("hide("+id+")", 300); break;
			case 9 : tO9 = setTimeout("hide("+id+")", 300); break;
			case 10: tO10= setTimeout("hide("+id+")", 300); break;
			case 11: tO11= setTimeout("hide("+id+")", 300); break;
		 default : tO12= setTimeout("hide("+id+")", 300);
		}
	}

	function clearTO(id){
		switch(id){
			case 1 : clearTimeout(tO1); break;
			case 2 : clearTimeout(tO2); break;
			case 3 : clearTimeout(tO3); break;
			case 4 : clearTimeout(tO4); break;
			case 5 : clearTimeout(tO5); break;
			case 6 : clearTimeout(tO6); break;
			case 7 : clearTimeout(tO7); break;
			case 8 : clearTimeout(tO8); break;
			case 9 : clearTimeout(tO9); break;
			case 10: clearTimeout(tO10); break;
			case 11: clearTimeout(tO11); break;
			default : clearTimeout(tO12);
		}
	}

	function SN(id, height){
		s=document.getElementById(id).style.height.split("px",1)
		if (s=="0pt") s=document.getElementById(id).style.height.split("pt",1)
		if (s>height) {
			switch(id){
				case 1 : clearInterval(tC1); clearInterval(tN1); n1=1; break;
				case 2 : clearInterval(tC2); clearInterval(tN2); n2=1; break;
				case 3 : clearInterval(tC3); clearInterval(tN3); n2=3; break;
				case 4 : clearInterval(tC4); clearInterval(tN4); n2=4; break;
				case 5 : clearInterval(tC5); clearInterval(tN5); n2=5; break;
				case 6 : clearInterval(tC6); clearInterval(tN6); n2=6; break;
				case 7 : clearInterval(tC7); clearInterval(tN7); n2=7; break;
				case 8 : clearInterval(tC8); clearInterval(tN8); n2=8; break;
				case 9 : clearInterval(tC9); clearInterval(tN9); n2=9; break;
				case 10: clearInterval(tC10);clearInterval(tN10);n2=10; break;
				case 11: clearInterval(tC11);clearInterval(tN11);n2=11; break;
			 default : clearInterval(tC12);clearInterval(tN12);n3=12;
			}
		}
		else { document.getElementById(id).style.height=(parseInt(s)+4)+"px"; }
	}

	function SC(id){
		s=document.getElementById(id).style.height.split("px",1);
		if (s=="0pt") s=document.getElementById(id).style.height.split("pt",1);
		if (s<4){
			document.getElementById(id).style.display="none"
			switch(id){
				case 1 : clearInterval(tC1); break;
				case 2 : clearInterval(tC2); break;
				case 3 : clearInterval(tC3); break;
				case 4 : clearInterval(tC4); break;
				case 5 : clearInterval(tC5); break;
				case 6 : clearInterval(tC6); break;
				case 7 : clearInterval(tC7); break;
				case 8 : clearInterval(tC8); break;
				case 9 : clearInterval(tC9); break;
				case 10: clearInterval(tC10); break;
				case 11: clearInterval(tC11); break;
			 default : clearInterval(tC12);
			}
		}
		else document.getElementById(id).style.height=(parseInt(s)-4)+"px";
	}

