
// Application Buttons //
//Service & Body Shop
var imgOnAppointmentOshawa = new Image(222,42);
imgOnAppointmentOshawa.src = 'images/leads/appointment_oshawa_on.gif';
var imgOffAppointmentOshawa = new Image(222,42);
imgOffAppointmentOshawa.src = 'images/leads/appointment_oshawa.gif';

var imgOnAppointmentCobourg = new Image(222,42);
imgOnAppointmentCobourg.src = 'images/leads/appointment_cobourg_on.gif';
var imgOffAppointmentCobourg = new Image(222,42);
imgOffAppointmentCobourg.src = 'images/leads/appointment_cobourg.gif';

//Parts
var imgOnPartsRequestOshawa = new Image(183,42);
imgOnPartsRequestOshawa.src = 'images/leads/parts_oshawa_on.gif';
var imgOffPartsRequestOshawa = new Image(183,42);
imgOffPartsRequestOshawa.src = 'images/leads/parts_oshawa.gif';

var imgOnPartsRequestCobourg = new Image(183,42);
imgOnPartsRequestCobourg.src = 'images/leads/parts_cobourg_on.gif';
var imgOffPartsRequestCobourg = new Image(183,42);
imgOffPartsRequestCobourg.src = 'images/leads/parts_cobourg.gif';

//Finance
var imgOnCreditAppOshawa = new Image(294,42);
imgOnCreditAppOshawa.src = 'images/leads/credit_oshawa_on.gif';
var imgOffCreditAppOshawa = new Image(294,42);
imgOffCreditAppOshawa.src = 'images/leads/credit_oshawa.gif';

var imgOnCreditAppCobourg = new Image(294,42);
imgOnCreditAppCobourg.src = 'images/leads/credit_cobourg_on.gif';
var imgOffCreditAppCobourg = new Image(294,42);
imgOffCreditAppCobourg.src = 'images/leads/credit_cobourg.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 ;
}
