// JavaScript Document, Matthew Brady - message windows

function toggleMsgWindow(view, describe, X, Y, W, H) {
	if (view) {
		var strFeatures = 
			"dependent=yes,navbar=no,titlebar=no,toolbar=no,left=" + X + ",top=" + Y + ",width=" + W + ",height=" + H;
		
		msgWindow = window.open("", "", strFeatures);
		msgWindow.document.open();
		
		switch (describe) {
			case "durability":
				var msg ="<html><head><title>DURABILITY</title></head>"
				msg += "<body style='text-align:justify'><h1>Extreme Durability</h1>"
				msg += "<p>Wind tested to 150 mph, superior impact resistance, "
				msg += "individual replacement costs and a 10 year warranty ensure client satisfaction  "
				msg += "low modular through severe weather events.</p>"
				msg += "<p>The Fireball® system is centered around a light weight yet powerful solar "
				msg += "collector with a premium absorber. The all-aluminum frame is attractive and beautifully "
				msg += "designed. The unbreakable Polycarbonate cover is much lighter and safer than glass. </p>"
				break;
			case "credits":
				var msg ="<html><head><title>Solar Hot Water Federal Tax Credits</title></head>"
				msg += "<body style='text-align:justify'><h1>Federal Tax Credits</h1>"
				msg += "<p>The Energy Policy Act of 2005 (H.R. 6, Sec. 1335) established a 30% tax credit up to "
				msg += "$2,000 for the purchase and installation of residential solar electric and solar water heating property.</p>"
				msg += "<p>An individual can take both a 30% credit up to the $2,000 cap for a photovoltaics system and a 30% credit "
				msg += "up to a separate $2,000 cap for a solar water heating system.  "
				msg += "Initially scheduled to expire at the end of 2007, "
				msg += "the tax credits were extended through December 31, 2008.</p>"
				break;
			case "fireball":
				var msg ="<html><head><title>Fireball® Solar Hot Water System Diagram</title></head>"
				msg += "<body style='text-align:justify'><h1>Fireball® Solar Hot Water System</h1>"
				msg += "<p><img src='../images/fireballDiag.jpg' alt='Fireball system diagram' class='fltImgRight' /></p>"
				break;	
			case "BandA":
				var msg ="<html><head><title>Before and After Solar Tubular Skylights</title></head>"
				msg += "<body style='text-align:justify'><h1>Before and After Tubular Skylights</h1>"
				msg += "<p><img src='../images/beforeSolarLightTube.jpg' alt='Fireball system diagram' />&nbsp;&nbsp;&nbsp;"
				msg += "<img src='../images/afterSolarLightTube.jpg' alt='Fireball system diagram' class='fltImgRight' /></p>"
				break;	
		}
		msg += '<form><input type="button" onclick="javascript:window.close();" value="close window"></form>'
		msg += "</body></html>"
		msgWindow.document.write(msg);
		//msgWindow.moveTo(X, Y);
		msgWindow.document.close();
	}
	else {
		msgWindow.close();
	}
}

