// getch.net
// control.js
// by L Getch
// leon@getch.net

window.focus();

var openText = "http://www.maherspaint.com/"; //main page html
var openMain = "http://www.maherspaint.com/index.htm"; //url to main page
var openPrin = ".htm"; //designation of a print page
var wOPener = (window.parent.location.href); //what page is opening it?
var wTPage = (window.location.href); //what page is this? 
wOPener = wOPener.toLowerCase();
wTPage = wTPage.toLowerCase();
if (wOPener.indexOf(openText,0) == -1)
{parent.location.replace(openMain);}

function hidden()
{document.body.style.overflow='hidden';}
function unhidden()
{document.body.style.overflow='';}

var ih;

function setsize(){
if (window != top) top.location.href = location.href;
var sw, sh, oh, ow; // Set inner width and height
if (window.innerWidth == null) {
sw = document.body.clientWidth;
sh = document.body.clientHeight; 
}
else {
sw = window.innerWidth;
sh = window.innerHeight;
}

if (sw <= 770){sw=770;}
if (sh <= 409){sh=409;}
if (window.innerWidth == null) {
window.resizeTo(500, 500);
ow = 500-document.body.clientWidth;
oh = 500-document.body.clientHeight; 
window.resizeTo(eval(sw+ow), eval(sh+oh));
ih = eval(Math.floor((sh+oh-599)*0.95));
}
else {
window.innerWidth = sw;
window.innerHeight = sh;
}
} 
function runit(){
open("maherindex2.htm?"+ih,"_top");
}
function writeframe(){
var pih = 65;//location.search.substring(1,location.search.length);
if (!pih) {pih=0;}
if (pih < 0) {pih = pih*(-1);}
pih++;
document.write('<TD ROWSPAN="1" COLSPAN="1" WIDTH="14" HEIGHT="266">');
document.write(' <IMG NAME="main13" SRC="images/main1_3x1.gif" WIDTH="14"');
document.write(' HEIGHT="266" BORDER="0"></TD>');
document.write('<TD ROWSPAN="2" COLSPAN="6" WIDTH="736" HEIGHT="'+eval("266" + " + " + pih)+'">');
document.write('<iframe src="main.htm" ');
document.write(' name= "mainscrn"');
document.write(' align= "center"');
document.write(' marginwidth= "0"');
document.write(' marginheight="0"');
document.write(' hspace= "0"');
document.write(' vspace= "0"');
document.write(' frameborder= "0"');
document.write(' scrolling= yes');
document.write(' width= "736" ');
document.write(' height= "'+eval("266" + " + " + pih)+'"');
document.write(' STYLE= "scrollbar-base-color:#444499; ');
document.write(' scrollbar-arrow-color: #FFDD00; z-index:1;"');
document.write('>');
document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="750" HEIGHT="70%"');
document.write('bgcolor="#000080">');
document.write('<td align="center" valign="center">');
document.write('<p align="center">');
document.write('<br>');
document.write('<font color="#8080f0"><h1 STYLE="font-family:Arial;');
document.write(' font-size:24pt; color:#8080f0;"><i>');
document.write('<b>O O P S !</b>');
document.write('</i></h1></font>');
document.write('<font color="#C7AD85">');
document.write('<B STYLE="font-family:Arial; font-size:16pt; color:#C7AD85;">');
document.write('Your browser isn\'t capable of properly displaying this site.');
document.write('<br>&nbsp;<br>');
document.write('Please click below for a mirror page that will<br>');
document.write('display properly in your outdated browser.');
document.write('<br>&nbsp;<br>');
document.write('<a href="oldpage.htm"');
document.write(' target="_top"><font color="#E3D7C4">CLICK HERE</font></a>');
document.write('</b>');
document.write('</font>');
document.write('</p>');
document.write('</td>');
document.write('</table></iframe></TD>');
document.write('</TR><TR><TD ROWSPAN="1" COLSPAN="1" WIDTH="14" HEIGHT="'+pih+'">');
document.write(' <IMG NAME="main13b" SRC="images/main_3x1b.gif" WIDTH="14"');
document.write(' HEIGHT="'+pih+'" BORDER="0"></TD>');
}
var lcr = "#88ffff";

function linkBlink(){
var link= document.getElementById("link");
link.style.color = lcr;
if (lcr == "#88ffff") { lcr = "#44ffff";}
else if (lcr == "#44ffff") { lcr = "#00ffff";}
else if (lcr == "#00ffff") { lcr = "#00aaff";}
else if (lcr == "#00aaff") { lcr = "#0088ff";}
else if (lcr == "#0088ff") { lcr = "#0044ff";}
else if (lcr == "#0044ff") { lcr = "#0000ff";}
else if (lcr == "#0000ff") { lcr = "#0000aa";}
else if (lcr == "#0000aa") { lcr = "#000088";}
else if (lcr == "#000088") { lcr = "#444444";}
else if (lcr == "#444444") { lcr = "#888800";}
else if (lcr == "#888800") { lcr = "#aaaa00";}
else if (lcr == "#aaaa00") { lcr = "#ffff44";}
else if (lcr == "#ffff44") { lcr = "#aaff88";}
else if (lcr == "#aaff88") { lcr = "#88ffff";}
lb = window.setTimeout("linkBlink();",10);
}


function imageOver(imName,iNum1,overOut){
var store = "document."+imName;
var obj = eval(store);
if (overOut == 0){
obj.src = dnImg[iNum1].src;
}else{
obj.src = upImg[iNum1].src;
}
}

function floatButton () {
if (document.all) {
document.all.topButton.style.pixelTop = document.body.scrollTop;
}
else if (document.layers) {
document.topButton.top = window.pageYOffset;
}
else if (document.getElementById) {
document.getElementById('topButton').style.top = window.pageYOffset + 'px';
}
}

function initButton () {
if (document.all) {
document.all.topButton.style.pixelLeft = document.body.clientWidth - document.all.topButton.offsetWidth;
document.all.topButton.style.visibility = 'visible';
}
else if (document.layers) {
document.topButton.left = window.innerWidth - document.topButton.clip.width - 15;
document.topButton.visibility = 'show';
}
else if (document.getElementById) {
document.getElementById('topButton').style.left = (window.innerWidth - 35) + 'px';
document.getElementById('topButton').style.visibility = 'visible';
}
if (document.all)
window.onscroll = floatButton;
else
setInterval ('floatButton()', 100);
}


function menuOver(menu,bColor,tColor){
document.getElementById(menu).style.color = tColor;
document.getElementById(menu).style.background = bColor;
}

function menuClick(menu,winLoc){
window.open(menu,winLoc);
}
function right(e) {
return;
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2)) {
alert (' MahersPaint.com\n Version 2.4\n\nCopyright © 2002 LFGetch\n All Rights Reserved')
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert (' MahersPaint.com\n Version 2.4\n\nCopyright © 2002 LFGetch\n All Rights Reserved')

return false;
}
return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
