
if (document.all || document.getElementById){ //if IE4 or NS6+

 document.write('<style type="text/css">\n');
 document.write('.dyncontent{display: none; width: 450px; height: 30px; color: #1D4292; font-size:13px; text-align: left; margin-left:5px;margin-right:5px; padding: 1px; background-color: #FFFFFF;border:0px solid #000000;}\n');
 document.write('</style>');

}

var curcontentindex=0;
var messages=new Array();

function getElementByClass(classname){
 var inc=0;
 var alltags=document.all? document.all : document.getElementsByTagName("*");
 for (i=0; i<alltags.length; i++){
   if (alltags[i].className==classname)
     messages[inc++]=alltags[i];
 }
}

function rotatecontent(){
 //get current message index (to show it):
 curcontentindex=(curcontentindex<messages.length-1)? curcontentindex+1 : 0;
 //get previous message index (to hide it):
 prevcontentindex=(curcontentindex==0)? messages.length-1 : curcontentindex-1;
 messages[prevcontentindex].style.display="none"; //hide previous message
 messages[curcontentindex].style.display="block"; //show current message
}

// change speed of slide here
var slide_in_speed = 600;   // millisecond duration of slide into view
var slide_out_speed = 500;// millisecond duration of slide out of view

function initGlideLayers() {
  var glideLyrs = new Array();

  // Set up your layers here
  // arguments: id, left=0 (offset calculated based on width), top
  glideLyrs[0] = new dynObj('glideDiv0', 0, 130);
//  glideLyrs[1] = new dynObj('glideDiv1', 0, 120);
//  glideLyrs[2] = new dynObj('glideDiv2', 0, 120);
 // glideLyrs[3] = new dynObj('glideDiv3', 0, 120);

  for (var i=0; glideLyrs[i]; i++) {
        // hold original left position
        glideLyrs[i].xOff = -(glideLyrs[i].w + 10);
        glideLyrs[i].shiftTo( glideLyrs[i].xOff, glideLyrs[i].y );
        glideLyrs[i].show();
  }
/*
 if (document.all || document.getElementById){
   getElementByClass("dyncontent");
   setInterval("rotatecontent()", 6000);
 }
    //loadImages();
*/
init_bottom('lnk5','lyr5');init('lnk0','lyr0');
  //  initImgRotation();
  slideEm('glideDiv0'); // Slide first one into view
}

var curGlideLyr;
function slideEm(id) {
  var oldLyr, newLyr;
  // if link for current layer clicked, slide it out of view
    if (curGlideLyr == id) {
    oldLyr = dynObj.getInstance(curGlideLyr);
        oldLyr.slideTo(oldLyr.xOff, null, slide_out_speed, -1);
    curGlideLyr = ""; return;
  }
    // if layer currently in view, set up to slide new one into view
    // after current one slides away
    if (curGlideLyr) {
    oldLyr = dynObj.getInstance(curGlideLyr);
        oldLyr.onSlideEnd = function() {
            dynObj.holder[curGlideLyr].slideTo(10, null, slide_in_speed, -1);
            this.onSlideEnd = function() { if (this.el) this.el = null }
        }
        // slide current layer out of view
        oldLyr.slideTo(oldLyr.xOff, null, slide_out_speed, -1);
    } else {    // if no layer currently in view
    newLyr = dynObj.getInstance(id);
    newLyr.slideTo(550, null, slide_in_speed, -1);
  }
    curGlideLyr = id;
}
function initAll(roadb){
 if (document.all || document.getElementById){
   getElementByClass("dyncontent");
   setInterval("rotatecontent()", 6000);
 }
    loadImages();
//    initImgRotation();
}

//window.onload=initAll;



