
// Application Buttons //
//Service & Body Shop
var imgOnAppointment = new Image(222,42);
imgOnAppointment.src = '/images/image.php?file=appointment2.gif';
var imgOffAppointment = new Image(222,42);
imgOffAppointment.src = '/images/image.php?file=appointment1.gif';

//Parts
var imgOnPartsRequest = new Image(183,42);
imgOnPartsRequest.src = '/images/image.php?file=parts_request2.gif';
var imgOffPartsRequest = new Image(183,42);
imgOffPartsRequest.src = '/images/image.php?file=parts_request1.gif';

//Finance
var imgOnCreditApp = new Image(294,42);
imgOnCreditApp.src = '/images/image.php?file=credit_app2.gif';
var 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,left='+(screen.width-width)/2+',top='+(screen.height-height)/2+',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')">

var sfHover = function() {
//function sfHover() {
	var sfEls = document.getElementById("topMenu").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function showStatus(sMsg) {
	//setTimeout("window.status = \'" + sMsg + "\';", 0);
    window.status = sMsg ;
    return true ;
}