if (self.location.host != top.location.host) {
	top.location.href = self.location.href;
}

function opna_glugga(url, nafn, w, h, r, sc) {
	if (isNaN(w))  { w=620; }
	if (isNaN(h))  { h=600; }
	if (isNaN(r))  { r=0; }
	if (isNaN(sc)) { sc=0; }
	gluggi = window.open(url,nafn,"width="+w+",height="+h+",toolbar=0,status=0,resizable="+r+",menubar=0,scrollbars="+sc);
	gluggi.focus();
}

function opna_nyjan(url) {
	gluggi = window.open(url);
	gluggi.focus();
}

function ekkert () { 
	//init() 
}

function init() {
	var userScreen = new screenObject();

	window.onresize = function () {
		if (userScreen.width() > 720) {
			logo.style.left = (userScreen.width()/2-360)+606+"px";
		} else {
			logo.style.left = 606+"px";
		}
		logo.style.top = "0px";
	}
	onresize();
}

function screenObject() {
	this.bottom = function() {
		if (document.body.scrollHeight) return document.body.scrollHeight;
	}

	this.height = function() {
		if (document.body.offsetHeight) return document.body.offsetHeight;
	}

	this.visHeight = function() {
		if (window.innerHeight) return window.innerHeight;
		if (document.body.clientHeight) return document.body.clientHeight;
	}

	this.width = function() {
		if (document.body.offsetWidth) return document.body.offsetWidth;
	}

	this.scrollTop = function() {
		if(document.body.scrollTop) return document.body.scrollTop
		if (window.pageYOffset) return window.pageYOffset;
		else return 0;
	}
}

