var myElement;

function doOver(num){
	switch(num)
	{
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		case 7:
		case 8:
		    document.getElementById("barpic" + num).style.cursor = "pointer";
			document.getElementById("barpic" + num +"a").style.color = "#ffffff";
			document.getElementById("barpic" + num +"b").style.color = "#889988";
			break;
		case 10:
			document.getElementById("bbbseal").style.cursor = "pointer";
			break;
        case 11:
            document.getElementById("credit").style.cursor = "pointer";
            document.getElementById("credit1").style.color = "#ffffff";
            document.getElementById("credit2").style.color = "#889988";
            document.getElementById("credit3").style.color = "#ffffff";
            break;
        case 12:
            document.getElementById("energystar").style.cursor = "pointer";
            break;
        case 20:
            document.getElementById("gutterpic").style.cursor = "pointer";
            break;
        case 99:
            document.getElementById("acs").style.cursor = "pointer";
            break;
    }
}

function doOut(num){
	switch(num)
	{
		case 1:
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		case 7:
		case 8:
		    document.getElementById("barpic" + num + "a").style.color = "#ff0000";
			document.getElementById("barpic" + num +"b").style.color = "#ffffff";
			break;
		case 10:
			break;
        case 11:
            document.getElementById("credit").style.cursor = "pointer";
            document.getElementById("credit1").style.color = "#ff0000";
            document.getElementById("credit2").style.color = "#ffffff";
            document.getElementById("credit3").style.color = "#ff0000";
            break;
        case 12:
            break;
    }
}

function doClick(num){

	switch(num)
	{
		case 1:
			window.location = "save.htm";
			break;
		case 2:
			window.location = "taxes.htm";
			break;
		case 3:
			window.open("http://www.satisfiedcustomers.com/windowplus",null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
			break;
		case 4:
			window.location = "sweepstakes.htm";
			break;
		case 5:
			window.open("http://www.satisfiedcustomers.com/windowplus",null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
			break;
		case 6:
			window.open("http://www.satisfiedcustomers.com/windowplus",null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
			break;
		case 7:
		    window.location = "estimates.htm";
			break;
		case 8:
		    window.location = "newsletter.htm";
		    break;
		case 9:
			break;
		case 10:
		    window.open("http://www.bbbonline.org/cks.asp?id=108012192441", null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
			break;
		case 11:
			window.location = "taxes.htm";
			break;
        case 12:
            window.open("http://www.energystar.gov/index.cfm?c=windows_doors.pr_savemoney", null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
            break;
        case 20:
            window.open("http://www.clearwatergutter.com/movies/advert.wmv", null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
            break;
        case 99:
            window.open("http://www.goapplied.com", null,
				"fullscreen=no,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,left=0,top=0,location=yes");
            break;
    }
}
function doLoad() {

    if (navigator.appName == "Microsoft Internet Explorer") {
        if (document.body.offsetWidth < 1000)
            document.getElementById("maindiv").style.width = 1000;
    }
    else {
        if (document.body.innerWidth < 1000) {
            document.getElementById("maindiv").style.width = 1000;
        }
    }

    document.getElementById("maindiv").style.backgroundColor = "#000000";
    document.getElementById("maindiv").style.display = "inline";
}
if (document.images) {
    var i = 0;

    preload_image_object = new Image();
    // set image url
    image_url = new Array();
    image_url[0] = "pics/money.jpg";
    image_url[1] = "pics/comments1.jpg";
    image_url[2] = "pics/energystar.gif";
    image_url[3] = "pics/sweepstakes.jpg";
    image_url[4] = "pics/mistakes.jpg";
    image_url[5] = "pics/gift.jpg";
    image_url[6] = "pics/estimates.jpg";
    image_url[7] = "gutterpics/pic2.jpg";
    image_url[8] = "gutterpics/pic3.jpg";
    image_url[9] = "gutterpics/clearwater.jpg";

    for (i = 0; i <= 9; i++)
        preload_image_object.src = image_url[i];
}
window.onload = doLoad;
window.onresize = doLoad;