﻿//
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="services_monoclonal.php">Monoclonal Development</a>'
menu1[1]='<a href="services_polyclonal.php">Polyclonal Development</a>'
menu1[2]='<a href="services_antibodyprod.php">Antibody Production</a>'
menu1[3]='<a href="services_antibodypuri.php">Antibody Purification</a>'
menu1[4]='<a href="services_peptide.php">Peptide Production</a>'
//Lengths for menu 1 items
var menu1L=new Array()
menu1L[0]=160
menu1L[1]=160
menu1L[2]=150
menu1L[3]=150
menu1L[4]=150

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="products_monoclonal.php">Antibodies</a>'
menu2[1]='<a href="products_hybridoma.php">Hybridoma Licensing</a>'
//Lengths for menu 2 items
var menu2L=new Array()
menu2L[0]=100
menu2L[1]=150

//Contents for menu 3
var menu3=new Array()
menu3[0]='<a href="#">Promotions 1</a>'
menu3[1]='<a href="#">Promotions 2</a>'
menu3[2]='<a href="#">Promotions 3</a>'
menu3[3]='<a href="#">Promotions 4</a>'
menu3[4]='<a href="#">Promotions 5</a>'
//Lengths for menu 3 items
var menu3L=new Array()
menu3L[0]=120
menu3L[1]=120
menu3L[2]=120
menu3L[3]=120
menu3L[4]=120

//Contents for menu 5
var menu5=new Array()
menu5[0]='<a href="#">Distribution 1</a>'
menu5[1]='<a href="#">Distribution 2</a>'
//Lengths for menu 5 items
var menu5L=new Array()
menu5L[0]=120
menu5L[1]=120

//Contents for menu 6
var menu6=new Array()
menu6[0]='<a href="aboutus.php">About Us</a>'
menu6[1]='<a href="methodology.php">Methodology</a>'
menu6[2]='<a href="contactus.php">Contact Us</a>'
menu6[3]='<a href="careers.php">Careers</a>'
//Lengths for menu 6 items
var menu6L=new Array()
menu6L[0]=100
menu6L[1]=100
menu6L[2]=100
menu6L[3]=100

//Contents for menu 7
var menu7=new Array()
menu7[0]='<a href="cellbank.php#Basic">Basic Services</a>'
menu7[1]='<a href="cellbank.php#Lab">Lab Practices</a>'
menu7[2]='<a href="cellbank.php#Guide">Guidelines</a>'
//Lengths for menu 7 items
var menu7L=new Array()
menu7L[0]=120
menu7L[1]=120
menu7L[2]=100

//Contents for menu 8
var menu8=new Array()
menu8[0]='<a href="contactus.php">Technical</a>'
menu8[1]='<a href="support_quote.php">Quote Request</a>'
menu8[2]='<a href="contactus.php">Info Request</a>'
menu8[3]='<a href="support_antigen.php">Antigen Info</a>'
menu8[4]='<a href="support_accolades.php">Accolades</a>'
menu8[5]='<a href="support_publications.php">Publications</a>'
//Lengths for menu 8 items
var menu8L=new Array()
menu8L[0]=100
menu8L[1]=110
menu8L[2]=110
menu8L[3]=100
menu8L[4]=100
menu8L[5]=100

var disappeardelay=1000 //menu disappear speed onMouseout (in miliseconds)
var menuLength=850 //Length of the <div> containing the sub menu
var menuItemLength=120	//Length of the idividual menu item

/////No further editing needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

function showSubMenu(menucontents, menulengths, pos){
	clearHideMenu()
	menuObj=document.getElementById("subMenu")
	populateMenu(menucontents, menulengths, pos)
}

function populateMenu(what, whatL, pos){
	if (ie4||ns6) {
		var sContent
		var iEmpty	//Length of empty area
		var iStart	//Start index
		var iLength	//Length of menu items
		iLength = 0
		for (var j=0;j<what.length;j++) {
			iLength += whatL[j]
		}
		iEmpty = menuLength - iLength //Calculate length of empty area
		if (pos=="c") {
			iEmpty = iEmpty/2 //Divide up in two if the originating menu is in the center
		}
		sContent='<table width="100%"><tr>'
		if (pos=="r"||pos=="c") {
				sContent+='<td width="' + iEmpty + 'px" class="subMenuTD"></td>'
		}
		for (var i=0;i<what.length;i++) {
				sContent+='<td width="' + whatL[i] + 'px" class="subMenuTD">' + what[i] + '</td>'
		}
		if (pos=="l"||pos=="c") {
				sContent+='<td width="' + iEmpty + 'px" class="subMenuTD"></td>'
		}
		sContent+='</tr></table>'
		//alert(sContent)
		menuObj.innerHTML=sContent
	}
}

function clickreturnvalue(){
	if (ie4||ns6) return false
	else return true
}

function hideMenu(){
	menuObj=document.getElementById("subMenu")
	menuObj.innerHTML=""
}

function delayHideMenu(){
	if (ie4||ns6)
		delayhide=setTimeout("hideMenu()",disappeardelay)
}

function clearHideMenu(){
	if (typeof delayhide!="undefined")
		clearTimeout(delayhide)
}

