var dorthin = null;
var width = 0;
var height = 0;
function OpenWindow(imagesource,width,height) {
	if (window.screen) {
		var hori = screen.availWidth;
		var verti = screen.availHeight;
		image = window.open("image.php?source=" + imagesource,'image','width='+ width +',height='+ height +',left='+((hori - width- 10)* .5) +',top='+((verti - height- 30)* .5)+',scrollbars=0')
		image.focus()
	}
}

function OpenGalerie(folder,width,height,number) {
	if (window.screen) {
		var hori = screen.availWidth;
		var verti = screen.availHeight;
		galerie = window.open("galerie.php?folder=" + folder + "&number=" + number,'galerie','width='+ width +',height='+ height +',left='+((hori - width- 10)* .5) +',top='+((verti - height- 30)* .5)+',scrollbars=0')
		galerie.focus()
	}
}

function popup(source,width,height) {
	if (window.screen) {
		var hori = screen.availWidth;
		var verti = screen.availHeight;
		popup = window.open(source,'popup','width='+ width +',height='+ height +',left='+((hori - width- 10)* .5) +',top='+((verti - height- 30)* .5)+',scrollbars=0')
		popup.focus()
	}
}
function openPlayer(playlist,width,height) {
	if (window.screen) {
		var hori = screen.availWidth;
		var verti = screen.availHeight;
		player = window.open('player.php?playlist='+playlist,'player','width='+ width +',height='+ height +',left='+((hori - width- 10)* .5) +',top='+((verti - height- 30)* .5)+',scrollbars=0')
		player.focus()
	}
}
