var randomQuote = new Array()

/* --------------preloading images-------------- */

  if(document.images)
  {
    var offMainArray = new Array()

/* --------------load menu bar graphics-------------- */

    offMainArray["menuHead1"] = new Image(72.19)
    offMainArray["menuHead2"] = new Image(69.19)
    offMainArray["menuHead3"] = new Image(72.19)
    offMainArray["menuHead4"] = new Image(108.19)
    offMainArray["menuHead5"] = new Image(101.19)

    offMainArray["menuHead1"].src = "../pageGraphics/products.gif"
    offMainArray["menuHead2"].src = "../pageGraphics/pricing.gif"
    offMainArray["menuHead3"].src = "../pageGraphics/specials.gif"
    offMainArray["menuHead4"].src = "../pageGraphics/techSupport.gif"
    offMainArray["menuHead5"].src = "../pageGraphics/onlineStore.gif"

    offMainArray["awards"] = new Image(46.13)
    offMainArray["schoolsServed"] = new Image(96.13)
    offMainArray["faq"] = new Image(26.13)
    offMainArray["dealers"] = new Image(47.13)
    offMainArray["freeStuff"] = new Image(60.13)
    offMainArray["ordering"] = new Image(53.13)
    offMainArray["aboutUs"] = new Image(57.13)
    offMainArray["siteMap"] = new Image(54.13)
    offMainArray["home"] = new Image(35.13)

    offMainArray["awards"].src = "../pageGraphics/awards.gif"
    offMainArray["schoolsServed"].src = "../pageGraphics/schoolsServed.gif"
    offMainArray["faq"].src = "../pageGraphics/faq.gif"
    offMainArray["dealers"].src = "../pageGraphics/dealers.gif"
    offMainArray["freeStuff"].src = "../pageGraphics/freeStuff.gif"
    offMainArray["ordering"].src = "../pageGraphics/ordering.gif"
    offMainArray["aboutUs"].src = "../pageGraphics/aboutUs.gif"
    offMainArray["siteMap"].src = "../pageGraphics/siteMap.gif"
    offMainArray["home"].src = "../pageGraphics/home.gif"

    offMainArray["defaultDescr"] = new Image(460.47)

    offMainArray["defaultDescr"].src = "../boxDescr/defaultDescr.gif"

    offMainArray["earlyLearning"] =  new Image(123.32)
    offMainArray["math"] =  new Image(38.32)
    offMainArray["language"] =  new Image(75.32)
    offMainArray["sciSoc"] =  new Image(196.32)

    offMainArray["earlyLearning"].src = "../productsGraphics/earlyLearning.gif"
    offMainArray["math"].src = "../productsGraphics/math.gif"
    offMainArray["language"].src = "../productsGraphics/language.gif"
    offMainArray["sciSoc"].src = "../productsGraphics/sciSoc.gif"

  var onMainArray = new Array()

/* --------------load submenu bar graphics-------------- */

    onMainArray["menuHead1"] = new Image(72.19)
    onMainArray["menuHead2"] = new Image(69.19)
    onMainArray["menuHead3"] = new Image(72.19)
    onMainArray["menuHead4"] = new Image(108.19)
    onMainArray["menuHead5"] = new Image(101.19)

    onMainArray["menuHead1"].src = "../pageGraphics/productsMO.gif"
    onMainArray["menuHead2"].src = "../pageGraphics/pricingMO.gif"
    onMainArray["menuHead3"].src = "../pageGraphics/specialsMO.gif"
    onMainArray["menuHead4"].src = "../pageGraphics/techSupportMO.gif"
    onMainArray["menuHead5"].src = "../pageGraphics/onlineStoreMO.gif"

    onMainArray["awards"] = new Image(46.13)
    onMainArray["schoolsServed"] = new Image(96.13)
    onMainArray["faq"] = new Image(26.13)
    onMainArray["dealers"] = new Image(47.13)
    onMainArray["freeStuff"] = new Image(60.13)
    onMainArray["ordering"] = new Image(53.13)
    onMainArray["aboutUs"] = new Image(57.13)
    onMainArray["siteMap"] = new Image(54.13)
    onMainArray["home"] = new Image(35.13)

    onMainArray["awards"].src = "../pageGraphics/awardsMO.gif"
    onMainArray["schoolsServed"].src = "../pageGraphics/schoolsServedMO.gif"
    onMainArray["faq"].src = "../pageGraphics/faqMO.gif"
    onMainArray["dealers"].src = "../pageGraphics/dealersMO.gif"
    onMainArray["freeStuff"].src = "../pageGraphics/freeStuffMO.gif"
    onMainArray["ordering"].src = "../pageGraphics/orderingMO.gif"
    onMainArray["aboutUs"].src = "../pageGraphics/aboutUsMO.gif"
    onMainArray["siteMap"].src = "../pageGraphics/siteMapMO.gif"
    onMainArray["home"].src = "../pageGraphics/homeMO.gif"

/* --------------load descriptions used on the first page-------------- */

    onMainArray["abcDescr"] = new Image(460.70)
    onMainArray["profDescr"] = new Image(440.48)
    onMainArray["cwbDescr"] = new Image(460.47)
    onMainArray["defaultDescr"] = new Image(460.47)
    onMainArray["matho1Descr"] = new Image(447.70)
    onMainArray["matho2Descr"] = new Image(447.48)
    onMainArray["sssDescr"] = new Image(440.70)
    onMainArray["wwmDescr"] = new Image(456.48)


    onMainArray["abcDescr"].src = "../boxDescr/abcDescr.gif"
    onMainArray["profDescr"].src = "../boxDescr/profDescr.gif"
    onMainArray["cwbDescr"].src = "../boxDescr/cwbDescr.gif"
    onMainArray["defaultDescr"].src = "../boxDescr/defaultDescr.gif"
    onMainArray["matho1Descr"].src = "../boxDescr/matho1Descr.gif"
    onMainArray["matho2Descr"].src = "../boxDescr/matho2Descr.gif"
    onMainArray["sssDescr"].src = "../boxDescr/sssDescr.gif"
    onMainArray["wwmDescr"].src = "../boxDescr/wwmDescr.gif"
    
    onMainArray["earlyLearning"] =  new Image(123.32)
    onMainArray["math"] =  new Image(38.32)
    onMainArray["language"] =  new Image(75.32)
    onMainArray["sciSoc"] =  new Image(196.32)

    onMainArray["earlyLearning"].src = "../productsGraphics/earlyLearningMO.gif"
    onMainArray["math"].src = "../productsGraphics/mathMO.gif"
    onMainArray["language"].src = "../productsGraphics/languageMO.gif"
    onMainArray["sciSoc"].src = "../productsGraphics/sciSocMO.gif"    
  }

