// popup for footer links
function infoPopUp(blox,ht,wd) {
	var hite=ht;
	var wid=wd;
	sizeValue="width=" + wid + ",height=" + hite + ",scrollbars=yes"
	infoRef = blox;
	packWin=open(infoRef, "myWindow", sizeValue);
	packWin.focus();
}

// Persistant Footer
// R.C.Lockwood
// Places a footer at the bottom of the screen
// Originally written for ONnet - hence ONbox sniffer. 
// V.1.0 - 29 September 2000
//////////////////////////////////////////////////////////////////////////////

// v.1.1 - 31 August 2004 - rewritten for Mozilla.


// bannerheight
bannerHeight = 15
// browser sniffer
function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ONbox = (agent.indexOf("netbox")!=-1);
  this.ie = (agent.indexOf("msie") != -1);
  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns4 = (this.ns && (this.major == 4));
}	// end browser sniffer
var is = new Is();

// if not an ONbox write in spacer gif
// if (!is.ONbox) document.write("<IMG SRC=\"images/space.gif\" WIDTH=1 HEIGHT=66>")

thePosition = ""
// get position of footer
if (is.ie) {
	thePosition += document.body.clientHeight - bannerHeight
	footerStr = "<SPAN ID='theFooter' STYLE='POSITION:absolute; TOP:" + thePosition + "; LEFT:10px;'>"
}
if (is.ns4) {
	thePosition += window.innerHeight - bannerHeight
	window.status = thePosition
	footerStr = "<LAYER ID='theFooter' TOP=" + thePosition + " LEFT=10>"
}
if (is.ns && !is.ns4) {
	thePosition += document.body.clientHeight - bannerHeight
	footerStr = "<SPAN ID='theFooter' STYLE='POSITION:absolute; TOP:" + thePosition + "; LEFT:10px;'>"
}

if (!is.ONbox) {
// footer content
footerStr += "<SPAN STYLE='background-color:#786954;width:705px;color: #ffffff; font-family: verdana,arial,helvetica,sans-serif; font-size:70%;'>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF='javascript:infoPopUp(\"privpol.html\",300,300)' TITLE='This link opens a pop-up window' style='color: #ffffff; text-decoration:none;'>privacy policy</A> | <A HREF='javascript:alert(\"copyright - all material copyright 2005\")' style='color: #ffffff; text-decoration:none;'>copyright</A> | <A HREF='javascript:alert(\"Please contact us for terms and conditions\")' style='color: #ffffff; text-decoration:none;'>terms and conditions</A> | <A HREF='mailto:info@gallery1900.com' style='color: #ffffff; text-decoration:none;'>contact us</A>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN>"

if (is.ns4) footerStr += "</LAYER>"
if (is.ie) footerStr += "</SPAN>"
if (is.ns && !is.ns4) footerStr += "</SPAN>"
document.write(footerStr)
}

function moveFooter()
{

if (!is.ONbox) {
	// get position of footer and move it
	if (is.ie) {
		
		thePosition = document.body.clientHeight - bannerHeight
		theFooter.style.top = document.body.scrollTop + thePosition
	}
	if (is.ns4) {	
		thePosition = window.innerHeight - bannerHeight
		document.layers.theFooter.top = pageYOffset + thePosition
	}
	
	if (is.ns && !is.ns4) {
		// Mozilla code
		thePosition = document.body.clientHeight - bannerHeight
		document.getElementById("theFooter").style.top = document.body.scrollTop + thePosition
	}
	
	
	
	lag = setTimeout("moveFooter()", 10)
}
}
if (!is.ONbox) moveFooter()

//this next bit seems to fix a bug which occured when a Netscape window was repeatedly resized - the banner would move to the bottom of the page and stay there.
function regen() {
	window.location.reload()
}
if (is.ns4) setTimeout("window.onresize = regen",600)
