var pop_x = 500;
var pop_y = 340;

// google analytics
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

// jquery functions
$(document).ready(function() {
													 
	$('a.new_window').click(function(event) {
		event.preventDefault();
		var url = $(this).attr("href");
		var ImageWindow = null;
		xPositie = ($(window).width() - pop_x) / 2;
		yPositie = ($(window).height() - pop_y) / 2;
		ImageWindow = window.open(url,"","height="+pop_y+",width="+pop_x+",screenX="+xPositie+",screenY="+yPositie+",scrollbars=yes,resizable=yes,noresize=no,toolbar=0,location=0,directories=0,status=0,menubar=0");
	});
	
	
	// google analytics
	try {
		var pageTracker = _gat._getTracker("UA-6033135-22");
		pageTracker._trackPageview();
	} catch(err) {}
});

// Variables to determine correct path to menus

var root = 0;	
var Wortel = "";
//																																																											Ausangate						Lares											IT		jungle				perur.						cult.															Esp.Pam
//						1  									10										20										30										40										50				54						60		62								70				74		76				80										90										100										110										120										130
var	BreedteString = "0,634,393,640,640,640,640,640,640,640,640,640,640,491,397,640,640,393,405,640,640,640,640,640,640,640,640,640,640,640,640,640,480,640,640,414,640,466,640,640,640,640,640,640,640,640,640,640,400,640,640,640,450,640,640,394,640,640,640,640,640,640,640,406,405,640,406,640,640,640,640,640,640,640,640,640,450,640,640,640,640,640,640,640,640,640,640,640,600,450,600,450,600,600,450,600,400,600,600,450,450,600,600,600,600,411,400,600,400,600,600,450,600,600,600,600,600,600,600,600,450,600,600,600,600,600,480,600,600,480,480,600,600,600,600,600,600";
var	HoogteString = "0,427,600,480,431,422,480,430,433,480,430,420,413,551,600,471,480,600,600,469,423,397,480,429,480,423,423,430,423,427,454,420,640,429,415,600,439,600,480,337,480,480,456,434,431,421,419,431,600,429,433,430,600,480,429,600,433,421,434,431,432,430,422,600,600,434,600,418,418,432,441,434,434,417,480,480,600,480,480,421,423,480,480,418,430,427,439,428,408,600,450,600,450,450,600,450,360,450,400,560,600,450,450,450,400,600,600,450,600,450,450,600,450,450,450,450,450,450,450,450,600,450,450,450,450,400,359,380,395,359,572,450,450,450,450,450,450";
var	Breedte = BreedteString.split(",");
var	Hoogte = HoogteString.split(",");

function Vergroot(foto, breed, hoog)
{
	var ImageWindow = null;
	var xPositie = 0;
	var yPositie = 0;
	var Verschuiven = "no";
	
	if (breed > screen.availWidth) {
		breed = screen.availWidth - 36;
		Verschuiven = "yes";
		hoog = parseInt(hoog) + 16;
	}
	else {
		xPositie = (screen.availWidth - breed) / 2;
	}
	if (hoog > screen.availHeight) {
		hoog = screen.availHeight - 36;
		Verschuiven = "yes";
		breed = parseInt(breed) + 16;
	}
	else {
		yPositie = (screen.availHeight - hoog) / 2;
	}
	ImageWindow = window.open(foto,"","height="+hoog+",width="+breed+",screenX="+xPositie+",screenY="+yPositie+",scrollbars="+Verschuiven+",resizable=0,noresize=yes,toolbar=0,location=0,directories=0,status=0,menubar=0");
}

function LaadPlaatje(Nummer)
{
var Naam = '';
	if (root != 1) {
		Naam = '../';
	}
	Naam = Naam + 'multimedia/photo.html?';
	if (Nummer < 10) {
		Naam = Naam + '0';
	}
	Naam = Naam + Nummer;

	// alert("Breed: " + Breedte[Nummer] + "; Hoog: " + Hoogte[Nummer]);
	Vergroot(Naam, Breedte[Nummer], Hoogte[Nummer]);
}

function blockError()
{
	return true;
}

window.onerror = blockError;
