// JavaScript for Millennial Health Services Mold Miners site
// Author: Susan L. Bolander, Webworks7 (www.webworks7.com), except where otherwise noted
// Date: April 2005

// --------- Prevent this site from being framed ----------------

if (self != top)
{
  top.location = self.location
}


//---------- Verify that page has loaded --------------------------------

// This function is called when the pages have completely loaded, which prevents the MouseOver event from triggering before the groups have been defined (this had been a problem when using Netscape)

var ready = "no";

function done()
{
  ready = "yes";
}

//------------- Pop-Up Menus -----------------------------

var submenus = " "

submenus += "<div style='position: absolute; top: 170px; left: 450px;' onmouseover='HideAll()'><img src='empty.gif' height='550' width='20' border='0' alt='' /></div>"

// ------------------------------

submenus += "<div id='about_us_menu' class='nav' style='position: absolute; top: 470px; left: 200px; visibility: hidden;'>"

submenus += "<a href='code_of_ethics.html' class='nav'>Code of Ethics<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/><\/div>"

// ------------------------------

submenus += "<div id='training_menu' class='nav' style='position: absolute; top: 140px; left: 200px; visibility: hidden;'>"

submenus += "<a href='home_study.html' class='nav'>Home Study<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='mold_mentor_program.html' class='nav'>Optional Apprenticeship Program<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='testimonials.html' class='nav'>Testimonials<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='enroll.html' class='nav'>How to Enroll<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/><\/div>"

// ------------------------------

submenus += "<div id='products_menu' class='nav' style='position: absolute; top: 370px; left: 200px; visibility: hidden;'>"

submenus += "<a href='mold_testing_equipment.html' class='nav'>Testing Equipment<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='self_help_products.html' class='nav'>Self-Help Products<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='mold_remediation_equipment.html' class='nav'>Remediation Equipment<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/><\/div>"

// ------------------------------

submenus += "<div id='mold_info_menu' class='nav' style='position: absolute; top: 230px; left: 200px; visibility: hidden;'>"

submenus += "<a href='mold_and_health.html' class='nav'>Mold and Your Health<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"

submenus += "<a href='news.html' class='nav'>In the News<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/>"


submenus += "<a href='mold_questions.html' class='nav'>FAQs About Mold<\/a><img src='empty.gif' height='1' width='5' alt='' \/><br \/><\/div>"

//  --------------------------------

submenus += "<div id='government_standards_menu'>&nbsp;<\/div>"

submenus += "<div id='contact_us_menu'>&nbsp;<\/div>"

submenus += "<div id='links_menu'>&nbsp;<\/div>"

// ------------------------------

function ShowIt(thingtoshow)

{
if(ready)
{
HideAll()

if(document.layers)
  {
   eval('document.' + thingtoshow + '.visibility="visible"')
   }

if(document.all)
   {
   eval('document.all.' + thingtoshow + '.style.visibility="visible"')
   }

if(!document.all && document.getElementById)
   {
   document.getElementById(thingtoshow).style.visibility="visible";
   }

}
}

function HideAll()

{

if(document.layers)
   {
   document.about_us_menu.visibility="hidden"
   document.training_menu.visibility="hidden"
   document.products_menu.visibility="hidden"
   document.mold_info.visibility="hidden"
   document.contact_us_menu.visibility="hidden"
   document.links_menu.visibility="hidden"
   }

if(document.all)
   {
   document.all.about_us_menu.style.visibility="hidden"
   document.all.training_menu.style.visibility="hidden"
   document.all.products_menu.style.visibility="hidden"
   document.all.mold_info_menu.style.visibility="hidden"
   document.all.contact_us_menu.style.visibility="hidden"
   document.all.links_menu.style.visibility="hidden"
   }

if(!document.all && document.getElementById)
   {
   document.getElementById('about_us_menu').style.visibility="hidden"
   document.getElementById('training_menu').style.visibility="hidden"
   document.getElementById('products_menu').style.visibility="hidden"
   document.getElementById('mold_info_menu').style.visibility="hidden"
   document.getElementById('contact_us_menu').style.visibility="hidden"
   document.getElementById('links_menu').style.visibility="hidden"
   }

}

//--------------------------------------------------------
// This function creates a new window for showing the reports. It was needed because IE6
// has automatic image resize that makes the image too small

var NewWindow

function MakeNewWindow(title, filename)
{

  if (!NewWindow || NewWindow.closed)
  {
    NewWindow = window.open("","","status=0,10,10,toolbar=1,dependent=1,scrollbars=1,resizable=1")
  }
 
  NewWindow.resizeTo(screen.availWidth*.8,screen.availHeight*.85)
  
  if (!NewWindow.opener)
  {
    NewWindow.opener = window
  }

var NewContent = ""

NewContent = "<html><head><title>"
NewContent+=title
NewContent+="</title></head><body topmargiin='0' leftmargin='0' marginheight='0' marginwidth='0'bgcolor='#ffffff'><center><img src='"

NewContent+=filename

NewContent+="' alt='Scanned report' /></center></body></html>"

NewWindow.document.write(NewContent)
NewWindow.moveTo(20,20)
NewWindow.document.close()
NewWindow.focus()

}


