//Code for the dropeown menu//

		// menu 1
		var menu1=new Array()
		menu1[0]='<a href="700x.cfm">700X</a>';
		menu1[1]='<a href="710x.cfm">710X</a>';
		menu1[2]='<a href="710xm.cfm">710X-M</a>';
		menu1[3]='<a href="711x.cfm">II 711X</a>';
		menu1[4]='<a href="712x.cfm">II 712X</a>';
		menu1[5]='<a href="810x.cfm">810X-Ni1&nbsp;</a>';
		

		// menu 2
		var menu2=new Array()
		menu2[0]='<a href="300x_features.cfm">Features</a>';
		menu2[1]='<a href="300x_specs.cfm">Specifications</a>';
		menu2[2]='<a href="300x_partnum.cfm">Part Numbers</a>';
		menu2[3]='<a href="300x_data.cfm">Data Sheet</a>';
		
		// menu 3
		var menu3=new Array()
		menu3[0]='<a href="mts3500i_features.cfm">Features</a>';
		menu3[1]='<a href="mts3500i_specs.cfm">Specifications</a>';
		menu3[2]='<a href="mts3500i_partnum.cfm">Part Numbers</a>';
		menu3[3]='<a href="mts3500i_data.cfm">Data Sheet</a>';

		var menuwidth='100px' 
		var menubgcolor='black'  
		var disappeardelay=250  
		var hidemenu_onclick="yes" 
		
		/////Do Not Edit
		
		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(z){
		if (ie4||ns6) return false
		else 
			window.location.href = 'z';
		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
		
		
//Code for the mouseovers on the bottom nav//

		helmet = new Image();
		helmet.src = "images/bottom-nav-helmet-on.png";
		
		word = new Image();
		word.src = "images/bottom-nav-word-on.png";
		
		projects = new Image();
		projects.src = "images/bottom-nav-projects-on.png";
		
		shows = new Image();
		shows.src = "images/bottom-nav-shows-on.png";
		
		techdata = new Image();
		techdata.src = "images/L2-nav-tech-data-on.png";
		
		advantage = new Image();
		advantage.src = "images/L2-nav-advantage-on.png";
		
		sevenx = new Image();
		sevenx.src = "images/l2-nav-700x-off.jpg";
		
		tenx = new Image();
		tenx.src = "images/l2-nav-710x-off.jpg";
		
		elevenx = new Image();
		elevenx.src = "images/l2-nav-711x-off.jpg";
		
		twelvex = new Image();
		twelvex.src = "images/l2-nav-712x-off.jpg";
		

		
//code for the hide/show div on content sections
var ids=new Array('features','specs','partnum','data');
		function switchid(x){	
			//hideallids();
			displayContent(x);
		}

		function hideallids(){
			//loop through the array and hide each element by id
			for (var i=0;i<ids.length;i++){
				hidediv(ids[i]);
			}		  
		}
		
		function hidediv(x) {			//safe function to hide an element with a specified id
			if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById(x).style.display = 'none';
			}
			else {
				if (document.layers) { // Netscape 4
					document.x.display = 'none';
				}
				else { // IE 4
					document.all.id.style.display = 'none';
				}
			}
		}
		
		function displayContent(x) {
			//safe function to show an element with a specified id
				  
			if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById(x).style.display = 'block';
			}
			else {
				if (document.layers) { // Netscape 4
					document.x.display = 'block';
				}
				else { // IE 4
					document.all.x.style.display = 'block';
				}
			}
		}

// Code for Custom Helmet Giveaway
	function validate_topform() {	  		  
			if (document.topForm.DailyRegistrationEmailAddress.value.length < 1)
				{
					alert("Please enter your email address.");
					document.topForm.DailyRegistrationEmailAddress.focus();
					return false;
				}
			return true;
		}
				
		function validate_form() {	  		  
			if (document.theForm.firstName.value.length < 1)
				{
					alert("Please enter your first name.");
					document.theForm.firstName.focus();
					return false;
				}
			if (document.theForm.lastName.value.length < 1)
				{
					alert("Please enter your last name.");
					document.theForm.lastName.focus();
					return false;
				}
			if (document.theForm.emailAddress.value.length < 1)
				{
					alert("Please enter your email address.");
					document.theForm.emailAddress.focus();
					return false;
				}
			if (document.theForm.Address1.value.length < 1)
				{
					alert("Please enter your mailing address.");
					document.theForm.Address1.focus();
					return false;
				}
			if (document.theForm.City.value.length < 1)
				{
					alert("Please enter your city.");
					document.theForm.City.focus();
					return false;
				}
			if (document.theForm.State.value.length < 1)
				{
					alert("Please select a state.");
					document.theForm.State.focus();
					return false;
				}
			if (document.theForm.Zipcode.value.length < 1)
				{
					alert("Please enter your zip code.");
					document.theForm.Zipcode.focus();
					return false;
				}
		 return true;
		}

// For image on  file input button

var W3CDOM = (document.createElement && document.getElementsByTagName);

function init() {
	if (!W3CDOM) return;
	var fakeFileUpload = document.createElement('div');
	fakeFileUpload.className = 'fakefile';
	fakeFileUpload.appendChild(document.createElement('input'));
	var image = document.createElement('img');
	image.src='../images/form-button-browse.jpg';
	fakeFileUpload.appendChild(image);
	var x = document.getElementsByTagName('input');
	for (var i=0;i<x.length;i++) {
		if (x[i].type != 'file') continue;
		if (x[i].getAttribute('noscript')) continue;
		if (x[i].parentNode.className != 'fileinputs') continue;
		x[i].className = 'file hidden';
		var clone = fakeFileUpload.cloneNode(true);
		x[i].parentNode.appendChild(clone);
		x[i].relatedElement = clone.getElementsByTagName('input')[0];
		if (x[i].value)
			x[i].onchange();
		x[i].onchange = x[i].onmouseout = function () {
			this.relatedElement.value = this.value;
		}
	}
}