// Copyright 1999-2002, Richard Rutter. www.cuzza.com

//gets page out of someone else's frames
if (self != top) top.location = self.location

//notes in status bar the image is zoomable
function zon() {window.status='Click to zoom image'; return true;}
function zoff() {window.status='Click to hide'; return true;}
function zout() {window.status=''; return true;}

// this script was simplified from that at www.dhtmlcentral.com
//Browsercheck
function lib_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}

var bw=lib_bwcheck()
var px = bw.ns4||window.opera?"":"px";
var descx = 0
var descy = 0
var zooming = 0

// gets mouse position
function popmousemove(e){descx=bw.ns6?e.pageX:event.clientX; descy=bw.ns6?e.pageY:event.clientY}

// shows zoom image
function popup(img){
	if(zooming=='0') {
		if(bw.dom) {
			zooming = 1
			document.images['zoomImg'].src = '/images/zooming.gif'
			imgURL = '/images/big/'+img+'.jpg'
			document.images['zoomImg'].src = imgURL
			if(bw.ie5||bw.ie6) descy = descy+document.body.scrollTop
			document.getElementById('zoom').style.top = descy+px
			document.getElementById('zoom').style.left = descx+px
			document.getElementById('zoom').style.visibility = 'visible'
		}
	}
	else {popout()}
}
//hides zoom image
function popout(){
	zooming = 0 
	document.getElementById('zoom').style.visibility = 'hidden'
}

// tracks mouse movement
document.onmousemove = popmousemove

//hide a given ID
function hideId(divId) {
	if (bw.dom) {
		document.getElementById(divId).style.visibility = 'hidden'
	}

}

//show a given ID
function showId(divId) {
	if (bw.dom) {
		document.getElementById(divId).style.visibility = 'visible'
	}
}

//show-hide a given ID
function showhideId(divId) {
	if (bw.dom) {
		if (document.getElementById(divId).style.visibility == 'visible') {
			hideId(divId)
		} else {
			showId(divId)
		}
	}
}


