function WebFSViewImage(username, id)
{
	vars = getUrlVars();	
	page = vars['page'];
	
	//document.getElementById('content_holder').innerHTML 	= document.getElementById('content').innerHTML;
	//document.getElementById('content').innerHTML 		= '<a href=\"javascript:WebFSGoBack();\" onclick=\"javascript:WebFSGoBack(); return false;\" title=\"Terug naar ' + page + '\"><img width=\"400px\" border=\"0\" src=\"http://webservice.holland-safari.nl/?Module=WebFS&Action=ActionGetFile&Size=Large&ID=' + id + '&&User=' + username + '&Service=HSW\" /></a><br /><br /><a href=\"javascript:WebFSGoBack();\" onclick=\"javascript:WebFSGoBack(); return false;\">Terug naar ' + page + '</a>';
	
	window.open('http://webservice.holland-safari.nl/?Module=WebFS&Action=PageFullSizeImage&ID=' + id + '&User=' + username + "&Service=HSW", 'WebFS',  'top=30,left=30,height=10,width=10,toolbar=no,menubar=no,scrollbars=yes, scrolling=yes,location=no,resizable=no');	
}

function WebFSGoBack()
{
	document.getElementById('content').innerHTML 				= document.getElementById('content_holder').innerHTML;
	document.getElementById('content_holder').innerHTML = '';
}

// Read a page's GET URL variables and return them as an associative array.
function getUrlVars(){    
	var vars = [], hash;    
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');     
	for(var i = 0; i < hashes.length; i++)    
	{        
		hash = hashes[i].split('=');        
		vars.push(hash[0]);        
		vars[hash[0]] = hash[1];    
	}     
	return vars;
}

function NavigateCMS(page)
{
	newpage = page.split(" ").join("_");
	window.location = './index.php?page=' + newpage;
}