﻿//header mouse-over highlights
function headerHiLite(boxId){
	if(boxId != ''){
		var headerbox = document.getElementById(boxId);
		if(headerbox != null) {
			//alert(product.id)
			headerbox.className = "topnavspacer headerhighlight"
		}
	}
	else{
		homebox.className = "topnavspacer"
		productsbox.className = "topnavspacer"
		testimonialbox.className = "topnavspacer"
		faqbox.className = "topnavspacer"
		contactbox.className = "topnavspacer"
		quotebox.className = "topnavspacer"
	}
}

// outline the product boxes on main Product page
function outline(boxId){
	if(boxId != ''){
		var product = document.getElementById(boxId);
		if(product != null) {
			//alert(product.id)
			product.className = "borderright productbox"
		}
	}
	else{
		product1.className = "borderright"
		product2.className = "borderright"
		product3.className = "borderright"
		product4.className = "borderright"
	}
}
function toggleFAQ(id){
    var obj1 = 'A' + id;
    var element = document.getElementById(obj1);
    var obj2 = 'I' + id;							
    var image = document.getElementById(obj2);
    
    if (element.style.display == "none"){
        element.style.display="inline";
        image.src = 'images/minus.jpg';
    }
    else{
        element.style.display="none";
        image.src = 'images/plus.jpg';
    }
}
function SetUniqueRadioButton(nameregex, current)
{
   re = new RegExp(nameregex);
   for(i = 0; i < document.forms[0].elements.length; i++)
   {
      elm = document.forms[0].elements[i]
      if (elm.type == 'radio')
      {
         if (re.test(elm.name))
         {
            elm.checked = false;
         }
      }
   }
   current.checked = true;
}
function openWin(url){
    window.open(url, 'diy', 'width=700,height=550,scrollbars=no,menu=no');
}