/* Copyright Robaviax Design Studio, Madison WI - 2002 to Present */
/* This is the MorningGloryArt JavaScript file - filename: mgajs.js - approx 19.8 KBytes total - September 4, 2005 */
/* This file is used by the 3 'main pages' and the 4 'info' pages - 7 files total */
/* Used by interior pages of 6 frameset albums for functions disable() and PicIris() -  55 files total */
/* Used by 4 interior pages of the 2 SlideShow framesets for function disable() - 4 files total */
/* Used by 10 Applet pages for function disable() - 10 files total */
/* Used by Marcia AS (6) and DPC (3) pages - 9 files total */
/* Used by 4 Project Archive pages - 4 files total */
/* 7 plus 55 plus 4 plus 10 plus 9 plus 4 equals 89 files + 1 new APB = 90 total out of 100 */


function disable()  // Note added 12/6/04: should perhaps also have object detection for window.event + event.button
{
if ((document.all) && (event.button == 2 || event.button == 3 || event.button == 6 || event.button == 7) && (event.srcElement.tagName == "IMG")) { alert("Most images on this website are copyright \nMorningGloryArt or have other copyright \nattribution.  Please see Copyright Notice \nand Copyright Info page. --- Thank-you ---"); return false; }
}


// index and webmap - modified "MorningGloryArt . . . " bookmark title 11/30/2004 and 8/6/05

function bookmark()
{
if ((document.all) && (window.external))
{
window.external.AddFavorite("http://www.morninggloryart.com/","MorningGloryArt Decorative Painting - Butler PA")
}
}


/* index */

function flipHorz(pic)
{
if ((document.all) && (window.createPopup) && (!window.opera))
{
pic.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)'
}
else { }
}


function flipbackHorz(pic)
{
if ((document.all) && (window.createPopup) && (!window.opera))
{
pic.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=0)'
}
else { }
}


var m = 0
var p = 0
var mgaTimer = null

function mgaBluebow()
{
var rate = 1000
var Color1 = "#003399"
var Color2 = "#0066cc"
var Color3 = "#0099ff"
var C

if (document.getElementById || document.all)
{
m++
if (m==1) { C = Color1 }
if (m==2) { C = Color3 }
if (m==3) { C = Color2 }

if (document.getElementById) { document.getElementById('morning').style.color = C }
else if (document.all) { morning.style.color = C }

if (m==1) { C = Color2 }
if (m==2) { C = Color1 }
if (m==3) { C = Color3 }

if (document.getElementById) { document.getElementById('glory').style.color = C }
else if (document.all) { glory.style.color = C }

if (m==1) { C = Color3 }
if (m==2) { C = Color2 }
if (m==3) { C = Color1 }

if (document.getElementById) { document.getElementById('art').style.color = C }
else if (document.all) { art.style.color = C }

if (p < 9) {p++}
else {rate = 10000; p = 1}

if (m > 2) { m = 0 }
mgaTimer = setTimeout('mgaBluebow()', rate)

}
else { }
}


/* artist */

var i = 0
var j = 0
var asTimer = null

function asColor()
{
var text = "Artist, Art & Studio"
var str=""

if (document.getElementById || document.all) {

for (j = 0; j < text.length; j++) {

if (j == i) { str += "<span class='asBLUE'>" + text.charAt(i) + "<\/span>" }
else { str += text.charAt(j) }

}
if (document.getElementById) { document.getElementById('AS').innerHTML = str }
else if (document.all) { AS.innerHTML = str }

if (i < text.length) {i++}
else {i=0}

asTimer = setTimeout("asColor()", 200)

}
else { }
}

// 2 functions used for image collage on AS page (added December 6, 2004)

var ZI, TXTid;    // global variables used in 2 functions below

function collageMouseOver(object){
ZI=object.style.zIndex;  //save z-index in global variable (image div)
object.style.zIndex=12;
object.style.border='1px solid white';
TXTid = "text" + (object.id).substr(3);  //save id in global variable (image Text div)
document.getElementById(TXTid).style.visibility='visible';
if(document.all && document.getElementById && !window.opera){
object.style.zoom='115%';
}
}

function collageMouseOut(object){
object.style.border='1px solid black';
object.style.zIndex=ZI;  //restore original z-index
//var TXTid = "text" + (object.id).substr(3);
document.getElementById(TXTid).style.visibility='hidden';
if(document.all && document.getElementById && !window.opera){
object.style.zoom='normal';
}
}

function collageTxt() {   // added Jan 2 2005 - As page image collage text onload
for(var a=1; a<12; a++){
if(document.getElementById('text'+a).className=='imageText'){
document.getElementById('text'+a).style.visibility='hidden';
}
}
}


