addOnload(rolloverInit);

function addOnload(newFunction) {

    var oldOnload = window.onload;

    if(typeof oldOnload == "function") {

        window.onload = function() {

            if(oldOnload) {

                oldOnload();
            }

            newFunction();
         }
    }

    else {

        window.onload = newFunction;
    }
}

function requestQuote() {

  if(document.getElementById("getQuote1")) {
       document.getElementById("getQuote1").onclick = newWindow;
  }
}

function newWindow() {
    
    window.open("quoteForm.html", "quote", "resizable=no, width=520, height=680, left=200, top=0");

    return false;
}

function rolloverInit() {
	for (var i=0; i<document.images.length; i++) {
		if (document.images[i].parentNode.tagName == "A") {
			setupRollover(document.images[i]);
		}
	}
}

function setupRollover(thisImage) {
	thisImage.outImage = new Image();
	thisImage.outImage.src = thisImage.src;
	thisImage.onmouseout = rollOut;

	thisImage.overImage = new Image();
	thisImage.overImage.src = "images/" + thisImage.id + "Over.gif";
	thisImage.onmouseover = rollOver;	
}

function rollOver() {
	this.src = this.overImage.src;
}

function rollOut() {
	this.src = this.outImage.src;
}
