function Over(image) {
	if(image && document.images && image.src.indexOf("_on.gif")==-1){image.src = image.src.substring(0,(image.src.indexOf(".gif"))) + "_on.gif";}
}

function Out(image) {
	if(image && document.images && image.src.indexOf("_on.gif")!=-1){image.src = image.src.substring(0,(image.src.indexOf("_on.gif"))) + ".gif";}
}

function helpwin(URL){
	var newURL = URL.replace('.shtml','.html')
	popup_window = window.open(newURL,'popup','status=no,scrollbars=no,resizable=yes,width=400,height=460,top=30,left=15');
	if (window.focus) {popup_window.focus();}
	return false;
}

function xssihelpwin(URL){
	var newURL = URL + ((URL.indexOf('?') != -1) ? '&':'?') + 'popup=yes';
	popup_window = window.open(newURL,'popup','status=no,scrollbars=no,resizable=yes,width=400,height=460,top=30,left=15');
	if (window.focus) {popup_window.focus();}
	return false;
}

function wwwwwin(URL){
	var newURL = URL + ((URL.indexOf('?') != -1) ? '&':'?') + 'popup=yes';
	popup_window = window.open(newURL,'popup','status=no,scrollbars=no,resizable=yes,width=580,height=460,top=30,left=15');
	if (window.focus) {popup_window.focus();}
	return false;
}

function imgChanger(to) {
	JointedImages = new Array();
	if (document.images) {
		JointedImages[to] = new Image();
		document.images['buildspace'].src = ImagePath2 + ImageList2[to];
	}
}

function CreatePreload() {
	if (document.images) {
		PreImages01 = new Array();
		for (var i = 0; i < ImageList.length; i++) {
			PreImages01[i] = new Image();
			PreImages01[i].src = ImagePath + ImageList[i];
		}
	}
}

function CreatePreload2() {
	if (document.images) {
		PreImages02 = new Array();
		for (var j = 1; j < ImageList2.length; j++) {
			PreImages02[j] = new Image();
			PreImages02[j].src = ImagePath2 + ImageList2[j];
		}
	}
}

function PreloadHeader() {
	if (document.images) {
		PreImagesHead = new Array();
		for (var i = 0; i < ImageListHead.length; i++) {
			PreImagesHead[i] = new Image();
			PreImagesHead[i].src = ImagePathHead + ImageListHead[i];
		}
	}
}

function fullwindow(URL) {
	var height = (window.screen.height)-55;
	var width = (window.screen.width)-10;
	
	if (window.opera) {
		newwindow = window.open('/scotland/education/wwww/buildings/enhanced/index.shtml','popup','fullscreen=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	}
	else {	
		newwindow = window.open('/scotland/education/wwww/buildings/enhanced/index.shtml','popup','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=' + width + ',height=' + height);
		newwindow.moveTo(0, 0);
	}
	if (window.focus) {newwindow.focus()}
}