/*Function to get window dimensions by support rather than browser */ 		function getWinDims() {			var result=new Array();			if(window.innerWidth) {				result[0]=window.innerWidth; result[1]=window.innerHeight;				return result;				}			if(document.documentElement && document.documentElement.clientWidth) {				if(document.clientWidth) {					result[0]=document.clientWidth; result[1]=document.clientHeight;					} else {					result[0]=document.documentElement.clientWidth; result[1]=document.documentElement.clientHeight;					}				return result;				}			if(document.body) {				result[0]=document.body.clientWidth; result[1]=document.body.clientHeight;				return result;				}}function Is() {	var agent  = navigator.userAgent.toLowerCase();	var plat  = navigator.platform.toLowerCase();    this.major = parseInt(navigator.appVersion);    this.minor = parseFloat(navigator.appVersion);    this.ns    = ((agent.indexOf('mozilla')   !=   -1) &&                 ((agent.indexOf('spoofer')   ==   -1) &&                 (agent.indexOf('compatible') ==   -1)));    this.ns2   = (this.ns && (this.major      ==    3));    this.ns3   = (this.ns && (this.major      ==    3));    this.ns4b  = (this.ns && (this.major      ==    4) &&                 (this.minor                  <= 4.03));    this.ns4   = (this.ns && (this.major      >=    4));    this.ns6    = (this.ns && (this.major     >=    5));    this.ns7    = (this.ns && (this.major     >=    7));    this.ie    = (agent.indexOf("msie")       !=   -1);    this.ie3   = (this.ie && (this.major      <     4));    this.ie4   = (this.ie && (this.major      ==    4) &&                 (agent.indexOf("msie 5.0")   ==   -1));    this.ie5   = (this.ie && (this.major      ==    4) &&                 (agent.indexOf("msie 5.0")   !=   -1));    this.ie55  = (this.ie && (this.major      ==    4) &&                 (agent.indexOf("msie 5.5")   !=   -1));    this.cam   = (agent.indexOf('camino')     !=   -1);    this.opera = (agent.indexOf('opera')      !=   -1);    this.saf   = (agent.indexOf('safari')     !=   -1);    this.ff    = (agent.indexOf('firefox')    !=   -1);    this.kong  = (agent.indexOf('konqueror')  !=   -1);    this.linux = (plat.indexOf('linux')       !=   -1);    this.w32   = (plat.indexOf('win32')       !=   -1);    this.mcp   = (plat.indexOf('macppc')      !=   -1);    this.m68   = (plat.indexOf('mac68k')      !=   -1);    this.mac   = (this.mcp || this.m68);    this.winie   = (this.ie && this.w32);} function getAngle(this_x,this_y,that_x,that_y) { 	var r=360+Math.round(Math.atan2(that_y-this_y,that_x-this_x)/0.017453293);	r-=360*(r>=360); return r;	}	//returns the angle in degrees formed by the horizontal plane running through 		//this and a line from this to that, reckoning clockwisefunction signOf(n) { return n>=0; } //true if n is 0 or greater, false if negativefunction toggleBool(tf) { return !tf }/*function toggleBool(tf) { if(tf) return false;							else return true } //true if arg if false, false if true*/function rndInRange(lower,upper) {	return (lower+Math.floor(Math.random()*(++upper-lower))); } //returns a random integer in the range	lower to upper. Either or both may be negativefunction posneg() {return -1+2*Math.floor(Math.random()+.5)} // returns 1 or -1 at random. 															 //useful for eg, reversing direction 															 //of a moving object at randomfunction showhide() { //args in pairs ("div1",true,"div2",false..) true to show, false to hide. Note quotes	var a=arguments,vh;	for(var loop=0;loop<a.length;loop+=2) {		a[loop+1] ? vh="visible" : vh="hidden";		changeObjectVisibility(a[loop],vh);		}}	function cap(s) { //cap initial letter of s	var i=s.charAt(0);	return i.toUpperCase()+s.substr(1);	}			function percentageOf(total,portion) {return 100/total*portion }	//what percentage of total is portion?	eg percentageOf(200,50) returns 25		function percent(total,portion) {return total/100*portion }	//what is portion percent of total?	eg percent(200,50) returns 100		function new_visit() {	var url_pattern=/(\w+):\/\/([\w.]+)\/(\S*)/;	var r1,r2;	if(document.referrer) {		var docref=document.referrer;		var docloc=document.URL; 		r1=docref.match(url_pattern);//if(!r1) r1=new Array(" "," ","2");		r2=docloc.match(url_pattern);		return r1[2]!=r2[2];	} else {return true;}	}	function getFileName() {	var docloc, url_pattern=/(\w+):\/\/([\w.]+)\/(\S*)/;	var r1,slash,pt,r2;		if(document.URL) {			docloc=document.URL; pt=-1;			while(pt==-1) {				pt=docloc.lastIndexOf('.php');				if(pt==-1) { docloc += 'index.php';}				}			pt--; slash=docloc.lastIndexOf('/');			return docloc.substr(slash+1,pt-slash);		} else {return 'index';}		}	function assign_page_order() {			for(var loop=0;loop<arguments.length;loop++) eval(arguments[loop]+'='+loop);			}function getObject(objectId) {    // cross-browser function to get an object's style object given its id    if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM	return document.getElementById(objectId);    } else if (document.all && document.all(objectId)) {	// MSIE 4 DOM	return document.all(objectId);    } else if (document.layers && document.layers[objectId]) {	// NN 4 DOM.. note: this won't find nested layers	return document.layers[objectId];    } else {	return false;    }} // getObjectfunction getStyleObject(objectId) {    // cross-browser function to get an object's style object given its id    if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM	return document.getElementById(objectId).style;    } else if (document.all && document.all(objectId)) {	// MSIE 4 DOM	return document.all(objectId).style;    } else if (document.layers && document.layers[objectId]) {	// NN 4 DOM.. note: this won't find nested layers	return document.layers[objectId];    } else {	return false;    }} // getStyleObjectfunction getObjectPosition(objectId) {	var xy=new Array();    // cross-browser function to get an object's xy coords given its id    if(document.getElementById && document.getElementById(objectId)) {	// W3C DOM	xy[0] = document.getElementById(objectId).style.top;	xy[1] = document.getElementById(objectId).style.left;alert('dom');	return xy;    } else if (document.all && document.all(objectId)) {	// MSIE 4 DOM	xy[0] = document.all(objectId).style.top;	xy[1] = document.all(objectId).style.left;alert('ie');	return xy;    } else if (document.layers && document.layers[objectId]) {	// NN 4 DOM.. note: this won't find nested layers	xy[0] = document.layers[objectId].top;	xy[1] = document.layers[objectId].left;alert('lay');	return xy;    } else {	return false;    }} // getStyleObjectfunction changeObjectVisibility(objectId, newVisibility) {    // get a reference to the cross-browser style object and make sure the object exists    var styleObject = getStyleObject(objectId);    if(styleObject) {	styleObject.visibility = newVisibility;	return true;    } else {	// we couldn't find the object, so we can't change its visibility	return false;    }} // changeObjectVisibilityfunction changeObjectBG(objectId, newBG) {    // get a reference to the cross-browser style object and make sure the object exists    var styleObject = getStyleObject(objectId);    if(styleObject) {	styleObject.backgroundColor = newBG;	return true;    } else {	// we couldn't find the object, so we can't change it	return false;    }} // changeObjectBackgroundfunction changeObjectColour(objectId, newColour) {    // get a reference to the cross-browser style object and make sure the object exists    var styleObject = getStyleObject(objectId);    if(styleObject) {	styleObject.color = newColour;	return true;    } else {	// we couldn't find the object, so we can't change its colour	return false;    }} // changeObjectColourfunction moveObject(objectId, newXCoordinate, newYCoordinate) {    // get a reference to the cross-browser style object and make sure the object exists    var styleObject = getStyleObject(objectId);    if(styleObject) {	styleObject.left = newXCoordinate;	styleObject.top = newYCoordinate;	return true;    } else {	// we couldn't find the object, so we can't very well move it	return false;    }} // moveObject by top-leftfunction moveObject_br(objectId, newXCoordinate, newYCoordinate) {    // get a reference to the cross-browser style object and make sure the object exists    var styleObject = getStyleObject(objectId);    if(styleObject) {	styleObject.right = newXCoordinate;	styleObject.bottom = newYCoordinate;	return true;    } else {	// we couldn't find the object, so we can't very well move it	return false;    }} // moveObject by bottom rightfunction Globals() {	this.newvisit = new_visit();	this.nv = this.newvisit ? 1 : 0;	}	var G = new Globals(); G.intID=null;    