var browser="ie4";
var show="visible";
var hide="hidden";
var otag="<div class=pic ";
var ctag="</div>";
var ll=568;
var ly=225;
var np=0;
var wt=0;
texts=new Array();
texta=new Array(); 
textb=new Array(); 
if (document.layers){browser="nn4";}
if (document.getElementById){browser="gecko";}

switch(browser){
case 'nn4':
show="show";hide="hide";
otag='<layer width=150 visibility="hide"';ctag="</layer>";
ww=window.innerWidth;
break;
case 'ie4':
ww=document.body.clientWidth;
break;
case 'gecko':
ww=document.body.clientWidth;
break;
}

function Text(txt,w){
this.txt=txt;
this.w=w;
wt=wt+w;
++np;
}

function mouseOver(j){texta[j].visibility=hide;textb[j].visibility=show;}
function mouseOut(j){textb[j].visibility=hide;texta[j].visibility=show;}
function goTo(i){
Jump(i);
switch(i){
case(0):parent.main.location.href="home.htm";break;
case(1):parent.main.location.href="about.htm";break;
case(2):parent.main.location.href="concerts.htm";break;
case(3):parent.main.location.href="contact.htm";break;
case(4):parent.main.location.href="links.htm";break;
case(5):parent.main.location.href="choral-scholarships.htm";break;
}
}

function Jump(k){
for(j=0;j<np;++j){texta[j].top=ly-12;textb[j].top=texta[j].top;}
texta[k].top=ly+5;
textb[k].top=texta[k].top;
}

texts[0]=new Text("Home",31);
texts[1]=new Text("About ECBC",70);
texts[2]=new Text("Concerts",51);
texts[3]=new Text("Contact Us",60);
texts[4]=new Text("Links",30);
texts[5]=new Text("Scholarships",75);

lx=Math.max((ww-ll)/2,20);
lx=60;
document.write('<div style="position:absolute; left:'+lx+'; top:'+ly+'">'+
'<img src="img/line.gif" height=5 width='+ll+'></div>');

gap=(ll-wt);
j=gap % (np-1);
gap=(gap-j)/(np-1);

for(i=0;i<np;++i){
texts[i].x=lx;
if(i==this_page){texts[i].y=ly+2;}
else{texts[i].y=ly-12;}
lx=lx+texts[i].w+gap;

s1=i+'"><a href=javascript:goTo('+i+'); class=';
s2=' onMouseOver="mouseOver('+i+');" onMouseOut="mouseOut('+i+');">';
document.write(otag+'id="texta'+s1+'m1'+s2+texts[i].txt+'</a>'+ctag);
document.write(otag+'id="textb'+s1+'m2'+s2+texts[i].txt+'</a>'+ctag);
switch(browser){
case 'nn4':
texta[i]=document.layers["texta"+i];textb[i]=document.layers["textb"+i];
break;
case 'ie4':
texta[i]=document.all["texta"+i].style;textb[i]=document.all["textb"+i].style;
break;
case 'gecko':
texta[i]=document.getElementById("texta"+i).style;textb[i]=document.getElementById("textb"+i).style;
break;
}  //end switch
texta[i].left=texts[i].x;
texta[i].top=texts[i].y;
texta[i].visibility=show;
textb[i].left=texts[i].x;
textb[i].top=texts[i].y;
}
