
var _homeDir = "/";
var _cssDir = _homeDir + "css/";
var _jsDir = _homeDir + "js/";
var _imagesDir = _homeDir + "images/";

var langCodes = new Array("en", "es", "de", "it");
var langLuxCountries = new Array("eng", "spa", "ger", "ital");
var langCountries = new Array("England", "Spain", "Germany", "Italy");
var langNames = new Array("English", "Spanish", "German", "Italian");
var langInclude = new Array(true, true, true, true);

var withMenu = 1;
var withNav = 2;
var withNavFlag = 3;


function WriteMetaTags()
{
 document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />");
 document.write("<meta name=\"Keywords\" content=\"optimization modeling maximal software MPL OptiMax\" />");
}

function WriteStyleTags()
{
 document.write(" <style type=\"text/css\">");
 document.write("  @import url(\""+_cssDir+"master.css\");");
 document.write("  @import url(\""+_cssDir+"sections.css\");");
 document.write("  @import url(\""+_cssDir+"simpletree.css\");");
 document.write(" </style>");
 document.write(" <link rel=\"stylesheet\" type=\"text/css\" media=\"print\" href=\""+_cssDir+"print.css\" />");
 document.write(" <!--[if lte IE 6]>");
 document.write("  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\""+_cssDir+"ie6styles.css\" />");
 document.write(" <![endif]-->");
 document.write(" <!--[if IE 7]>");
 document.write("  <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\""+_cssDir+"ie7styles.css\" />");
 document.write(" <![endif]-->");
}

function WriteScriptTags()
{
 document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\""+_jsDir+"treemenu.js\" ></script>");
 document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\""+_jsDir+"menu.js\"></script>");
 document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\""+_jsDir+"s_images.js\"></script>");
 document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\""+_jsDir+"rotator.js\"></script>");
}

function WriteTopBannerTags()
{
 document.write(" <div id=\"container\">"); 
 document.write("  <div id=\"top_logo\"><a href=\""+_homeDir+"\"><img src=\""+_imagesDir+"top_off.jpg\" alt=\"maximal\" border=\"0\" title=\"HOME\" /></a></div>");  
 document.write("  <div id=\"top\"><div id=\"slogan\">Optimizing Business Applications</div></div>");
 document.write("  <div id=\"yellow_menu\">");
 document.write("   <div class=\"yellow_menu\">");
 writeTopMenu();  // Calls the function to write the menu");
 ddtreemenu.createTree("TopMenu", false);  // Activates menu by id and set if the menu it's persistent or not");
 document.write("   </div>");
 document.write("  </div>"); 
 document.write("  <div id=\"mainContent\">");
}

function WriteLeftMenuTags()
{
   document.write("   <div id=\"left_menu\">");
   document.write("    <div class=\"left_image\"></div>");
   writeLeftMenu();
   ddtreemenu.createTree("Menu", true);
   document.write("   </div>"); 
 document.write("   <div id=\"info_sections\">");
}



function WriteNavigationTags(headerText, backRef, tocRef, forwRef)
{
 document.write("   <div id=\"info_manual\">");
 document.write("    <div id=\"nav_manual\">");
 document.write("     <div id=\"corner1\">" + headerText + "</div>");
 document.write("     <div id=\"corner2\"></div>");
 document.write("     <div class=\"arrow_forw spacer_nav\"><a href=\"" + forwRef + ".html\"></a></div>");
 document.write("     <div class=\"toc spacer_nav\"><a href=\"" + tocRef + ".html\"></a></div>");
 document.write("     <div class=\"arrow_back spacer_nav\"><a href=\"" + backRef + ".html\"></a></div>");	  
 document.write("    </div>");
}

function WriteFlagTags(pageName, currLang)
{
 document.write("  <div id=\"flags\">");
 for (i = 0; i<langNames.length; i++) {
    if (currLang != langNames[i]) {
      document.write("   <div class=\"flag_place\"><a href=\"../"+langCodes[i]+"/"+pageName+".html\"><img src=\""+_imagesDir+"flags/"+langLuxCountries[i]+".gif\" alt=\""+langNames[i]+"\"  border=\"0\" /></a></div>");
    }
 }
 document.write("  </div>");
}


function WriteBottomTags()
{
 document.write("   </div>");  //info_sections
 document.write("  </div>");  //mainContent
 document.write("  <div id=\"footer\">Copyright (c) 1994-2008 Maximal Software, Inc. All rights reserved. --- <a href=\"http://www.luxred.com\">Website by LuxRed</a></div>");
 document.write(" </div>");  //Container
}

/*-------------------------------------------------------------------------------*/

function InfoHeaders()
{
  WriteMetaTags();
  WriteStyleTags();
  WriteScriptTags();
}

function InfoBodyTop()
{
  WriteTopBannerTags();
}


function InfoBodyMenu()
{
  WriteTopBannerTags();
  WriteLeftMenuTags();
}

function InfoBodyNav(headerText, backRef, tocRef, forwRef)
{
  WriteTopBannerTags();
  WriteNavigationTags(headerText, backRef, tocRef, forwRef);
}

function InfoBodyFlags(pageName, currLang)
{
  WriteFlagTags(pageName, currLang);
}


function InfoBodyBottom()
{
  WriteBottomTags();
}


