
/***********************************************
* 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
***********************************************/

//Contents for about us menu
//Contents for about us menu
var menu1=new Array()
menu1[0]='<a href="http://www.hmicronpowder.com/page/history">History</a>'
menu1[1]='<a href="http://www.hmicronpowder.com/page/customers-memberships">Memberships</a>'
menu1[2]='<a href="http://www.hmicronpowder.com/page/careers">Careers</a>';

//Contents for services menu
var menu2=new Array()
menu2[0]='<a href="http://www.hmicronpowder.com/tollprocessing">Toll Processing</a>'
menu2[1]='<a href="http://www.hmicronpowder.com/page/test-center">Test Center</a>'
menu2[2]='<a href="http://www.hmicronpowder.com/page/analytical-laboratory">Analytical Laboratory</a>'
menu2[3]='<a href="http://www.hmicronpowder.com/page/engineering-services">Engineering Services</a>'
menu2[4]='<a href="http://www.hmicronpowder.com/page/equipment-rentals">Equipment Rentals</a>'
menu2[5]='<a href="http://www.hmicronpowder.com/page/field-service-maintenance">Field Service & Maintenance</a>'
menu2[6]='<a href="http://www.hmicronpowder.com/productmanuals">Demonstrations and Manuals</a>';


//View by application menu
var menu3=new Array()
menu3[0]='<a href="http://www.hmicronpowder.com/application/size-reduction">Size Reduction</a>'
menu3[1]='<a href="http://www.hmicronpowder.com/application/classification">Classification</a>'
menu3[2]='<a href="http://www.hmicronpowder.com/application/mixing">Mixing</a>'
menu3[3]='<a href="http://www.hmicronpowder.com/application/drying">Drying</a>'
menu3[4]='<a href="http://www.hmicronpowder.com/application/containment">Containment</a>'
menu3[5]='<a href="http://www.hmicronpowder.com/application/filling-weighing">Filling & Weighing</a>'
menu3[6]='<a href="http://www.hmicronpowder.com/application/compaction-and-agglomeration">Compaction and Agglomeration</a>'
menu3[7]='<a href="http://www.hmicronpowder.com/application/granulation">Granulation</a>'
menu3[8]='<a href="http://www.hmicronpowder.com/application/particle-analysis">Particle Analysis</a>';
menu3[9]='<a href="http://www.hmicronpowder.com/application/other-products">Other Products</a>';

//View by industry menu
var menu4=new Array()
menu4[0]='<a href="http://www.hmicronpowder.com/industry/chemicals">Chemicals</a>'
menu4[1]='<a href="http://www.hmicronpowder.com/industry/food">Food</a>'
menu4[2]='<a href="http://www.hmicronpowder.com/industry/pharmaceuticals">Pharmaceuticals</a>'
menu4[3]='<a href="http://www.hmicronpowder.com/industry/minerals">Minerals</a>'
menu4[4]='<a href="http://www.polysys.com/index.html" target="_blank">Recycling</a>'
menu4[5]='<a href="http://www.hmicronpowder.com/industry/battery-applications">Battery Production</a>';

//View by brand menu
var menu5=new Array()
menu5[0]='<a href="http://www.hmicronpowder.com/brand/mikro">Mikro</a>'
menu5[1]='<a href="http://www.hmicronpowder.com/brand/alpine">Alpine</a>'
menu5[2]='<a href="http://www.hmicronpowder.com/brand/vrieco-nauta">Vrieco Nauta</a>'
menu5[3]='<a href="http://www.hmicronpowder.com/brand/micron">Micron</a>'
menu5[4]='<a href="http://www.hmicronpowder.com/brand/stott">Stott</a>'
menu5[5]='<a href="http://www.hmicronpowder.com/brand/vitalair">Vitalair</a>'
menu5[6]='<a href="http://www.hmicronpowder.com/brand/majac">Majac</a>'
menu5[7]='<a href="http://www.hmicronpowder.com/brand/hosokawa-bepex">Hosokawa Bepex</a>'
menu5[8]='<a href="http://www.polysys.com/index.html" target="_blank">Polymer Systems</a>';

//Lab and Analytical equip menu
var menu6=new Array()
menu6[0]='<a href="http://www.hmicronpowder.com/products/other-lab-equipment/micron-air-jet-sieve">Micron Air Jet Sieve</a>'
menu6[1]='<a href="http://www.hmicronpowder.com/products/other-lab-equipment/micron-powder-characteristics-tester-model">Powder Characteristics Tester</a>'
menu6[2]='<a href="http://www.hmicronpowder.com/lab/other-lab-equipment">Other Lab Equipment</a>';

//Parts and used equipment menu
var menu7=new Array()
menu7[0]='<a href="http://www.hmicronpowder.com/pages/matrix.php?id=25">Parts</a>'
menu7[1]='<a href="http://www.hmicronpowder.com/pages/preowned.php">Pre-Owned Equipment</a>'
menu7[2]='<a href="http://www.hmicronpowder.com/pages/index.php?id=11">Equipment Rentals</a>'
menu7[3]='<a href="http://www.hmicronpowder.com/pages/productmanuals.php">Demonstrations and Manuals</a>';

//Educational Center menu
var menu8=new Array()
menu8[0]='<a href="http://www.hmicronpowder.com/page/educational-center">Educational Programs</a>'
menu8[1]='<a href="http://www.hmicronpowder.com/technicalarticles">Technical Articles</a>';

//Contact Us menu
var menu9=new Array()
menu9[0]='<a href="http://www.hmicronpowder.com/contact/get-a-quote">Request A Quote</a>'
menu9[1]='<a href="http://www.hmicronpowder.com/contact/register">Register</a>'
menu9[2]='<a href="http://www.hmicronpowder.com/contact/directions">Directions</a>'
menu9[3]='<a href="http://www.hmicronpowder.com/contact/office-locations">Office Locations</a>'
menu9[4]='<a href="http://www.hmicronpowder.com/contact">Contact Us Now</a>';

		
var menuwidth='143px' //default menu width
var menubgcolor='#0039a6'  //menu bgcolor
var disappeardelay=500  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

/////No further editting needed
var browserName=navigator.appName;
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:198px;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


//dropdown function
/* Dropdown function */
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
  node = navRoot.childNodes[i];
  if (node.nodeName=="LI") {
  node.onmouseover=function() {
  this.className+=" over";
    }
  node.onmouseout=function() {
  this.className=this.className.replace
      (" over", "");
   }
   }
  }
 }
}
window.onload=startList;

function toggle_login() {
	$('#login_form').toggle();	
}

/// popup window function
function popup(URL,w,h) {

day = new Date();
id = day.getTime();

var width = w;
var height = h;

var left = ((screen.width-width)/2);
var top = ((screen.height-height)/2);

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + '');");
}

$(document).ready(function () {
	$('form.spam-compliant-form').submit(function () {
		if (!$('#terms-check').is(':checked')) {
			alert('Please indicate that you have read the terms and conditions.');
			return false;
		} else { 
			return true;
		}
	});
});