// JavaScript Document, Matthew Brady - message or image windows

function toggleMsgWindow(view, imgName, 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();
		var msg ="<html><head><title>Southwest D&eacute;cor Weavings </title></head>"
		msg += "<body style='text-align:justify;font-family:Papyrus;background:#FFF1DB;color:#6D5032;'>"
		
		msg += "<h2>Southwest D&eacute;cor Weavings <br />Design " + imgName + "</h2>"
		msg += "<p><img src='images/webReady/" + imgName + ".jpg' alt='Southwest D&eacute;cor Weavings - Design " + imgName + "' /></p>"

		//msg += '<form><input type="button" onclick="javascript:window.close();" value="close window"></form>'
		msg += "<form style='float:right;'><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();
	}
}

