panelbt=new Object;panelbt["0"]=false;panelbt["1"]=false;panelbt["2"]=false;panelbt["3"]=false;panelbt["4"]=false;panelbt["5"]=false;panelbt["6"]=false;panelbt["7"]=false;panelbt["8"]=false;panelbt["9"]=false;dummyvar=0;curpanel=0;theid=0;theidname=new Object;theidname["0"]="panel0";theidname["1"]="panel1";theidname["2"]="panel2";theidname["3"]="panel3";theidname["4"]="panel4";theidname["5"]="panel5";theidname["6"]="panel6";theidname["7"]="panel7";theidname["8"]="panel8";theidname["9"]="panel9";$(document).ready(function(){$('#nmahomepage01 #navi li').click(function(){for(tcount=0;tcount<=9;tcount++){if(this.id=="panel"+tcount){theid=tcount}}if(theid!="0"){thepanelheight=$('#navigpanel').height();if(thepanelheight==0&&!panelbt[theid]){$('#navigpanel').animate({'height':200});panelbt[theid]=true;curpanel=theid;$('#'+theidname[theid]+' a').addClass('current');$('#navigpanel #content'+theid+' div').fadeIn();return false}if(thepanelheight==200){if(panelbt[theid]){closeit(theid)}else{dummyvar=theid;panelbt[curpanel]=false;$('#navigpanel #content'+curpanel+' div').fadeOut(function(){GoFadeIn()})}}}})});function GoFadeIn(){$('#'+theidname[curpanel]+' a').removeClass('current');$('#'+theidname[dummyvar]+' a').addClass('current');panelbt[dummyvar]=true;curpanel=dummyvar;$('#navigpanel #content'+dummyvar+' div').fadeIn()}function closeit(theNum){thepanelheight=$('#navigpanel').height();if(thepanelheight==200){$('#navigpanel').animate({'height':0},function(){for(tcount=0;tcount<=9;tcount++){panelbt[tcount]=false;$('#navigpanel #content'+tcount+' div').hide()}$('#'+theidname[theNum]+' a').removeClass('current')});curpanel=0}}