// added December 9, 2004
// functions AlphaPlus() and AlphaMinus() used for marciatile image on AS page
// this image is negative z-index=-1; does not display in Mozilla type browsers; Opera OK
// image opacity initialized in script block at bottom AS page with Opacity=100
// function AlphaMinus() called from body tag onload attribute
// total opacity cycle time is 2(20)(250 msec)=10 seconds

var XYZ = (document.all) && (window.createPopup) && (!window.opera)

function AlphaMinus() {
if (XYZ)
{
var Op1 = Mtile.filters.item("DXImageTransform.Microsoft.Alpha").Opacity;
// alert(Op1)
if (Op1 > 0) {
Op1 -= 5;
Mtile.filters.item("DXImageTransform.Microsoft.Alpha").Opacity = Op1;
setTimeout("AlphaMinus()",250);
}
else {AlphaPlus()}
}
}

function AlphaPlus() {
if (XYZ)
{
var Op2 = Mtile.filters.item("DXImageTransform.Microsoft.Alpha").Opacity;
// alert(Op2)
if (Op2 < 100) {
Op2 += 5;
Mtile.filters.item("DXImageTransform.Microsoft.Alpha").Opacity = Op2;
setTimeout("AlphaPlus()",250);
}
else {AlphaMinus()}
}
}


/* paint */

var k = 0
var dpcTimer = null

function dpcRainbow()
{
var msg = "Decorative Painting Classes"
var n

if (document.getElementById || document.all) {

for (k = 0; k < msg.length; k++){

n = Math.floor(Math.random() * 16777216)
n = n.toString(16)

while (n.length < 6) { n = "0" + n }

// alert("value of n is: " + n)

if (document.getElementById)
{
document.getElementById("DPC"+ k).style.color = '#' + n
if (k==0) {
document.getElementById("SStitle").style.color = '#' + n}
if (k==1) {document.getElementById("SS1").style.backgroundColor = '#' + n}
if (k==2) {document.getElementById("SS2").style.backgroundColor = '#' + n}
}
else if (document.all)
{
document.all["DPC" + k].style.color = '#' + n
if (k==0) {
document.all["SStitle"].style.color = '#' + n}
if (k==1) {document.all["SS1"].style.backgroundColor = '#' + n}
if (k==2) {document.all["SS2"].style.backgroundColor = '#' + n}
}
}
dpcTimer = setTimeout("dpcRainbow()", 750)
}
else { }
}


function showForm()
{
if (document.getElementById)
{
document.getElementById('FormDiv').style.display = 'block';
}
else if (document.all)
{
FormDiv.style.display = 'block';
}
else { }
}


// 'main' frames of 6 frameset albums - 49 files total - use function PicIris()

function PicIris()
{
if ((document.all) && (window.createPopup) && (!window.opera))
{
Pic.filters.item('DXImageTransform.Microsoft.Iris').apply()
Pic.style.visibility = 'visible'
if (Pic.readyState == 'complete')
{
Pic.filters.item('DXImageTransform.Microsoft.Iris').play()
}
}
else { }
}


// Used by Marcia AS (6) and DPC (3) pages - 9 files
// Function bigpicWin() also used by 4 Project Archive pages
// "Big Picture Window" - function bigpicWin()
// Original: May 21, 2003 - Modified: November 1, 2003
// Modified Jan 11 2004: added style to 'Close This Window' button
// File size approx 13 KBytes

