
if((tour_mode != null) && (tour_mode != "null"))
{
   //Tour name text
   var ttxt;
   if(tour_mode == TOUR_OVERVIEW) 	ttxt = "Overview";
   else if(tour_mode == TOUR_CUSTOMER)	ttxt = "Customer";
   else if(tour_mode == TOUR_PEMPLOYEE)	ttxt = "Prospective Employee";
   else if(tour_mode == TOUR_CEMPLOYEE)	ttxt = "Current Employee";
   
   //Previous step determination
   var beginFlag = false;
   var endFlag = false;
   var newspubFlag = false;
   var oppFlag = false;
   var nlFlag = false;
   var tourFlag = true;
   var pStep = "";
   var nStep = "";
   if(tour_mode == TOUR_OVERVIEW)  //Overview Tour
   {
      switch(cpage)
      {
         case "otour_begin":	beginFlag = true; pStep = null; nStep = "about.html"; break;
         case "about":		pStep = "otour_begin.html"; nStep = "mission.html"; break;
         case "mission":	pStep = "about.html"; nStep = "values.html"; break;
         case "values":		pStep = "mission.html"; nStep = "windmill.html"; break;
         case "windmill":	pStep = "values.html"; nStep = "history.html"; break;
         case "history":	pStep = "windmill.html"; nStep = "quality.html"; break;
         case "quality":	pStep = "history.html"; nStep = "capabilities.html"; break;
         case "capabilities":	pStep = "quality.html"; nStep = "cap_cnc_turn.html"; break;
         case "cap_cnc_turn":	pStep = "capabilities.html"; nStep = "cap_cnc_drill.html"; break;
         case "cap_cnc_drill":	pStep = "cap_cnc_turn.html"; nStep = "cap_cnc_bal.html"; break;
         case "cap_cnc_bal":	pStep = "cap_cnc_drill.html"; nStep = "cap_cnc_shape.html"; break;
         case "cap_cnc_shape":	pStep = "cap_cnc_bal.html"; nStep = "cap_cnc_grind.html"; break;
         case "cap_cnc_grind":	pStep = "cap_cnc_shape.html"; nStep = "cap_heat.html"; break;
         case "cap_heat":	pStep = "cap_cnc_grind.html"; nStep = "cap_assembly.html"; break;
         case "cap_assembly":	pStep = "cap_heat.html"; nStep = "contact.html"; break;
         case "contact":	endFlag= true; pStep = "cap_assembly.html"; nStep = null; break;        
         default:		tourFlag = false; break; //End the tour because they stepped out of line
      }
   }
   else if(tour_mode == TOUR_CUSTOMER)  //Customer Tour
   {
      switch(cpage)
      {
         case "ctour_begin":	beginFlag = true; pStep = null; nStep = "about.html"; break;
         case "about":		pStep = "ctour_begin.html"; nStep = "mission.html"; break;
         case "mission":	pStep = "about.html"; nStep = "values.html"; break;
         case "values":		pStep = "mission.html"; nStep = "windmill.html"; break;
         case "windmill":	pStep = "values.html"; nStep = "history.html"; break;
         case "history":	pStep = "windmill.html"; nStep = "ctour_cap.html"; break;
         case "ctour_cap":	pStep = "history.html"; nStep = "quality.html"; break;
         case "quality":	pStep = "ctour_cap.html"; nStep = "capabilities.html"; break;
         case "capabilities":	pStep = "quality.html"; nStep = "cap_cnc_turn.html"; break;
         case "cap_cnc_turn":	pStep = "capabilities.html"; nStep = "cap_cnc_drill.html"; break;
         case "cap_cnc_drill":	pStep = "cap_cnc_turn.html"; nStep = "cap_cnc_bal.html"; break;
         case "cap_cnc_bal":	pStep = "cap_cnc_drill.html"; nStep = "cap_cnc_shape.html"; break;
         case "cap_cnc_shape":	pStep = "cap_cnc_bal.html"; nStep = "cap_cnc_grind.html"; break;
         case "cap_cnc_grind":	pStep = "cap_cnc_shape.html"; nStep = "cap_heat.html"; break;
         case "cap_heat":	pStep = "cap_cnc_grind.html"; nStep = "cap_assembly.html"; break;
         case "cap_assembly":	pStep = "cap_heat.html"; nStep = "ctour_sg.html"; break;
         case "ctour_sg":	pStep = "cap_assembly.html"; nStep = "solutions.html"; break;
         case "solutions":	pStep = "ctour_sg.html"; nStep = "ctour_cs.html"; break;
         case "ctour_cs":	pStep = "solutions.html"; nStep = "casestudies.html"; break;
         case "casestudies":	pStep = "ctour_cs.html"; nStep = "news_pub.html"; break;
         case "news_pub":	pStep = "casestudies.html"; nStep = "contact.html"; newspubFlag = true; break;
         case "contact":	endFlag= true; pStep = "news_pub.html"; nStep = null; break;        
         default:		tourFlag = false; break; //End the tour because they stepped out of line         
      }
   }
   else if(tour_mode == TOUR_PEMPLOYEE)  //Prospective Employee Tour
   {
      switch(cpage)
      {
         case "eptour_begin":	beginFlag = true; pStep = null; nStep = "about.html"; break;
         case "about":		pStep = "eptour_begin.html"; nStep = "mission.html"; break;
         case "mission":	pStep = "about.html"; nStep = "values.html"; break;
         case "values":		pStep = "mission.html"; nStep = "windmill.html"; break;
         case "windmill":	pStep = "values.html"; nStep = "history.html"; break;
         case "history":	pStep = "windmill.html"; nStep = "careers.html"; break;
         case "careers":	pStep = "history.html"; nStep = "opportunities.html"; break;
         case "opportunities":	pStep = "careers.html"; nStep = "news.html"; oppFlag = true; break;
         case "news":		pStep = "opportunities.html"; nStep = "news_pub.html"; break;
         case "news_pub":	pStep = "news.html"; nStep = "contact.html"; newspubFlag = true; break;         
         case "contact":	endFlag= true; pStep = "news_pub.html"; nStep = null; break;        
         default:		tourFlag = false; break; //End the tour because they stepped out of line         
      }
   }
   else if(tour_mode == TOUR_CEMPLOYEE)  //Current Employee Tour
   {
      switch(cpage)
      {
         case "ectour_begin":	beginFlag = true; pStep = null; nStep = "about.html"; break;
         case "about":		pStep = "ectour_begin.html"; nStep = "mission.html"; break;
         case "mission":	pStep = "about.html"; nStep = "values.html"; break;
         case "values":		pStep = "mission.html"; nStep = "windmill.html"; break;
         case "windmill":	pStep = "values.html"; nStep = "history.html"; break;
         case "history":	pStep = "windmill.html"; nStep = "news.html"; break;
         case "news":		pStep = "history.html"; nStep = "newsletter.html"; break;
         case "newsletter":	pStep = "news.html"; nStep = "news_pub.html"; nlFlag = true; break;         
         case "news_pub":	pStep = "newsletter.html"; nStep = "contact.html"; newspubFlag = true; break;         
         case "contact":	endFlag= true; pStep = "news_pub.html"; nStep = null; break;        
         default:		tourFlag = false; break; //End the tour because they stepped out of line         
      }
   }
   
   if(tourFlag)
   {
      //Writing content
      var tstr = "";
      if(beginFlag) tstr = "Begin ";
      var estr = "";
      if(endFlag) estr = " Complete";
      if(newspubFlag)
      {
         document.write("<center><hr class=tourtop><p class=tourendtext>" + tstr + ttxt + " Tour" + estr + "</p>");
         document.write("<p class=tourendtext2>You can click any of the links to publications without diverting from the tour.</p>");
      }
      else if(nlFlag)
      {
         document.write("<center><hr class=tourtop><p class=tourendtext>" + tstr + ttxt + " Tour" + estr + "</p>");
         document.write("<p class=tourendtext2>You can click any of the links to the newsletters without diverting from the tour.</p>");
      }
      else if(oppFlag)
      {
         document.write("<center><hr class=tourtop><p class=tourendtext>" + tstr + ttxt + " Tour" + estr + "</p>");
         document.write("<p class=tourendtext2>You can click any of the links to the jobs displayed without diverting from the tour.<br>If you would like to apply, please first finish our tour, and then you will be able to link back to the online application.</p>");
      }
      else if(!endFlag)
         document.write("<center><hr class=tourtop><p class=tourtext>" + tstr + ttxt + " Tour" + estr + "</p>");
      else if(endFlag)
      {
         document.write("<center><hr class=tourtop><p class=tourendtext>" + tstr + ttxt + " Tour" + estr + "</p>");
         if(tour_mode == TOUR_PEMPLOYEE)
            document.write("<p class=tourendtext2>If you would now like to apply online, please <a href=\"apply.html\">click here</a>.<br>Also, you may contact us for additional information using the information and links above.</p>");
         else
            document.write("<p class=tourendtext2>You may contact us for additional information using the information and links above.</p>");
      }
      if(!beginFlag)
         document.write("<img id=tback src=tourback.jpg onmouseover=\"document.getElementById('tback').src = 'tourback_down.jpg'; document.getElementById('tback').style.cursor = 'pointer';\" onmouseout=\"document.getElementById('tback').src = 'tourback.jpg';\" onclick=\"window.location.href='" + pStep + "';\">");
      if(!beginFlag && !endFlag)
         document.write("&nbsp;&nbsp;");
      if(!endFlag)
         document.write("<img id=tforw src=tourforw.jpg onmouseover=\"document.getElementById('tforw').src = 'tourforw_down.jpg'; document.getElementById('tforw').style.cursor = 'pointer';\" onmouseout=\"document.getElementById('tforw').src = 'tourforw.jpg';\" onclick=\"window.location.href='" + nStep + "';\">");
      document.write("<hr class=tourbottom></center>");
   }
   else
   {
      setCookie("tourmode", "null");
      tour_mode = null;
   }
}
document.write("<p class=footertxt>&copy; 2007 - " + new Date().getFullYear() + " <a class=nounderline href=\"index.html\">Daco, Inc.</a>");
document.write("<br>609 Airport Rd | North Aurora, IL | 60542");
document.write("<br>Phone 630-897-8797 | Fax 630-897-4076 | <a class=nounderline href=\"mailto:Sales@Dacoinc.com\">Sales@Dacoinc.com</a></p>");
document.write("<div class=credit><a class=nounderline href=\"mailto:EricTheProgrammer@yahoo.com\">Web Design</a> By Eric Lindgren</div>");
document.write("</td></tr><tr height=15><td width=10 class=navcell></td><td class=navcell></td></tr>");
document.write("</td></tr><tr height=10><td width=10 class=navcell><table border=0 cellpadding=0 cellspacing=0><tr height=10><td width=10 class=cornerSW></td><td class=navcell></td></tr></table></td><td class=navcell><table border=0 cellpadding=0 cellspacing=0><tr height=10><td width=650 class=navcell></td><td width=10 class=cornerSE></td></tr></table></td></tr>");

