function openArchive() {
	var height = 616;
	var width = 595;
	var left = (screen.width - width) / 2;
	var top = (screen.height - height) / 2;
	var archive = window.open('/index.php?c=index&a=archive', 'archive', 'height=' + height + ',left=' + left + ',top=' + top + ',width=' + width);
}

function setExternalLinks() {
	if(!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName('a');
	for(var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		if(anchor.getAttribute('href') && anchor.getAttribute('rel') == 'external') anchor.target = '_blank';
	} 
}

function setImage(path, title) {
	document.getElementById('image').src = path;	
	document.getElementById('image-title').innerHTML = title;	
}