function bigPicWin(ivar)
{
sw = screen.width;
winOp = "width=450,height=530,scrollbars=yes,left=" + ((sw - 450) / 2) + ",top=0";
dvar=window.open("","_blank",winOp);
dvar.document.open();
dvar.document.write("<html><head><title>Big Picture Window<\/title>");
dvar.document.write("<meta http-equiv='imagetoolbar' content='no'>");
dvar.document.write("<meta http-equiv='imagetoolbar' content='false'>\n");
dvar.document.write("<script type='text/javascript'>\n");
dvar.document.write("<!-- \n");
dvar.document.write("function dvarDisable()\n");
dvar.document.write("{ \n");
dvar.document.write("if ((document.all) && (event.button == 2 || event.button == 3 || event.button == 6 || event.button == 7) && (event.srcElement.tagName == 'IMG')) {alert(\"Most images on this website are copyright \\nMorningGloryArt or have other copyright \\nattribution.  Please see Copyright Notice \\nand Copyright Info page. -- Thank-you --\")\; return false\;}\n");
dvar.document.write("} \n");
dvar.document.write("// --> \n");
dvar.document.write("<\/script>\n");
dvar.document.write("<\/head>");
dvar.document.write("<body text='000000' bgcolor='#000000' onmousedown='dvarDisable()'>");
dvar.document.write("<table align='center' border='4' cellspacing='0' cellpadding='0'><tr><td valign='bottom'>");
dvar.document.write("<img src='" + ivar.href + "' alt='Big Picture' border='2'>");
dvar.document.write("<\/td><\/tr><\/table>");
dvar.document.write("<div align='center'>&copy;<form action='&nbsp;'>");
dvar.document.write("<input type='button' value='Close This Window' style='color: black\; font-weight: bold\; background: #ddeeff\; cursor: pointer\;' onclick='self.close()'><\/form><\/div>");
dvar.document.write("<form action='&nbsp;'><table align='center' border='1' cellspacing='0' cellpadding='0'>");
dvar.document.write("<tr align='center'>");
dvar.document.write("<td width='30' height='30' bgcolor='#ddeeff'>");
dvar.document.write("<input type='radio' name='bgc' value='color0' onClick='document.bgColor=\"#ddeeff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ccccff'>");
dvar.document.write("<input type='radio' name='bgc' value='color1' onClick='document.bgColor=\"#ccccff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ccffff'>");
dvar.document.write("<input type='radio' name='bgc' value='color2' onClick='document.bgColor=\"#ccffff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffffcc'>");
dvar.document.write("<input type='radio' name='bgc' value='color3' onClick='document.bgColor=\"#ffffcc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffccff'>");
dvar.document.write("<input type='radio' name='bgc' value='color4' onClick='document.bgColor=\"#ffccff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ccffcc'>");
dvar.document.write("<input type='radio' name='bgc' value='color5' onClick='document.bgColor=\"#ccffcc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffcccc'>");
dvar.document.write("<input type='radio' name='bgc' value='color6' onClick='document.bgColor=\"#ffcccc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffffff'>");
dvar.document.write("<input type='radio' name='bgc' value='color7' onClick='document.bgColor=\"#ffffff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cccccc'>");
dvar.document.write("<input type='radio' name='bgc' value='color8' onClick='document.bgColor=\"#cccccc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#999999'>");
dvar.document.write("<input type='radio' name='bgc' value='color9' onClick='document.bgColor=\"#999999\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#000000'>");
dvar.document.write("<input type='radio' name='bgc' value='colorA' onClick='document.bgColor=\"#000000\"' checked><\/td>");

dvar.document.write("<\/tr><tr align='center'>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffeeee'>");
dvar.document.write("<input type='radio' name='bgc' value='color10' onClick='document.bgColor=\"#ffeeee\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffff99'>");
dvar.document.write("<input type='radio' name='bgc' value='color11' onClick='document.bgColor=\"#ffff99\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#66cdaa'>");
dvar.document.write("<input type='radio' name='bgc' value='color12' onClick='document.bgColor=\"#66cdaa\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#008b8b'>");
dvar.document.write("<input type='radio' name='bgc' value='color13' onClick='document.bgColor=\"#008b8b\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#bdb76b'>");
dvar.document.write("<input type='radio' name='bgc' value='color14' onClick='document.bgColor=\"#bdb76b\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#00ffff'>");
dvar.document.write("<input type='radio' name='bgc' value='color15' onClick='document.bgColor=\"#00ffff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffcc00'>");
dvar.document.write("<input type='radio' name='bgc' value='color16' onClick='document.bgColor=\"#ffcc00\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#00ffcc'>");
dvar.document.write("<input type='radio' name='bgc' value='color17' onClick='document.bgColor=\"#00ffcc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#708090'>");
dvar.document.write("<input type='radio' name='bgc' value='color18' onClick='document.bgColor=\"#708090\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cc00cc'>");
dvar.document.write("<input type='radio' name='bgc' value='color19' onClick='document.bgColor=\"#cc00cc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#00cccc'>");
dvar.document.write("<input type='radio' name='bgc' value='color1A' onClick='document.bgColor=\"#00cccc\"'><\/td>");


dvar.document.write("<\/tr><tr align='center'>");
dvar.document.write("<td width='30' height='30' bgcolor='#20b2aa'>");
dvar.document.write("<input type='radio' name='bgc' value='color20' onClick='document.bgColor=\"#20b2aa\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#eee8aa'>");
dvar.document.write("<input type='radio' name='bgc' value='color21' onClick='document.bgColor=\"#eee8aa\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ffcc99'>");
dvar.document.write("<input type='radio' name='bgc' value='color22' onClick='document.bgColor=\"#ffcc99\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#666699'>");
dvar.document.write("<input type='radio' name='bgc' value='color23' onClick='document.bgColor=\"#666699\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#99ccff'>");
dvar.document.write("<input type='radio' name='bgc' value='color24' onClick='document.bgColor=\"#99ccff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cccc99'>");
dvar.document.write("<input type='radio' name='bgc' value='color25' onClick='document.bgColor=\"#cccc99\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cc99cc'>");
dvar.document.write("<input type='radio' name='bgc' value='color26' onClick='document.bgColor=\"#cc99cc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#99cccc'>");
dvar.document.write("<input type='radio' name='bgc' value='color27' onClick='document.bgColor=\"#99cccc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ff99ff'>");
dvar.document.write("<input type='radio' name='bgc' value='color28' onClick='document.bgColor=\"#ff99ff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#a0522d'>");
dvar.document.write("<input type='radio' name='bgc' value='color29' onClick='document.bgColor=\"#a0522d\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#996633'>");
dvar.document.write("<input type='radio' name='bgc' value='color2A' onClick='document.bgColor=\"#996633\"'><\/td>");


dvar.document.write("<\/tr><tr align='center'>");
dvar.document.write("<td width='30' height='30' bgcolor='#ff9999'>");
dvar.document.write("<input type='radio' name='bgc' value='color30' onClick='document.bgColor=\"#ff9999\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#99ff99'>");
dvar.document.write("<input type='radio' name='bgc' value='color31' onClick='document.bgColor=\"#99ff99\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#9999ff'>");
dvar.document.write("<input type='radio' name='bgc' value='color32' onClick='document.bgColor=\"#9999ff\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cc9999'>");
dvar.document.write("<input type='radio' name='bgc' value='color33' onClick='document.bgColor=\"#cc9999\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#99cc99'>");
dvar.document.write("<input type='radio' name='bgc' value='color34' onClick='document.bgColor=\"#99cc99\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#9999cc'>");
dvar.document.write("<input type='radio' name='bgc' value='color35' onClick='document.bgColor=\"#9999cc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#660066'>");
dvar.document.write("<input type='radio' name='bgc' value='color36' onClick='document.bgColor=\"#660066\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#006666'>");
dvar.document.write("<input type='radio' name='bgc' value='color37' onClick='document.bgColor=\"#006666\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#ff6666'>");
dvar.document.write("<input type='radio' name='bgc' value='color38' onClick='document.bgColor=\"#ff6666\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#666600'>");
dvar.document.write("<input type='radio' name='bgc' value='color39' onClick='document.bgColor=\"#666600\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#6666ff'>");
dvar.document.write("<input type='radio' name='bgc' value='color3A' onClick='document.bgColor=\"#6666ff\"'><\/td>");

dvar.document.write("<\/tr><tr align='center'>");
dvar.document.write("<td width='30' height='30' bgcolor='#336699'>");
dvar.document.write("<input type='radio' name='bgc' value='color40' onClick='document.bgColor=\"#336699\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#339966'>");
dvar.document.write("<input type='radio' name='bgc' value='color41' onClick='document.bgColor=\"#339966\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#993333'>");
dvar.document.write("<input type='radio' name='bgc' value='color42' onClick='document.bgColor=\"#993333\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cc3333'>");
dvar.document.write("<input type='radio' name='bgc' value='color43' onClick='document.bgColor=\"#cc3333\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#cc9933'>");
dvar.document.write("<input type='radio' name='bgc' value='color44' onClick='document.bgColor=\"#cc9933\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#99cc33'>");
dvar.document.write("<input type='radio' name='bgc' value='color45' onClick='document.bgColor=\"#99cc33\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#0099cc'>");
dvar.document.write("<input type='radio' name='bgc' value='color46' onClick='document.bgColor=\"#0099cc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#9900cc'>");
dvar.document.write("<input type='radio' name='bgc' value='color47' onClick='document.bgColor=\"#9900cc\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#006600'>");
dvar.document.write("<input type='radio' name='bgc' value='color48' onClick='document.bgColor=\"#006600\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#660000'>");
dvar.document.write("<input type='radio' name='bgc' value='color49' onClick='document.bgColor=\"#660000\"'><\/td>");
dvar.document.write("<td width='30' height='30' bgcolor='#000066'>");
dvar.document.write("<input type='radio' name='bgc' value='color4A' onClick='document.bgColor=\"#000066\"'><\/td>");

dvar.document.write("<\/tr><\/table><\/form>");
dvar.document.write("<table border='0'><tr><td height='150'><\/td><\/tr><\/table><\/body><\/html>");
dvar.document.close();
dvar.focus();
}

