
//Library Rollover v1.0
function swap(defaultImage)
{
	defaultImage.src = this.mouseOverImage.src;
}

function restore(image) 
{
	image.src = this.defaultImage.src;
}

function rollOver(defaultImage, mouseOverImage) 
{
	this.swap = swap;
	this.restore = restore;

	this.defaultImage = new Image();
	this.defaultImage.src = defaultImage;

	this.mouseOverImage = new Image();
	this.mouseOverImage.src = mouseOverImage;
}

//Library Status v1.0
function setStatus(string, returnValue) {
	document.status = string;
	return returnValue;
}



//Library Browser detect v1.0
function browser()
{	
	this.detect = navigator.userAgent.toLowerCase();
	this.place = "";
	this.thestring="";
	this.browser="";
	this.version="";
	this.OS="";
	this.width=0;
	this.height=0;
	this.isDOM = (document.getElementById) ? true : false;
	
	this.checkIt=checkIt;
	this.getHeight=getHeight;
	this.getWidth=getWidth;
	
	if (this.checkIt('konqueror'))
	{
		this.browser = "Konqueror";
		this.OS = "Linux";
	}
	else if (this.checkIt('omniweb')) this.browser = "OmniWeb";
	else if (this.checkIt('opera')) this.browser = "Opera";
	else if (this.checkIt('webtv')) this.browser = "WebTV";
	else if (this.checkIt('icab')) this.browser = "iCab";
	else if (this.checkIt('msie')) this.browser = "Internet Explorer";
	else if (!this.checkIt('compatible'))
	{
		this.browser = "Netscape Navigator";
		this.version = this.detect.charAt(8);
	}
	else this.browser = "An unknown browser";

	if (!this.version) this.version = this.detect.charAt(this.place + this.thestring.length);
	
	if (!this.OS)
	{
		if (this.checkIt('linux')) this.OS = "Linux";
		else if (this.checkIt('x11')) this.OS = "Unix";
		else if (this.checkIt('mac')) this.OS = "Mac"
		else if (this.checkIt('win')) this.OS = "Windows"
		else this.OS = "an unknown operating system";
	}
	
	getWidth();
	getHeight();
}

function getWidth() {
	if (parseInt(this.version)>3) {
	 if (this.browser=="Netscape Navigator") {
	  this.width = window.innerWidth-16;
	  return this.width;
	 }
	 if (this.browser=="Internet Explorer") {
	  this.width = document.body.offsetWidth-20;
	  return this.width;
	 }
	}
	else return 0;
}

function getHeight() {
	if (parseInt(this.version)>3) {
	 if (this.browser=="Netscape Navigator") {
	  this.height = window.innerHeight-16;
	  return this.height;
	 }
	 if (this.browser=="Internet Explorer") {
	  this.height = document.body.offsetHeight-20;
	  return this.height;
	 }
	}
	else return 0;
}

function checkIt(string) {
	this.place = this.detect.indexOf(string) + 1;
	this.thestring = string;
	return this.place;
}





