/* NAVIGATION SCRIPT */
function Navigation(selected, image_location, home_url) {

	this.selected = selected;
	this.image_location = image_location;
	this.text = 'text';
	this.menu = 'menu';
	this.menu_over = 'over';
	this.menu_out = 'out';
	this.visible = 'visible';
	this.hidden = 'hidden';
	this.home_url = home_url;
	
	this.init = init;
	this.show = show;
	this.over = over;
	this.over_private = over_private;
	this.out = out;
	this.out_private = out_private;
	this.home = home;

	this.init();

	function init() {
		this.show(this.selected);
		if (this.selected != 'page_00') {
			this.over_private(this.selected);
		}
	}

	function show(id) {
		document.getElementById(this.selected + '_' + this.text).className = this.hidden;
		document.getElementById(id + '_' + this.text).className = this.visible;
		if (id != this.selected && this.selected != 'page_00') {
			this.out_private(this.selected);
		}
		this.selected = id;
	}

	function over_private(id) {
		document.getElementById(id + '_' + this.menu).src = this.image_location + id + '_' + this.menu + '_' + this.menu_over + '.gif';
	}

	function out_private(id) {
		document.getElementById(id + '_' + this.menu).src = this.image_location + id + '_' + this.menu + '_' + this.menu_out + '.gif';
	}

	function over(id) {
	if (id != this.selected) {
		this.over_private(id);
		}
	}

	function out(id) {
		if (id != this.selected) {
			this.out_private(id);
		}
	}

	function home() {
		document.location.href = this.home_url;
	}

}

function Language(image_location) {

	this.image_location = image_location;
	this.menu = 'menu';
	this.menu_over = 'over';
	this.menu_out = 'out';

	this.go = go;
	this.over = over;
	this.out = out;

	function go(target) {
		document.location.href = target;
	}

	function over(id) {
		document.getElementById(id + '_' + this.menu).src = this.image_location + id + '_' + this.menu + '_' + this.menu_over + '.gif';
	}

	function out(id) {
		document.getElementById(id + '_' + this.menu).src = this.image_location + id + '_' + this.menu + '_' + this.menu_out + '.gif';
	}

}

function PictureWindow(image_location, close, url, name, width, height, top, left, resizable, scrollbars, toolbar, addressbar, statusbar) {

	this.image_location = image_location;
	this.close = close;
	this.url = url;
	this.name = name;

	this.show = show;
	this.createWindow = createWindow;
	this.yesno = yesno;

	this.parameters = 'width=' + width + ',height=' + height + ',top=' + top + ',left=' + left + ',resizable=' + this.yesno(resizable) + ',scrollbars=' + this.yesno(scrollbars) + ',toolbar=' + this.yesno(toolbar) + ',addressbar=' + this.yesno(addressbar) + ',statusbar=' + this.yesno(statusbar);

	function show(id, comment) {
		var win = this.createWindow();
		comment = (comment != '') ? ' | ' + comment : comment;
		win.document.write('<html><head><title>' + this.name + '</title><style type="text/css">@import url(\'../styles/pictures.css\');</style><script type="text/javascript" src="../scripts/windows.js"></script></head><body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="resizeWin();" onclick="window.close();" title="' + this.close + '"><div><img src="' + this.image_location + id + '.jpg' + '" /><div>&copy <strong>De Bosgeus' + comment + '</strong></div></div></body></html>');
		win.document.close();
		win.focus();
	}

	function createWindow() {
		return window.open(this.url, this.name, this.parameters);
	}

	function yesno(bool) {
		return bool ? 'yes' : 'no';
	}

}

