

images = new Array(8);

images[0] = "images/random/random1.jpg";
images[1] = "images/random/random2.jpg";
images[2] = "images/random/random3.jpg";
images[3] = "images/random/random4.jpg";
images[4] = "images/random/random5.jpg";
images[5] = "images/random/random6.jpg";
images[6] = "images/random/random7.jpg";
images[7] = "images/random/random8.jpg";



function rndImage(){
index = Math.floor(Math.random() * images.length);
document.write("<img src='"+ images[index] + "'/>");
}


startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("navlist");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace("over", "");
				}
			}
		}
	}
}

//////////* Photo Gallery Scripts *///////////

var x1=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24];

var y1=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];
var z1=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18];
var w1=[1,2,3,4,5,6,7];

function doThumbs(section, folder){
    var pathsmall =  'photos/thumbs/' + folder + '/';
    var pathLarge = 'photos/large/' + folder + '/';  
    //writestring='<p class=title>'+folder.substring(1,8)+'</p>';
    var writestring='';
    for(i=0; i <= eval(section).length - 1; i++){
        writestring+='<a href="javascript:doLarge(\''+folder+'\',\''+section[i]+'\')"><img src="'+pathsmall+ eval(section)[i]+'.jpg" class="thumb"></a>';
    }
    
    if(document.all){
            document.all[folder].innerHTML="";
            document.all[folder].innerHTML=writestring;
        }else if(document.getElementById){
            n=document.getElementById(folder);
            n.innerHTML="";
            n.innerHTML=writestring;
        }else if(document.layers){
            document.layers[folder].document.open();
            document.layers[folder].document.write("")
            document.layers[folder].document.write(writestring)
            document.layers[folder].document.close();
        }

}

function doLarge(folder,image){
    var pathLarge='photos/large/' + folder + '/';
    writestring='<img src="'+pathLarge+image+'.jpg" class="largeImage"/>';
    
    if(document.all){
            document.all["right"].innerHTML="";
            document.all["right"].innerHTML=writestring;
        }else if(document.getElementById){
            n=document.getElementById("right");
            n.innerHTML="";
            n.innerHTML=writestring;
        }else if(document.layers){
            document.layers["right"].document.open();
            document.layers["right"].document.write("")
            document.layers["right"].document.write(writestring)
            document.layers["right"].document.close();
        }   
}


/////////////////////////////////////////////////////////////

//////////////////////* Email validator *///////////////////


function validEmail(address) {
	var email=/^[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*@[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*\.([A-Za-z]){2,4}$/i;
	return(email.test(address));
}


/////////////////////////////////////////////////////////////