/* --------------end preloader-------------- */

function closeWindow()
{
  window.close();
}

function imageOn(imgName)
  {
    if(document.images)
    {
      document.images[imgName].src = onMainArray[imgName].src
    }
  }

  function imageOff(imgName)
  {
    if(document.images)
    {
      document.images[imgName].src = offMainArray[imgName].src
    }
  }

  function setMsg(msg)
  {
    window.status = msg
    return true
  }
  
  function changeDescr(boxTitle)
  {
    if(document.images)
    {
      document.boxDescription.src = onMainArray[boxTitle].src
    }
  }

  function changeDescrBack()
  {
    if(document.images)
    {
      document.boxDescription.src = "../boxDescr/defaultDescr.gif"
    }
  }


  monthName = new Array ("January", "Feburary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
  now = new Date


  var productInfo = new Array()

  productInfo[0] = "Micrograms' Award Winning programs guide students to mastery of specific curriculum objectives."
  productInfo[1] = "Mathosaurus I"
  productInfo[2] = "ABC World"
  productInfo[3] = "Granny Applebees Cookie Factory"
  productInfo[4] = "Wild West Math"
  productInfo[5] = "Mathosaurus II"
  productInfo[6] = "Chuck Wagon Bill's Language Skills"
  productInfo[7] = "Super Science Show"

  var arrayCount = productInfo.length

  function showInfo(thisBox)
  {
    document.boxInfo.description.value = productInfo[thisBox]
  }


 /* --------------begin coding the drop down menu-------------- */
  var menuTop = 45;
  var menuLeft = 400;
  var domSMenu = null;
  var oldDomSMenu = null;
  var t = 0;
  var lDelay = 3;
  var lCount = 0;
  var pause = 100;

  function popMenu(menuNum)
  {
    if(isDHTML)
    {
      t = 2;
      if(oldDomSMenu)
      {
        oldDomSMenu.visibility = 'hidden';
        oldDomSMenu.zIndex = '0';
        t = 2;
        lCount = 0;
      }
      var idMenu = 'menuHead';
      var domMenu = findDOM(idMenu,0);
      var idMenuOpt = 'menuHead' + menuNum;
      var domMenuOpt = findDOM(idMenuOpt,0);
      var idSMenu = 'menu' + menuNum;
      var domSMenu = findDOM(idSMenu,1);

      if(isID || isAll)
      {
        var menuLeft = (domMenu.offsetLeft) + (domMenuOpt.offsetLeft) + 5;
        var menuTop = (domMenu.offsetTop) + (domMenu.offsetHeight) + 0;
      }
      if(isLayers)
      {
        var menuLeft = document.layers[idMenu].layers[idMenuOpt].pageX - 1;
        var menuTop = domMenu.pageY + domMenu.clip.height - 0;
      }
      if(oldDomSMenu != domSMenu)
      {
        domSMenu.left = menuLeft;
        domSMenu.top = menuTop;
        domSMenu.visibility = 'visible';
        domSMenu.zIndex = '100';
        oldDomSMenu = domSMenu;
      }
      else
      {
        oldDomSMenu = null;
      }
    }
    else
    {
      return null;
    }
  }

  function delayHide()
  {
    if((oldDomSMenu) && (t == 0))
    {
      oldDomSMenu.visibility = 'hidden';
      oldDomSMenu.zIndex = '0';
      oldDomSMenu = null;
      lCount = 0;
      return false;
    }
    if(t == 2)
    {
      lCount = 0;
      return false;
    }
    if(t == 1)
    {
      lCount = lCount + 1;
      if(lDelay <= lCount)
      {
        t = 0;
      }
      if(lDelay >= lCount)
      {
        setTimeout('delayHide(' + t + ')',pause);
      }
    }
  }



 /* --------------beginning coding pop-up hypertext-------------- */
 
  function findLivePageWidth()
  {
    if(window.innerWidth != null)
    {
      return window.innerWidth;
    }
    if(document.body.clientWidth != null)
    {
      return document.body.clientWidth;
    }
    return(null);
  }

function popUp(evt,objectID)
{
  if(isDHTML)
  {
    var livePageWidth = findLivePageWidth();
    //alert(livePageWidth);
    domStyle = findDOM(objectID,1);
    dom = findDOM(objectID,0);
    state = domStyle.visibility;

    if (dom.offsetWidth)
    {
      elemWidth = dom.offsetWidth;
    }
    else
    {
      if(dom.clip.width)
      {
        elemWidth = dom.clip.width;
      }
    }

    if(state == "visible" || state == "show")
    {
      domStyle.visibility = "hidden";
    }
    else
    {
  	  if(evt.pageY)
  	  {
  		topVal = evt.pageY + 4;
  		leftVal = evt.pageX - (elemWidth / 2);
  	  }
  	  else
   	  {
  	    if (evt.y)
  	    {
   			topVal = evt.y + 4 + document.body.scrollTop;
  			leftVal = evt.x - (elemWidth / 2) + document.body.scrollLeft;
  	    }
      }

      if(leftVal < 2)
      {
        leftVal = 2;
      }
      else
      {
        if((leftVal + elemWidth) > livePageWidth)
        {
          leftVal = leftVal - (elemWidth / 2);
        }
      }

      domStyle.top = topVal; // Positions the element from the top
      domStyle.left = leftVal; // Positions the element from the left
      domStyle.visibility = "visible"; // Makes the element visable
    }
  }
}


/* --------------function used to make pop up windows-------------- */

function openWindow(contentURL, windowName, windowWidth, windowHeight)
{
  widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
  newWindow = window.open(contentURL,windowName,widthHeight);
  newWindow.focus()
}


/* --------------cycling banner of comments-------------- */

var randomQuote = new Array(
"../pageGraphics/com01.gif",
"../pageGraphics/com02.gif",
"../pageGraphics/com03.gif",
"../pageGraphics/com04.gif",
"../pageGraphics/com05.gif",
"../pageGraphics/com06.gif",
"../pageGraphics/com07.gif",
"../pageGraphics/com08.gif",
"../pageGraphics/com09.gif",
"../pageGraphics/com10.gif",
"../pageGraphics/com11.gif",
"../pageGraphics/com12.gif",
"../pageGraphics/com13.gif",
"../pageGraphics/com14.gif",
"../pageGraphics/com15.gif",
"../pageGraphics/com16.gif",
"../pageGraphics/com17.gif",
"../pageGraphics/com18.gif",
"../pageGraphics/com19.gif",
"../pageGraphics/com20.gif",
"../pageGraphics/com21.gif",
"../pageGraphics/com22.gif",
"../pageGraphics/com23.gif",
"../pageGraphics/com24.gif",
"../pageGraphics/com25.gif",
"../pageGraphics/com26.gif")

function randomComment()
{
  var arrayCount = randomQuote.length
  var randomNum = Math.floor((Math.random() * arrayCount))
  document.comment.src = randomQuote[randomNum]
  setTimeout("randomComment()",1 * 15000)  
}


/* --------------cycling banner of schools served-------------- */

var adImages = new Array(
"../leftSideGraphics/button3MM.gif",
"../leftSideGraphics/button3MM1.gif",
"../leftSideGraphics/button3MM2.gif",
"../leftSideGraphics/button3MM3.gif",
"../leftSideGraphics/button3MM4.gif",
"../leftSideGraphics/button3MM5.gif")

thisAd = 0
imgCt = adImages.length

function rotate()
{
  if(document.images)
  {
    thisAd++
    if(thisAd == imgCt)
    {
      thisAd = 0
      document.adBanner.src = adImages[thisAd]
      setTimeout("rotate()",1 * 2000)
    }
    else
    {
      if(thisAd == (imgCt - 1))
      {
        document.adBanner.src = adImages[thisAd]
        setTimeout("rotate()",1 * 10000)    
      }
      else
      {    
        document.adBanner.src = adImages[thisAd]
        setTimeout("rotate()",1 * 200)
      }
    }
  }
}




/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/




var menu1=new Array()
menu1[0]='<a href = "../mainPages/productsPage.htm"><u><center>PROGRAMS WITH <i>EASY TRACK</i><br>for XP, Vista, OS10 thru Leopard</center></u></a>'
menu1[1]='<a href = "../products/abcWorld.htm">&nbsp;ABC World</a>'
menu1[2]='<a href = "../products/shutterbugJake.htm">&nbsp;Shutterbug Jake and the Sounds <br />&nbsp;&nbsp; Letters Make</a>'
menu1[3]='<a href = "../products/lettersHome.htm">&nbsp;Letters Home from Camp Tadpole</a>'
menu1[4]='<a href = "../products/picturePhonics.htm">&nbsp;Picture Phonics</a>'
menu1[5]='<a href = "../products/mathosaurusI.htm">&nbsp;Mathosaurus I</a>'
menu1[6]='<a href = "../products/mathosaurusII.htm">&nbsp;Mathosaurus II</a>'
menu1[7]='<a href = "../products/clockFaces.htm">&nbsp;Clock Faces</a>'
menu1[8]='<a href = "../products/pennyPanda.htm">&nbsp;Penny Panda\'s Sticker Store</a>'
menu1[9]='<a href = "../products/dancingDinos.htm">&nbsp;Dancing Dinos</a>'
menu1[10]='<a href = "../products/ponderingProblems.htm">&nbsp;Pondering Problems</a>'
menu1[11]='<a href = "../products/sportsDesk.htm">&nbsp;Sports Desk with Jim Shortz</a>'
menu1[12]='<a href = "../products/wildWestMath.htm">&nbsp;Wild West Math</a>'
menu1[13]='<a href = "../products/fractions.htm">&nbsp;Fractions with Professor Von Strudel</a>'
menu1[14]='<a href = "../products/numberBall.htm">&nbsp;Numberball</a>'
menu1[15]='<a href = "../products/chuckWagonBill.htm">&nbsp;Chuck Wagon Bill\'s Language Skills</a>'
menu1[16]='<a href = "../products/martysFamilyReader.htm">&nbsp;Marty\'s Family Reader</a>'
menu1[17]='<a href = "../products/topReadersClub.htm">&nbsp;Top Readers\' Club</a>'
menu1[18]='<a href = "../products/thatSpellingIsRight.htm">&nbsp;That Spelling is Right!</a>'
menu1[19]='<a href = "../products/wordZapper.htm">&nbsp;Word Zapper</a>'
menu1[20]='<a href = "../products/superScienceShow.htm">&nbsp;Super Science Show</a>'
menu1[21]='<a href = "../products/mapsAndGraphs.htm">&nbsp;Maps and Graphs with Miss Melberry</a>'
menu1[22]='<a href = "../products/facesAndPlaces.htm">&nbsp;Faces and Places</a>'

var menu2=new Array()
menu2[0]='<a href =  "../mainPages/schoolOrders.htm">&nbsp;Product Prices and &nbsp;Catalog Numbers</a>'

var menu3=new Array()
menu3[0]='<a href = "http://www.micrograms.com/specials"><center><font color=black><b>Network Value Pack<br>67% Off !<br>School Saves $2000</b></center></a>'
menu3[1]='<a href = "http://www.micrograms.com/specials1"><center><font color=black><b>Classroom Special<br>Three Programs<br>just $49.85 !</b></center></a>'
menu3[2]='<a href = "../mainPages/specialsPage.htm#2for1Special"><center><font color=white>Sports Desk 2 for 1 Intro Special</center></a>'
menu3[3]='<a href = "../mainPages/specialsPage.htm#networkSpecial">&nbsp;Network Special</a>'
menu3[4]='<a href = "../mainPages/specialsPage.htm#bundlePack">&nbsp;Bundle Pack Special</a>'
menu3[5]='<a href = "../mainPages/onlineStore.htm">&nbsp;Home Study Special</a>'

var menu4=new Array()
menu4[0]='<a href = "../mainPages/techSupport.htm#win">&nbsp;Windows</a>'
menu4[1]='<a href = "../mainPages/techSupport.htm#mac">&nbsp;Macintosh</a>'
menu4[2]='<a href = "../mainPages/techSupport.htm#etupdates">&nbsp;Easy Track Updates</a>'
menu4[3]='<a href = "../mainPages/techSupport.htm#tips">&nbsp;Easy Track Tips</a>'

var menu5=new Array()
menu5[0]='<a href = "../mainPages/schoolOrders.htm">&nbsp;Materials for Schools</a>'
menu5[1]='<a href = "../mainPages/onlineStore.htm#earlyos">&nbsp;Materials for Home Use</a>'


var menuwidth='165px' //default menu width
var menubgcolor='9999FF'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?


var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype)
{
  var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
  var parentEl=what.offsetParent;
  while (parentEl!=null)
  {
    totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
    parentEl=parentEl.offsetParent;
  }
  return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth)
{
  if (ie4||ns6)
  dropmenuobj.style.left=dropmenuobj.style.top="-500px"
  if (menuwidth!="")
  {
    dropmenuobj.widthobj=dropmenuobj.style
    dropmenuobj.widthobj.width=menuwidth
  }
  if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
  obj.visibility=visible
  else if (e.type=="click")
  obj.visibility=hidden
}

