



//  Force getElementById to work

if(!document.getElementById) {
	if(document.all) {
		document.getElementById = function() {
			if(typeof document.all[arguments[0]] != "undefined") {
				return document.all[arguments[0]];
			} else {
				return null;
			}
		}
	} else if(document.layers) {
		document.getElementById = function() {
			if(typeof document[arguments[0]] != "undefined") {
				return document[arguments[0]];
			} else {
				return null;
			}
		}
	}
}








//  Alternative to "voided" links

function Hello() {
	// Empty function
}








//  Show and Hide objects

function objectShow(id) {
	document.getElementById(id).style.visibility = "visible";
}
function objectHide(id) {
	document.getElementById(id).style.visibility = "hidden";
}








//  Popup windows

function windowPop(url, id, width, height) {
	var x = ((screen.width / 2) - ((width) / 2));
	var y = ((screen.height / 2) - ((height) / 2));
	windowNew = window.open(url,id,"width="+ width +",height="+ height +",scrollbars=no,resizable=no,left="+ x +",top="+ y);
	windowNew.focus();
}








//  Scroll Controls

var scrollTimer;
function scrollStart(frame, px, vec) {
	if (scrollTimer) clearTimeout(scrollTimer);
	if (top.frames[frame]) {
		if (vec == "v") top.frames[frame].scrollBy(0, px);
		else top.frames[frame].scrollBy(px, 0);
		scrollTimer = setTimeout("scrollStart('"+ frame +"',"+ px +",'"+ vec +"')", 20);
	}
}
function scrollStop() {
	if (scrollTimer) clearTimeout(scrollTimer);
}








//  Slide Controls

var slideCurrent = 0;
function slideNext(slideCurrent) {
	if (!slideCurrent) slideCurrent = 0;
	objectHide('detail'+slideCurrent);
	slideCurrent++;
	if (slideCurrent > slideMax - 1) slideCurrent = 0;
	objectShow('detail'+slideCurrent);
	return slideCurrent;
}
function slidePrev(slideCurrent) {
	if (!slideCurrent) slideCurrent = 0;
	objectHide('detail'+slideCurrent);
	slideCurrent--;
	if (slideCurrent < 0) slideCurrent = slideMax - 1;
	objectShow('detail'+slideCurrent);
	return slideCurrent;
}








