var GURLRoot = "http://www.atozed.com";
var GNavMenuText = new Array();
var GNavMenuPath = new Array();

function MenuNavAdd(AText, APath) {
  GNavMenuText[GNavMenuText.length] = AText;
  if (APath == "") { 
    APath = AText;
  }
  GNavMenuPath[GNavMenuPath.length] = APath;
}

function MenuNav(ADocument) {
var LText = "";
var LPath = "";
  for (i = 0; i < GNavMenuText.length; i++) {
    LPath = LPath + "/" + GNavMenuPath[i];
    LText = LText + "<A href=\"" + LPath + "\">" + GNavMenuText[i] + "</A>";
    if (i < GNavMenuText.length - 1) {
      LText = LText + "&nbsp;&nbsp;&#187;&nbsp;&nbsp;";
    }
  }
  ADocument.write(LText);
}

function WriteTitle(ADocument, ASection, ASectionName) {
  ADocument.write("<P class=section align=right>" + ASectionName + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P>");
}

function WriteViewlet(ADocument, AViewlet) {
  ADocument.write('This page requires Flash, If you do not have Flash installed you may see a blank square.'
   + '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
   + ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"' 
   + ' WIDTH=600 HEIGHT=416>'
   + '<param name=movie value="' + AViewlet + '">'
   + '<param name=quality value=high>'
   + '<param name=bgcolor value=ffffff>'
   + '<PARAM NAME="Play" VALUE="-1">'
   + '<PARAM NAME="Loop" VALUE="-1">'
   + '<EMBED src="' + AViewlet + '" quality=high bgcolor="ffffff"'
   + ' WIDTH=600 HEIGHT=416'
   + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
   + '</Object>'
   );
}

function WriteMovie(ADocument, AMovie) {
  WriteMovieSized(ADocument, AMovie, 639, 511);
  ADocument.write('<P align=center>Please wait while movie loads.</br>Demos built with <a href="/TurboDemo" target=TurboDemo>TurboDemo</A>.</P>');
}

function WriteMovieSized(ADocument, AMovie, AWidth, AHeight) {
  ADocument.write(
   '<P align=center>'
   + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + AWidth + '" height="' + AHeight + '">'
   + '  <param name=movie value="http://www.atozed.com/TD/' + AMovie + '.swf">'
   + '  <param name=play VALUE=true>'
   + '  <param name=loop VALUE=true>'
   + '  <param name=quality value=low>'
   + '  <embed src="http://www.atozed.com/TD/' + AMovie + '.swf" quality=low pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '">'
   + ' </embed>'
   + '</object>'
   + '</P>'
   );
}

function WriteMovieSizedAutoStart(ADocument, AMovie, AWidth, AHeight) {
  ADocument.write(
   '<P align=center>'
   + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' + AWidth + '" height="' + AHeight + '">'
   + '  <param name=movie value="http://www.atozed.com/TD/' + AMovie + '.swf">'
   + '  <param name=play VALUE=true>'
   + '  <param name=loop VALUE=true>'
   + '  <param name=quality value=best>'
   + '  <param name="flashVars" value="autostart=true">'
   + '  <embed src="http://www.atozed.com/TD/' + AMovie + '.swf" quality=best flashVars="autostart=true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '">'
   + ' </embed>'
   + '</object>'
   + '</P>'
   );
}

function WriteMasterMenuItem(AText, APage, ADot) {
  var LHTML = "&nbsp;&nbsp;<A class=menulink href=\"/" + APage + "\">"
   + AText + "</A>&nbsp;&nbsp;";
  if (ADot == true) {
    LHTML = LHTML + "|";
  }
  return LHTML;
}

function WriteMasterMenu(ADocument) {
  ADocument.write(
   WriteMasterMenuItem("Home", "Home.html", true)
   + WriteMasterMenuItem("About", "About.html", true)
   + WriteMasterMenuItem("Contact", "Contact.html", true)
   + WriteMasterMenuItem("Downloads", "Downloads.html", true)
   + WriteMasterMenuItem("Links", "Links.html", true)
   + WriteMasterMenuItem("Products", "Products/", true)
   + WriteMasterMenuItem("Support", "Support.html", false)
   );
}

function Popup(AURL) {
  window.open(AURL, "AtozedNotice", "scrollbars=yes, resizable=yes, directories=no, width=300, height=400, left=300, top=100, location=no, menubar=no, status=no, titlebar=no, toolbar=no", true);
}

function WriteBanner(ADocument, ASection) {
  var LBannerURL = GURLRoot + "/" + ASection + "/" + ASection + ".swf";

  ADocument.write("<P align=center>"
   + "<OBJECT codeBase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" height=60 width=468 align=middle classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME=\"_cx\" VALUE=\"12383\"><PARAM NAME=\"_cy\" VALUE=\"1588\"><PARAM NAME=\"FlashVars\" VALUE=\"12383\"><PARAM NAME=\"Movie\" VALUE=\"" + LBannerURL + "\">"
   + "<PARAM NAME=\"Src\" VALUE=\"" + LBannerURL + "\"><PARAM NAME=\"WMode\" VALUE=\"Window\"><PARAM NAME=\"Play\" VALUE=\"-1\"><PARAM NAME=\"Loop\" VALUE=\"-1\"><PARAM NAME=\"Quality\" VALUE=\"High\"><PARAM NAME=\"SAlign\" VALUE=\"\"><PARAM NAME=\"Menu\" VALUE=\"-1\"><PARAM NAME=\"Base\" VALUE=\"\"><PARAM NAME=\"AllowScriptAccess\" VALUE=\"always\"><PARAM NAME=\"Scale\" VALUE=\"ShowAll\"><PARAM NAME=\"DeviceFont\" VALUE=\"0\"><PARAM NAME=\"EmbedMovie\" VALUE=\"0\">"
   + "<PARAM NAME=\"BGColor\" VALUE=\"\"><PARAM NAME=\"SWRemote\" VALUE=\"\">"
   + "<embed src=\"" + LBannerURL + "\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"468\" height=\"60\" align=\"middle\"></embed>"
   + "</OBJECT>"
   + "</BR>"
   + "Add this banner to your site! <A href=\"" + GURLRoot + "/" + ASection + "/" + "banner.aspx\">Details</A></P>"
   + "<P></P>"
   );
}

function WriteFrame(ADocument, AURL, AWidth, AHeight, AMarginWidth, AMarginHeight, AScroll) {
  ADocument.write("<IFRAME src=\"" + AURL + "\" frameBorder=0 "
   + "width=\"" + AWidth + "\" scrolling=" + AScroll + " height=\"" + AHeight + "\""
   + " marginWidth=" + AMarginWidth
   + " marginHeight=" + AMarginHeight + ">"
   + "</IFRAME>"
   );
}

function WriteReview(ADocument) {
var dothis = Math.floor(Math.random() * 3);

  if (dothis == 0) {
    var LMsg = Math.floor(Math.random() * GReviewMsg.length);
    var LText = "<Font size=2 style=arial color=#00BB88>" + GReviewMsg[LMsg] + "</Font>"
     + "<P align=center><U>" + GReviewSrc[LMsg] + "</U></P>"
     + "<P class=quotes align=right><A href=\"/intraweb/reviews.aspx\">Read More Reviews</A></P>";
  } else if (dothis == 1) {
    var LMsg = Math.floor(Math.random() * GQuoteMsg.length);
    var LText = "<Font size=2 style=arial color=#00BB88>" + GQuoteMsg[LMsg] + "</Font>"
     + "<P align=center><U>" + GQuotePerson[LMsg] + "</U></P>"
     + "<P class=quotes align=right><A href=\"/intraweb/Quotes.aspx\">Read More Quotes</A></P>";
  } else if (dothis == 2) {
    var LMsg = Math.floor(Math.random() * GStudyMsg.length);
    var LText = "<Font size=2 style=arial color=#00BB88>" + GStudyMsg[LMsg] + "</Font>"
     + "<P align=center><U>" + GStudySrc[LMsg] + "</U></P>"
     + "<P class=quotes align=right><A href=\"/intraweb/studies\">Read More Case Studies</A></P>";
  }
  ADocument.write(LText);
}

function MenuDefaultNamed(ADocument, APage) {
  if (APage == "") { APage = "Menu.html"; }
  WriteFrame(ADocument, APage, 125, "100%", 0, 0, "auto");
}

function MenuCommon(ADocument, ASection) {
  WriteFrame(ADocument, GURLRoot + "/" + ASection + "/MenuCommon.html", 600, 25, 0, 0, "no");
}

function MenuNavOld(ADocument) {
  WriteFrame(ADocument, "MenuNav.html", 500, 30, 0, 10, "no");
}

