

function checkVersion() {
  if (navigator.appVersion.charAt(0)>=3) return true;
  else return false;
}


standard = new MakeArray(13);
over = new MakeArray(13);


        function MakeArray(n) {
                this.length = n
                for (var i = 0; i<=n; i++) {
                        this[i] = new Image()
                }
                 return this
        }

        function msover(num) {
                if (checkVersion()) {
                        if (over[num].src != "") {
                                document.images[num].src = over[num].src
                        }

                }
        }

        function msout(num) {
                if (checkVersion()) 
                        if (standard[num].src != "") 
                                document.images[num].src = standard[num].src
        }

        var bannerID=0
        function text(msg,ctrlwidth) {
            msg = " --- "+msg
            newmsg = msg
            while (newmsg.length < ctrlwidth) {
                 newmsg += msg
            }
            document.write ('<FORM NAME="Scrolltext">');
            document.write ('<CENTER><INPUT NAME="text" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+' ></CENTER>');
            document.write ('</FORM>');
            var bannerID = null
            rollmsg()
        }

        function rollmsg() {
            NowMsg = document.Scrolltext.text.value
            NowMsg = NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
            document.Scrolltext.text.value = NowMsg
            bannerID = setTimeout("rollmsg()",100)//change the number 100 to represent the speed of the scroll. The larger the number the slower it moves
       }

imagebase = "images"
baseurl ="";

function buildMenu(title) {
  var cnt=1;
  document.write('<div id="wrapper">');
  document.write('<div id="logo" class="logolink">');
  document.write('<center><a href="'+baseurl+'index.html"><img src="'+imagebase+'/cvrslogo.gif" width=125></a></center>');
  document.write('</div>');
  document.write('<div id="nav">');

         
  if(title == "aboutus" ||  title == "profiles" || title == "news" || title =="events" || title == "funding" || title=="event" || title=="sops" || title=="goals" ) {
    document.write('<img src="'+imagebase+'/aboutus.gif" border=0 width="150" height="25">');
    cnt++;

    if(title == "aboutus") {
        document.write('<img src="'+imagebase+'/aboutus2.gif" width="150" height="25">');       
    } else {
        standard[cnt].src = imagebase+"/aboutus2.gif";
        over[cnt].src = imagebase+"/aboutus2_over.gif";
        document.write('<a href="'+baseurl+'aboutus.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/aboutus2.gif" border=0 width="150" height="25"></a>');
    }
    cnt++;

    if (title == "profiles") {
        document.write('<img src="'+imagebase+'/profiles.gif" border=0 width="150" height="25"></a>');
    } else {
        standard[cnt].src = imagebase+"/profiles.gif";
        over[cnt].src = imagebase+"/profiles_over.gif";
        document.write('<a href="'+baseurl+'../cgi-bin/profiles.cgi" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/profiles.gif" border=0 width="150" height="25"></a>');
    }
    cnt++;

    if (title == "goals") {
	document.write('<img src="'+imagebase+'/goals.gif" border=0 width="150" height="25"></a>');
    } else {
  	standard[cnt].src = imagebase+"/goals.gif";
        over[cnt].src = imagebase+"/goals_over.gif";
        document.write('<a href="'+baseurl+'goals.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/goals.gif" border=0 width="150" height="25"></a>');	
    } 
    cnt++;

    if (title == "news") {
	document.write('<img src="'+imagebase+'/news.gif" border=0 width="150" height="25"></a>');
    } else {
  	standard[cnt].src = imagebase+"/news.gif";
        over[cnt].src = imagebase+"/news_over.gif";
        document.write('<a href="'+baseurl+'news.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/news.gif" border=0 width="150" height="25"></a>');	
    } 
    cnt++;

    if (title == "events") {
	document.write('<img src="'+imagebase+'/events.gif" border=0 width="150" height="25"></a>');
    } else {
  	standard[cnt].src = imagebase+"/events.gif";
        over[cnt].src = imagebase+"/events_over.gif";
        document.write('<a href="'+baseurl+'events.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/events.gif" border=0 width="150" height="25"></a>');	
    } 
    cnt++;

    if (title == "funding") {
	document.write('<img src="'+imagebase+'/funding.gif" border=0 width="150" height="25"></a>');
    } else {
  	standard[cnt].src = imagebase+"/funding.gif";
        over[cnt].src = imagebase+"/funding_over.gif";
        document.write('<a href="'+baseurl+'funding.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/funding.gif" border=0 width="150" height="25"></a>');	
    } 
    cnt++;

    if (title == "sops") {
	document.write('<img src="'+imagebase+'/sops.gif" border=0 width="150" height="25"></a>');
    } else {
  	standard[cnt].src = imagebase+"/sops.gif";
        over[cnt].src = imagebase+"/sops_over.gif";
        document.write('<a href="'+baseurl+'sops.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
        document.write('<img src="'+imagebase+'/sops.gif" border=0 width="150" height="25"></a>');	
    } 
    cnt++;

  } else {
    standard[cnt].src = imagebase+"/aboutus.gif";
    over[cnt].src = imagebase+"/aboutus_over.gif";
    document.write('<a href="'+baseurl+'aboutus.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/aboutus.gif" border=0 width="150" height="25"></a>');
    cnt++;
  }

  if (title == "services") {
    document.write('<img src="'+imagebase+'/services.gif" border=0 width="150" height="25"></a>');
  } else {    
    standard[cnt].src = imagebase+"/services.gif";
    over[cnt].src = imagebase+"/services_over.gif";
    document.write('<a href="'+baseurl+'services.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/services.gif" border=0 width="150" height="25"></a>');
  }
  cnt++;

  if (title == "equipment") {
    document.write('<img src="'+imagebase+'/equipment.gif" border=0 width="150" height="25"></a>');
  } else {    
    standard[cnt].src = imagebase+"/equipment.gif";
    over[cnt].src = imagebase+"/equipment_over.gif";
    document.write('<a href="'+baseurl+'equipment.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/equipment.gif" border=0 width="150" height="25"></a>');
  }
  cnt++;

  if (title == "contactus") {
    document.write('<img src="'+imagebase+'/contactus.gif" border=0 width="150" height="25"></a>');
  } else {    
    standard[cnt].src = imagebase+"/contactus.gif";
    over[cnt].src = imagebase+"/contactus_over.gif";
    document.write('<a href="'+baseurl+'contactus.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/contactus.gif" border=0 width="150" height="25"></a>');
  }
  cnt++;

  if (title == "links") {
    document.write('<img src="'+imagebase+'/links.gif" border=0 width="150" height="25"></a>');
  } else {    
    standard[cnt].src = imagebase+"/links.gif";
    over[cnt].src = imagebase+"/links_over.gif";
    document.write('<a href="'+baseurl+'links.html" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/links.gif" border=0 width="150" height="25"></a>');
  }
  cnt++;

  if (title == "members") {
    document.write('<img src="'+imagebase+'/members.gif" border=0 width="150" height="25"></a>');
  } else {    
    standard[cnt].src = imagebase+"/members.gif";
    over[cnt].src = imagebase+"/members_over.gif";
    document.write('<a href="'+baseurl+'members/" onmouseover="msover('+cnt+');" onmouseout="msout('+cnt+');">');
    document.write('<img src="'+imagebase+'/members.gif" border=0 width="150" height="25"></a>');
  }
  cnt++;

  document.write('</div>');
  document.write('<div id="banner"><center><img src="'+imagebase+'/banner.jpg"></center></div>');


}
