window.onerror=null;function browserInformation() {    this.ie = (navigator.appName.indexOf('Micr') != -1);    this.ns = (navigator.appName.indexOf('Nets') != -1);    this.mac = (navigator.userAgent.indexOf('Mac') != -1) || (navigator.userAgent.indexOf('mac') != -1);    this.windows = (navigator.userAgent.indexOf('Win') != -1) || (navigator.userAgent.indexOf('win') != -1);    this.level4 = (navigator.appVersion.charAt(0) >=  4)}theBrowser = new browserInformation();function Preload() {	if (theBrowser.ie) {		index = this.displayed - 1;		if (index < 0 ) { index = this.thePictureListSrc.length - 1; }		this.preloadAtIndex(index);	    index = this.displayed + 1;		if (index > this.thePictureListSrc.length - 1 ) { index = 0; }		this.preloadAtIndex(index);	} else {		for ( var i= 0 ; i <= this.thePictureListSrc.length - 1; i++) {			this.preloadAtIndex(i);		}	}}//function Preload() {//    index = this.displayed - 1;//	if (index < 0 ) { index = this.thePictureListSrc.length - 1; }//	this.preloadAtIndex(index);//    index = this.displayed + 1;//	if (index > this.thePictureListSrc.length - 1 ) { index = 0; }//	this.preloadAtIndex(index);//}//function Wait(anIndex) {//	if (this.thePictureList[anIndex].complete != true) {//		 setTimeout(this.wait(anIndex),100);//	}//}function PreloadAtIndex(anIndex) {	if ( this.thePictureList[anIndex] == null ) {		//index = 0		this.thePictureList[anIndex] = new Image();		this.thePictureList[anIndex].src = this.thePictureListSrc[anIndex].thePicture;		//while (this.thePictureList[anIndex].complete != true || index >= 200) {		//	this.thePictureListSrc[this.displayed].status = 'loading...';		//	index += 1;		//}		//this.thePictureListSrc[this.displayed].status = 'loaded';    }}function ChangeDisplayed(anIndex) {	this.displayed = anIndex}function NextPicture() {	if (this.displayed < this.thePictureListSrc.length - 1) {		var index = this.displayed + 1	} else {		index = 0;    }	if ( this.thePictureList[index] == null ) {		this.preloadAtIndex(index);	}	if ( this.thePictureList[index].complete == true ) {	document.images.Canvas.src = this.thePictureList[index].src;	document.images.Canvas.onLoad = this.changeDisplayed(index);	if (theBrowser.ie) {this.preload();}	}}function PreviousPicture() {    if (this.displayed > 0) {		var index = this.displayed - 1    } else {		index = this.thePictureListSrc.length - 1 ;	}	if ( this.thePictureList[index] == null ) {		this.preloadAtIndex(index);	}	if ( this.thePictureList[index].complete == true ) {	document.images.Canvas.src = this.thePictureList[index].src;	document.images.Canvas.onLoad = this.changeDisplayed(index);	if (theBrowser.ie) {this.preload();}	}}function PictureObject(aName, anImage, aGallery) {	// properties	this.theName = aName;	this.thePicture = anImage;	this.theGallery = aGallery;	this.status = null;}function createPicture(aName, anImage) {	aPicture = new PictureObject(aName, anImage, this);	var index = this.thePictureListSrc.length;	this.thePictureListSrc[index] = aPicture;	this.thePictureList[index] = null;	// return aPicture;}		function Gallery() {	// properties	this.thePictureList = new Array();	this.thePictureListSrc = new Array();	this.displayed = 0;		// methods		this.newPicture = createPicture;	this.nextPicture = NextPicture;	this.previousPicture = PreviousPicture;	this.preload = Preload;	this.preloadAtIndex = PreloadAtIndex;	this.changeDisplayed = ChangeDisplayed;}