/**********************************************************************
*
* Scripts for Integration Technologies
*
* URL:     http://www.integrationtech.biz/
* Revised: 07/Jan/2007
*
**********************************************************************/

function doFooter() {

  if (Date.parse(document.lastModified) == 0) { 
  		lastModDate = new Date(); 
  }
  else { 
    lastModDate = new Date(document.lastModified); 
  }

  lastModYear = lastModDate.getYear();
  lastModMonth = lastModDate.getMonth();
  lastModDay = lastModDate.getDate();
  var mthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

  if (lastModYear < 1000) { lastModYear += 1900; }   // added for Y2K bug
  if (lastModYear < 2000) { lastModYear += 100; }    // added for IE4 bug

  var output = "";
  
  output += "<p class='footer'>";
  output += "Updated: " + mthNames[lastModMonth] + " " + lastModDay + ", " + lastModYear + ". ";
  output += "Please contact the <a href='mailto:webmaster@integrationtech.biz'>Site Administrator</a> if you have any issues, questions or comments.";
  output += "</p>";
  
  document.write(output);
}

function doHeader() {
  var imgheight = "100";
  var images = new Array("top_tanks.jpg","top_controlroom.jpg","top_touchscreen.jpg","top_cables.jpg","top_circuit.jpg");
  var labels = new Array("Photo of storage tank","Photo of control room","Photo of engineering touchscreen","Photo of computer cables","Photo of circuit board");
  var imgwidths = new Array("99","99","99","99","99");

  var output = "";
  output += "<table width='100%' cellpadding='4' cellspacing='0' align='center' bgcolor='#000000'>";
  output += "<tr align='center'>";
  
  for (var i=0; i<images.length; i++) {
    output += "<td width='20%'>";
    output += "<img src='images/" + images[i] + "' height='" + imgheight + "' width='" + imgwidths[i] + "' alt='" + labels[i] + "'>";     
    output += "</td>";
  }
  
  output += "</tr>";
  output += "</table>";
  
  document.write(output);
}

function doNavigation(vlink) {
  var links = new Array("Home","Experience","Clients","Automation","Maintenance","Other Services","Contact Us");
  var urls = new Array("index.html","experience.html","clients.html","automation.html","maintenance.html","other_services.html","contact.html");
 
  var output = "";
  
  for (var i=0; i<links.length; i++) {
    if (vlink == links[i]) {
      output += "<div class='leftnavbox2'>";
      output += "<span class='selected'>" + links[i] + "</span><br/>"; 
    }
    else {
      output += "<div class='leftnavbox'>";
      output += "<a href='" + urls[i] + "' class='nav'>" + links[i] + "</a>";     
    }
    output += "</div>";
  }
   
  output += "<div class='sidebar'>";
  output += "828-651-0455<br/>Asheville, NC";
  output += "</div>";  
  output += "<div class='sidebar'>";
  output += "704-578-9514<br/>Charlotte, NC";
  output += "</div>";
  output += "<div class='sidebar'>";
  output += "<a href='mailto:info@integrationtech.biz' class='email'>info@integrationtech.biz</a>";
  output += "</div>";
  
  document.write(output);
}


