//DROP-DOWN MENU

ns=window.navigator.appName == "Netscape"
ie=window.navigator.appName == "Microsoft Internet Explorer"

function dropLinks(x) {
if(ns) {
	showbox= document.layers[x+1]
		showbox.visibility = "show";
			showbox.top=57;
       
    var items = 5      ;
     for (i=1; i<=items; i++) {
      elopen=document.layers[i]
        if (i != (x + 1)) { 
          elopen.visibility = "hide"}
            }
  }    

if(ie) {
   curEl = event.toElement
   curEl.style.background = "#FFFFFF url(Graphics/arrowgreen.gif) right no-repeat"	  

   showBox = document.all.box[x];
     showBox.style.visibility = "visible";
        showBox.style.top = 57;
         
   var items = 5 
    for (i=0; i<items; i++) {
      elOpen=document.all.box[i]
       barEl=document.all.mnubar[i]
        if (i != x){ 
          elOpen.style.visibility = "hidden" 
          barEl.style.background = "#EFD35A"
       }
     }
   }
}

function closeLinks() {
   var items = 5 
     for (i=0; i<items; i++) {
       if(ie){
        document.all.box[i].style.visibility = "hidden"
          barEl=document.all.mnubar[i]
           barEl.style.background = "#EFD35A" 

       }
       if(ns){ document.layers[i+1].visibility = "hide"}          
}
}


//LEFT SIDE MENU NAVIGATION

var Open = ""
var Closed = ""

function whenLoad(){
if(document.images){
	Open = new Image(16,13)    
	Closed = new Image(16,13)
	Open.src = "Graphics/open.gif"
	Closed.src = "Graphics/closed.gif"
}}

function clickMenu(what,what2){
if (what.style.display=='none'){
what.style.display='';
what2.src=Open.src
}
else{
what.style.display='none'
what2.src=Closed.src
}
}


//IMAGE ROLLOVERS

if (document.images) {
form = new Image()
email = new Image()
yellowform = new Image()
yellowemail = new Image()

form.src = 'Graphics/form.gif'
email.src = 'Graphics/email.gif'
yellowform.src = 'Graphics/yellowform.gif'
yellowemail.src = 'Graphics/yellowemail.gif'
}

else {
form = ""
email = ""
yellowform = ""
yellowemail = ""
}

function highlightOff(num) {
	if (num == "0") {document.images[0].src = form.src}
	if (num == "1") {document.images[1].src = email.src}
	}

function highlightOn(num) {
	if (num == "0") {document.images[0].src = yellowform.src}
	if (num == "1") {document.images[1].src = yellowemail.src}
}


//POP-UP WINDOWS

function showDiagram(whichDiagram) {
	diagramWindow = window.open(whichDiagram, 'diagramPage', 'width=780, height=520 scrollbars=yes resizable=yes');}


//Writes the Whole Bottom

function writeBNB() {

//Writes gap after images and before green

document.write ("<div id=gapsmall onmouseover=closeLinks()><br></div>");

//Writes the bottom navigation bar

document.write ("<div id=homebottom onmouseover=closeLinks()><br><br><br><p class=lowerLinks><a href=Abouti3Nanotec/Abouti3NanoTec.html>About &nbsp;i3 Nanotec</a> |   <a href=MembraneTechnologies/MembraneTechnologies.html>Membrane Technologies</a> | <a href=Products/Products.html>Products</a> | <a href=Services/Services.html>Services</a> | <a href=MajorApp/MajorApp.html>Major Applications</a> | <a href=Forms/InquiryForm.html>Inquiry Form</a> | <a href=Abouti3Nanotec/ContactUs.html>Contact Us</a></p><p class=small>Copyright &copy; 2009, <a href=index.html>i3 Nanotec LLC</a></p></div></td></tr></table>");}

//Writes the whole top

