function layout(id) {
  /* DO SOME OBJECT DETECTION FOR NAV EFFECTS */
  var ie5 = document.all && !document.fireEvent && !window.opera; /* IE < 5.5 */
  var ie6 = document.all && document.fireEvent && document.createComment; /* IE 6 */
  var ffie7op = window.XMLHttpRequest; /* FF, IE7 & OPERA */
  if(!ie5) {
    if(document.getElementById) {
	  document.getElementById(id).id = 'navmenu';
	   if(ffie7op) {
	    return;
	  } /* DON'T USE JS FOR GOOD BROWSERS */
      if (ie6); { /* IE6 GET JS HELP */
	    navhover('navmenu');
      }
    }
  }
}

function navhover(id) {
  var lis = document.getElementById(id).getElementsByTagName("LI");
  for (var i=0; i<lis.length; i++) {
    lis[i].onmouseover=function() {
      this.className+=" iehover";
    }
    lis[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" iehover\\b"), "");
    }
  }
}

function spotlight() {
  var sl = 
    [
    ['Header 1',
	'mod-pic-fpo.jpg',
	'84',
	'96',
	'Consectetur adipisicing elit, sed do eiumod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim.',
	'foo.html',
	'adipisicing elit'
    ],
    ['Header 2',
	'mod-pic-fpo.jpg',
	'84',
	'96',
	'Adipisicing elit, sed do eiumod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, amet consectetur a',
	'foo.html',	
	'adipisicing elit'
    ],
	['Header 3',
	'mod-pic-fpo.jpg',
	'84',
	'96',
	'Sed do eiumod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, amet consectetur adipisicing elit.',
	'foo.html',
	'adipisicing elit'
    ]
  ];
  var rand=Math.floor(Math.random()*sl.length)
  document.getElementById('slh').innerHTML = sl[rand][0];
  document.getElementById('sli').src = 'images/'  + sl[rand][1];
  document.getElementById('sli').width = sl[rand][2];
  document.getElementById('sli').height =  sl[rand][3];
  document.getElementById('slp').innerHTML = sl[rand][4];
  document.getElementById('sll').href =  sl[rand][5];
  document.getElementById('sll').title =  sl[rand][6];
}

function quote() {
  var q = [
    ['We produce a great product. However, the customer must be aware of how important installation and maintenance play in the overall effectiveness of our systems. To comply with any and all operational and warranty requirements, only Authorized TapWach Service Providers should be used.',
	'Michael Mays, Senior Product Manager,<br />&nbsp;Inovonics Wireless Corporation'
	],
    ['Since we have initiated service agreements to maintain our submetering equipment, our systems stay 99+ % operational. This insures that our billing recovery is able to remain high.',
	 'Wes Winterstein, Sr. Business Analyst,<br />&nbsp;United Dominion Realty Trust'
	],
	['We were looking for alternate methods of providing access and security to our residents. ProTech Contracting was able to tailor their products to fit our needs.',
	 'Wes Winterstein, Sr. Business Analyst,<br />&nbsp;United Dominion Realty Trust'
	],
	['Working closely with ProTech Contracting we are able to completely integrate numerous onsite systems to significantly streamline services and equipment.',
     'Scott Underbrink, President, Nu Enterprises'
	]		
  ];
  var rand=Math.floor(Math.random()*q.length)
  document.getElementById('q').innerHTML = q[rand][0];
  document.getElementById('qs').innerHTML = '&#8211;' + q[rand][1];
}

function validateForm(myForm){
  if(myForm.first_name.value.length == 0) {alert("Please specify your First Name.");myForm.first_name.focus();return false;};
  if(myForm.last_name.value.length == 0) {alert("Please specify your Last Name.");myForm.last_name.focus();return false;};
  if(myForm.account_name.value.length == 0){alert("Please specify your Company Name.");myForm.account_name.focus();return false;};
  if(myForm.email1.value.length == 0){alert("Please specify your Email Address.");myForm.email1.focus();return false;};
  myForm.bSubmit.disabled = true ;
  return true;
}