/*  
scottstaton.com javascript file written by Al Payson
*/	

        var IllustrationOff= new Image();
		IllustrationOff.src="images/buttons/illustrationOff.jpg"
	var IllustrationOn= new Image();
		IllustrationOn.src="images/buttons/illustrationOn.jpg"		
	var AnimationOff= new Image();
		AnimationOff.src="images/buttons/animationOff.jpg"
	var AnimationOn= new Image();			
		AnimationOn.src="images/buttons/animationOn.jpg"
	var CartoonsOff= new Image();
		CartoonsOff.src="images/buttons/cartoonsOff.jpg"
	var CartoonsOn= new Image();
		CartoonsOn.src="images/buttons/cartoonsOn.jpg"	
	var PaintingsOff= new Image();
		PaintingsOff.src="images/buttons/paintingsOff.jpg"
	var PaintingsOn= new Image();
		PaintingsOn.src="images/buttons/paintingsOn.jpg"
	var LogosOff= new Image();
		LogosOff.src="images/buttons/logosOff.jpg"
	var LogosOn= new Image();
		LogosOn.src="images/buttons/logosOn.jpg"
	var CDCoversOff= new Image();
		CDCoversOff.src="images/buttons/cdcoversOff.jpg"
	var CDCoversOn= new Image();
		CDCoversOn.src="images/buttons/cdcoversOn.jpg"
	var MusicOff= new Image();
		MusicOff.src="images/buttons/musicOff.jpg"
	var MusicOn= new Image();
		MusicOn.src="images/buttons/musicOn.jpg"
	var medIllustrationOff= new Image();
		medIllustrationOff.src="images/buttons/medIllustrationOff.jpg"
	var medIllustrationOn= new Image();
		medIllustrationOn.src="images/buttons/medIllustrationOn.jpg"
        var ContactOff= new Image();
		ContactOff.src="images/buttons/contactOff.jpg"
	var ContactOn= new Image();
		ContactOn.src="images/buttons/contactOn.jpg"
        var HomeOff= new Image();
		HomeOff.src="images/buttons/sscomTopBannerOff.jpg"
	var HomeOn= new Image();
		HomeOn.src="images/buttons/sscomTopBannerOn.jpg"
        var BioOff= new Image();
		BioOff.src="images/buttons/bioOff.jpg"
	var BioOn= new Image();
		BioOn.src="images/buttons/bioOn.jpg"

        var IllustrationSmOff= new Image();
		IllustrationSmOff.src="images/buttons/illustrationSmOff.jpg"
	var IllustrationSmOn= new Image();
		IllustrationSmOn.src="images/buttons/illustrationSmOn.jpg"		
	var AnimationSmOff= new Image();
		AnimationSmOff.src="images/buttons/animationSmOff.jpg"
	var AnimationSmOn= new Image();			
		AnimationSmOn.src="images/buttons/animationSmOn.jpg"
	var CartoonsSmOff= new Image();
		CartoonsSmOff.src="images/buttons/cartoonsSmOff.jpg"
	var CartoonsSmOn= new Image();
		CartoonsSmOn.src="images/buttons/cartoonsSmOn.jpg"	
	var PaintingsSmOff= new Image();
		PaintingsSmOff.src="images/buttons/paintingsSmOff.jpg"
	var PaintingsSmOn= new Image();
		PaintingsSmOn.src="images/buttons/paintingsSmOn.jpg"
	var LogosSmOff= new Image();
		LogosSmOff.src="images/buttons/logosSmOff.jpg"
	var LogosSmOn= new Image();
		LogosSmOn.src="images/buttons/logosSmOn.jpg"
	var CDCoversSmOff= new Image();
		CDCoversSmOff.src="images/buttons/cdcoversSmOff.jpg"
	var CDCoversSmOn= new Image();
		CDCoversSmOn.src="images/buttons/cdcoversSmOn.jpg"
	var MusicSmOff= new Image();
		MusicSmOff.src="images/buttons/musicSmOff.jpg"
	var MusicSmOn= new Image();
		MusicSmOn.src="images/buttons/musicSmOn.jpg"
	var medIllustrationSmOff= new Image();
		medIllustrationSmOff.src="images/buttons/medIllustrationSmOff.jpg"
	var medIllustrationSmOn= new Image();
		medIllustrationSmOn.src="images/buttons/medIllustrationSmOn.jpg"
        var ContactSmOff= new Image();
		ContactSmOff.src="images/buttons/contactSmOff.jpg"
	var ContactSmOn= new Image();
		ContactSmOn.src="images/buttons/contactSmOn.jpg"
        var HomeSmOff= new Image();
		HomeSmOff.src="images/buttons/sscomSmOff.jpg"
	var HomeSmOn= new Image();
		HomeSmOn.src="images/buttons/sscomSmOn.jpg"
        var BioSmOff= new Image();
		BioSmOff.src="images/buttons/bioSmOff.jpg"
	var BioSmOn= new Image();
		BioSmOn.src="images/buttons/bioSmOn.jpg"

function on(img) {
    document[img].src = eval(img+'on').src;
    }
function off(img) {
    document[img].src = eval(img+'off').src;
    }

function openNewSmWindow(url){
window.open(url,"newsmwindow","width=600,height=500");
}
function openNewMedWindow(url){
window.open(url,"newmdwindow","width=600,height=600");
}
function openNewLgWindow(url){
window.open(url,"newlgwindow","width=1024,height=768,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
}
   
/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/menu/photo_click.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */

clickMenu = function(menu) {
	var getEls = document.getElementById(menu).getElementsByTagName("LI");
	var getAgn = getEls;

	for (var i=0; i<getEls.length; i++) {
			getEls[i].onclick=function() {
				for (var x=0; x<getAgn.length; x++) {
					if ((this.className.indexOf('default'))==-1) {
						getAgn[x].className=getAgn[x].className.replace("default", "off");
					}
				getAgn[x].className=getAgn[x].className.replace("unclick", "");
				getAgn[x].className=getAgn[x].className.replace("click", "unclick");
				}
			if ((this.className.indexOf('unclick'))!=-1) {
				for (var x=0; x<getAgn.length; x++) {
				getAgn[x].className=getAgn[x].className.replace("off", "default");
				}
				this.className=this.className.replace("unclick", "");
				}
				else {
				this.className+=" click";
				}
			}
		}
	}
