// dropdown menu function //
//startList = function() {
function startList() {
	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", "");
				}
			}
  		}
 	}
	if (document.all&&document.getElementById) {
		navSub = document.getElementById ("subnav");
		for (i=0; i<navSub.childNodes.length; i++) {
			subnode = navSub.childNodes[i];
			if (subnode.nodeName == "LI") {
				subnode.onmouseover = function() {
					this.className+=" over";
				}
				subnode.onmouseout = function() {
					this.className = this.className.replace(" over", "");
				}
			}
  		}
 	}
}
//window.onload = startList;

// Application Buttons //
imgOnAppointment = new Image(222,42);
imgOnAppointment.src = '/images/image.php?file=appointment2.gif';
imgOffAppointment = new Image(222,42);
imgOffAppointment.src = '/images/image.php?file=appointment1.gif';

imgOnPartsRequest = new Image(183,42);
imgOnPartsRequest.src = '/images/image.php?file=parts_request2.gif';
imgOffPartsRequest = new Image(183,42);
imgOffPartsRequest.src = '/images/image.php?file=parts_request1.gif';

imgOnCreditApp = new Image(294,42);
imgOnCreditApp.src = '/images/image.php?file=credit_app2.gif';
imgOffCreditApp = new Image(294,42);
imgOffCreditApp.src = '/images/image.php?file=credit_app1.gif';
			
function openWindow(url,width,height){
	newWin = window.open(url, 'viewWin', 'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,top=0,left=0,width=' + width + ',height=' + height + '');
}		

function changeImg(imgName,imgPre) {
	if(document.images){
		document.images[imgName].src = eval(imgPre + '.src');
	}
}

function changeStyle(obj, new_style) {
    obj.className = new_style;
}
//Usage example: <td class="featurebox" onmouseover="changeStyle(this,'featureboxover')" onmouseout="changeStyle(this,'featurebox')">