function iecompattest()
{
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge)
{
  var edgeoffset=0
  if (whichedge=="rightedge")
  {
    var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
    dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
    if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
    edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
  }
  else
  {
    var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
    var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
    { //move up?
      edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
      if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
        edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
    }
  }
  return edgeoffset
}

function populatemenu(what)
{
  if (ie4||ns6)
  dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth)
{
  if (window.event) event.cancelBubble=true
  else if (e.stopPropagation) e.stopPropagation()
  clearhidemenu()
  dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
  populatemenu(menucontents)

  if (ie4||ns6)
  {
    showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
    dropmenuobj.x=getposOffset(obj, "left")
    dropmenuobj.y=getposOffset(obj, "top")
    dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
    dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
  }
  return clickreturnvalue()
}

function clickreturnvalue()
{
  if (ie4||ns6) return false
  else return true
}

function contains_ns6(a, b)
{
  while (b.parentNode)
  if ((b = b.parentNode) == a)
  return true;
  return false;
}

function dynamichide(e)
{
  if (ie4&&!dropmenuobj.contains(e.toElement))
  delayhidemenu()
  else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
  delayhidemenu()
}

function hidemenu(e)
{
  if (typeof dropmenuobj!="undefined")
  {
    if (ie4||ns6)
    dropmenuobj.style.visibility="hidden"
  }
}

function delayhidemenu()
{
  if (ie4||ns6)
  delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu()
{
  if (typeof delayhide!="undefined")
  clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
  document.onclick=hidemenu