
var rPath = "images/photos/";

var so = new SWFObject("ggheader.swf", "ggheader", "760", "125", "6", "#336699");
so.write("flashcontent");


function changeClass(element, newClass){
	document.getElementById(element).className= newClass;
}

/****** PRELOADER ******/

function preLoader(){

for (x=0; x<=13; x++) {
	imagevar="newimage" + x +" = new Image();"	
	eval(imagevar);
	
}
	newimage0.src = rPath + "fish1.jpg";
	newimage1.src = rPath + "fish2.jpg";
	newimage2.src = rPath + "fish3.jpg";
	newimage3.src = rPath + "fish4.jpg";
	newimage4.src = rPath + "fish5.jpg";
	newimage5.src = rPath + "fish6.jpg";	
	newimage6.src = rPath + "fish7.jpg";
	newimage7.src = rPath + "fish8.jpg";
	newimage8.src = rPath + "fish9.jpg";
	newimage9.src = rPath + "fish10.jpg";
	newimage10.src = rPath + "fish11.jpg";
	newimage11.src = rPath + "fish12.jpg";
	newimage12.src = rPath + "fish13.jpg";
	newimage13.src = rPath + "fish14.jpg";		
//alert("images loaded");
}

/****** WINDOW OPENER ******/

function openindex(element) { 
var pic= new Image();
pic.src = rPath + element +".jpg";
var up1 = pic.height;
var across1 = pic.width;
var up2 = up1+80;
var across2 =across1+40;
var OpenWindow=window.open("", "new"+element, "height="+up2+", width="+across2+","); 
OpenWindow.document.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
OpenWindow.document.writeln("<html>");
OpenWindow.document.writeln("<head>");
OpenWindow.document.writeln("<title>Gourmet Goldfish</title>");
OpenWindow.document.writeln("<link rel=\"stylesheet\" type=\"text/css\" href=\"ggstyles.css\" />");
OpenWindow.document.writeln("</head>");
OpenWindow.document.writeln("<body>");
OpenWindow.document.writeln("<br/>"); 
OpenWindow.document.writeln("<p style=\"text-align:center\"><img src=\"images/photos/" + element + ".jpg\" id=\""+ element +"\" height=\""+ up1 +"\" width=\""+ across1 +"\" /></p>"); 
OpenWindow.document.writeln("<p style=\"text-align:center\";><a href=\"javascript:self.close()\" target=\"_self\"><img src=\"images/close.gif\" border=\"0\"></a></p>");
OpenWindow.document.writeln("</br>"); 
OpenWindow.document.writeln("</body>");
OpenWindow.document.writeln("</html>");
OpenWindow.document.close()
}

function errorCheck() {	
		
	if ((document.email_form.name.value=="")||(document.email_form.name.value==" ")){
		alert("Please fill in the 'your name' field");
		return false;
	}
	
	if ((document.email_form.visitormail.value=="")||(document.email_form.visitormail.value==" ")){
		alert("Please fill in the 'your email' field");
		return false;
	}
		
	if ((document.email_form.subject.value=="")||(document.email_form.subject.value==" ")){
		alert("Please fill in the 'subject' field");
		return false;
	}
	if ((document.email_form.notes.value=="")||(document.email_form.notes.value==" ")){
		alert("Please type a message");
		return false;
	}		
	else {			
		document.email_form.submit();		
		//alert("email okay");
	}
}
