function displayImage(imageSrc){
	newImage = "url(" + imageSrc + ")";
	document.getElementById('pic').style.backgroundImage = newImage;
}
function displayBG(){
	newImage = "url(images/background.gif)";
	document.getElementById('top').style.backgroundImage = newImage;
}
function openpopup(pic) {
	newwindow=window.open("pic_popup.htm?pic=" + pic,"pic","height=350,width=350,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,titlebar=no,left=240,top=100");
}
function getargs() { 
	var args = new Object(); 
	var query = location.search.substring(1); 
	var pairs = query.split("&"); 
	
	for (var i = 0; i < pairs.length; i++) { 
		var pos = pairs[i].indexOf('='); 
		if (pos == -1) continue; 
		var argname = pairs[i].substring(0,pos); 
		var value = pairs[i].substring(pos+1); 
		args[argname]=value; 
	} 
	return args; 
} 
function writeimage(image){
	document.write("<IMG SRC='" + image + "' BORDER='0'></TD>");
}
function resize() {
	var width = 350 ;
	var height = 350 ;

	width = document.images[0].width + 6;
	height = document.images[0].height + 26;
	if ( width > 700 ) width = 700;
	if(document.all){
		window.resizeTo(width, height);
	}else{
		window.resizeTo(width, height);
	}
}
function loadImages(){
	pic1= new Image(); 
	pic1.src="images/thebayhorse1.jpg"; 
	pic2= new Image(); 
	pic2.src="images/thebayhorse2.jpg"; 
	pic3= new Image(); 
	pic3.src="images/thebayhorse3.jpg"; 
	pic4= new Image(); 
	pic4.src="images/thebayhorse4.jpg"; 
}
