function winDim () {
	var strBrowser = navigator.appName
	var winDim = new Array()
	//document.write(strBrowser)
	
	// indre højde_bredde defineres
	if (strBrowser == "Microsoft Internet Explorer") {
		winDim[0] = document.body.clientWidth
		winDim[1] = document.documentElement.clientHeight}
	else {
		winDim[0] = window.innerWidth
		winDim[1] = window.innerHeight
	}
//alert(winDim[0] + "/" + winDim[1])
return (winDim)
}
function resval() {
	width=winDim()[0]	
	height=winDim()[1]	
	// opløsningsvariable defineres
	svgaH = 550
	svgaW = 956
	xgaH = 780
	xgaW = 1264
	
	
	// resolutionstrin defineres
	var widthstep
	var heightstep
	
	// resolutionstrin beregnes
	// bredde
	if (width < xgaW) {
		widthstep = 0
	}
	if (width >= xgaW){
		if (width < svgaW) {
			widthstep = 0}
			else {
			widthstep = 0}
	}
	if (width >= svgaW) {
		if (width < xgaW) {
			widthstep = 1}
			else {
			widthstep = 0}
	}
	if (width >= xgaW) {
		widthstep = 2
	}
	
	// højde
	if (height < xgaH) {
		heightstep = 0
	}
	if (height >= xgaH){
		if (height < svgaH) {
			heightstep = 0}
			else {
			heightstep = 0}
	}
	if (height >= svgaH) {
		if (height < xgaH) {
			heightstep = 1}
			else {
			heightstep = 0}
	}
	if (height >= xgaH) {
		heightstep = 2
	}
	var resval
	
	if (widthstep - heightstep >= 0) {
		resval = heightstep}
		else {
		resval = widthstep
	}
return (resval)
}

