// Declare global variables
//========================================================================
var bw;
var fromLeft;	// How much from the left of the cursor should the div be?
var fromTop;	// How much from the top of the cursor should the div be?
var pin;		// Wether layer should be locked in position or not

// Assign values to variables
	bw = new DetermineBrowser();
	fromLeft = -14;
	fromTop = -14;
	pin = 0;

function DetermineBrowser(){
//Default browsercheck, added to all scripts!
	this.ver = navigator.appVersion
	this.dom = document.getElementById?1:0
	this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4 = (document.all && !this.dom)?1:0;
	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4 = (document.layers && !this.dom)?1:0;
	this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
} // End Function

function cursorInit(divName){
// This releases the locked DIV
	if (pin==1) { pin=0 }
// Initilizes the objects
	oCursor = new makeCursorObj(divName)
	scrolled = bw.ns4 || bw.ns5?"window.pageYOffset":"document.body.scrollTop"
	if (bw.ns4) { document.captureEvents(Event.MOUSEMOVE) }
	document.onmousemove=move;
} // End Function

function makeCursorObj(obj,nest){
// Contructs the cursorobjects
	nest=(!nest) ? '':'document.'+nest+'.'										
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;														
	this.moveIt=b_moveIt; 																	
	return this
} // End Function

function b_moveIt(x,y){
	this.x=x;
	this.y=y;
	this.css.left=this.x;
	this.css.top=this.y
} // End Function

function move(e){
// Tracking the mousemove and moves the object along.
	if (pin==0){
		x=bw.ns4 || bw.ns5?e.pageX:event.x
		y=bw.ns4 || bw.ns5?e.pageY:event.y
		if (bw.ie4 || bw.ie5) { y=y+eval(scrolled) }
		oCursor.moveIt(x+fromLeft,y+fromTop)
	} // End If
} // End Function

function showHide(div,nest){
// With nested layers for netscape, this function hides the layer if it's visible and visa versa
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	if(obj.visibility=='visible' || obj.visibility=='show') {
		obj.visibility='hidden';
	} else {
		obj.visibility='visible';
	} // End If
} // End Function

function setpin(){
	if (pin==0){
		pin=1;
		<!-- document.layers['box'].document.images.image1.src="pin.gif"; -->
	} else {
		pin=0;
		<!-- document.layers['box'].document.images.image1.src="movepin.gif"; -->
	} // End if
} // End Function

function OpenInfo(divName){
	cursorInit(divName);
	showHide(divName);
} // End Function

function CloseInfo(divName){
	setpin(0);
	showHide(divName);
} // End Function
