// JavaScript Document
//alert("here");
var ie4 = false; 
if(document.all) { ie4 = true; }
function getObject(id) { 
  if (ie4) { return document.all[id]; } 
  else { return document.getElementById(id); } 
}

function checkDefault (formField, defaultText) {
	if (formField.value == defaultText) {
		formField.value = "";
		formField.className = "text";
	}
}

function resetDefault (formField, defaultText) {
	if (formField.value == "" || formField.value == null) {
		formField.value = defaultText;
		formField.className = "text default";
	}
}

function showCompany(newCompanyID) {
    getObject("company" + currentCompanyID).className = "";
    getObject("company" + newCompanyID).className = "active1";
    currentCompanyID = newCompanyID;
    return false;
}

function showProduct(companyID, newProductID) {
    var prod = getObject("product" + companyID + "-" + currentProduct[companyID]);
    if (prod != null) {
        prod.className = "product-item";
    }

    var prod2 = getObject("product" + companyID + "-" + newProductID);
    if (prod2 != null) {
        prod2.className = "active2 product-item";
    }
    currentProduct[companyID] = newProductID;
}