function writeWholeTop() {

//Writes topmost table stuff after head

document.write ("<p><table border=1 width=780 cellpadding=0 cellspacing=0 align=left bordercolor=#000000><tr><td>");

//Writes the grey back portion

document.write ("<div id=homegreyback onmouseover=closeLinks()><table class=top border=0 width=100% cellspacing=0 cellpadding=0><tr><td width=63%></td><td width=19%><a href=Forms/InquiryForm.html onMouseOver=highlightOn(0); window.status='INQUIRY FORM'; return true onMouseOut=highlightOff(0) target=_parent><img src=Graphics/form.gif></a></td><td width=18%><a href=Abouti3Nanotec/ContactUs.html onMouseOver=highlightOn(1); window.status='CONTACT US';return true onMouseOut=highlightOff(1) target=_parent><img src=Graphics/email.gif></a></td></tr></table></div>");

//Writes the navigation bar

document.write ("<div id = navigation><table border=0 class=navigation cellpadding=0 cellspacing=0 width=100%><tr><td><a href=Abouti3Nanotec/Abouti3NanoTec.html onmouseover=dropLinks(0); window.status='ABOUT i3 NANOTEC'; return true id = mnubar> About &nbsp;i3 Nanotec </a><a href=MembraneTechnologies/MembraneTechnologies.html onmouseover=dropLinks(1); window.status='MEMBRANE TECHNOLOGIES'; return true id = mnubar> Membrane Technologies </a><a href=Products/Products.html onmouseover=dropLinks(2); window.status='PRODUCTS'; return true id = mnubar> Products </a><a href=Services/Services.html onmouseover=dropLinks(3); window.status='SERVICES'; return true id = mnubar> Services </a><a href=MajorApp/MajorApp.html onmouseover=dropLinks(4); window.status='MAJOR APPLICATIONS'; return true id = mnubar> Major Applications </a></td></tr></table></div>");

//Writes the dropdown menu for the navigation bar

//Writes the About Drop

document.write ("<div id=box style=left:1><table class=subbox cellpadding=0 cellspacing=0 width=150px><tr><tr><td><a href=Abouti3Nanotec/Partners.html onmouseover='window.status=\"PARTNERS\"; return true'>Partners</a><br></td></tr><tr><td><a href=Abouti3Nanotec/ContactUs.html onmouseover='window.status=\"CONTACT US\"; return true'>Contact Us</a></td></tr></tr></table></div>");

//Writes the Membrane Technologies Drop

document.write ("<div id=box style=left:150><table class=subbox cellpadding=0 cellspacing=0 width=185px><tr><tr><td><a href=MembraneTechnologies/Pervaporation.html onmouseover= 'window.status=\"PERVAPORATION\"; return true'>Pervaporation</a></td></tr><tr><td><a href=MembraneTechnologies/VaporPermeation.html onmouseover='window.status=\"VAPOR PERMEATION\"; return true'>Vapor Permeation</a></td></tr><tr><td><a href=MembraneTechnologies/GasPermeation.html onmouseover='window.status=\"GAS PERMEATION\"; return true'>Gas Permeation</a></td></tr></tr></table></div>");//Writes the Products Drop
document.write ("<div id=box style=left:334><table class=subbox cellpadding=0 cellspacing=0 width=196px><tr><tr><td><a href=Products/Zeo.html onmouseover='window.status=\"ZEOSEP MEMBRANES & MODULES\"; return true'> ZeoSep Membranes & Modules</a></td></tr><tr><td><a href=Products/MembSys.html onmouseover='window.status=\"MEMBRANE SYSTEMS\"; return true'>Membrane Systems</a></td></tr></tr></table></div>");

//Writes the Services Drop

document.write ("<div id=box style=left:433><table class=subbox cellpadding=0 cellspacing=0 width=126px><tr><tr><td><a href=Services/Feasibility.html onmouseover='window.status=\"FEASIBILITY TESTING\"; return true'>Feasibility Testing</a></td></tr><tr><td><a href=Services/Pilot.html onmouseover='window.status=\"PILOT TESTING\"; return true'>Pilot Testing</a></td></tr></tr><tr><td><a href=Services/R&D.html onmouseover='window.status=\"CONTRACT R & D\"; return true'>Contract R & D</a></td></tr></tr></table></div>");

//Writes the Major Applications Drop

document.write ("<div id=box style=left:529><table class=subbox cellpadding=0 cellspacing=0 width=190px><tr><tr><td><a href= MajorApp/FuelGradeEth.html onmouseover='window.status=\"FUEL GRADE ETHANOL PRODUCTION\"; return true'> Fuel Grade Ethanol Production</a><br></td></tr><tr><td><a href=MajorApp/Solvent.html onmouseover='window.status=\"SOLVENT RECOVERY\"; return true'>Solvent Recovery</a></td></tr><tr><td><a href=MajorApp/IPA.html onmouseover='window.status=\"IPA REPROCESSING\"; return true'>IPA Reprocessing</a></td></tr></tr></table></div>");

//Writes the large gap before the images

document.write ("<div id=gaplarge onmouseover=closeLinks()><br></div>");}