if (BrowserDetect.browser != "Explorer") {
	function setPageHeight() {
		//document.getElementById("page").style.height = "100%";
	    var height = (document.documentElement ? document.documentElement : document.body).scrollHeight;
		// fix for safari which has documentElement, but that has only height of viewport
	    if (height < document.body.scrollHeight) height = document.body.scrollHeight;
		document.getElementById("page").style.height = height+"px";
	}
	AddToInitArray(setPageHeight);
	window.onresize = setPageHeight;
}

function gl(url) {
	if (inCMS()) {
		parent.xcmsGoto(url);
	} else {
		if (/:\/\//.test(url)) {
			location.href = url;
		} else {
			location.href = "/"+url;
		}
	}
	return false;
}

/*
if (inCMS()) {
	AddToInitArray(fixtable);
	function fixtable() {
		var tekst = document.getElementById("tekst");
		if (tekst) {
			var tables = document.getElementsByClassName("tableo", tekst);
			for (var i = 0; i < tables.length; i++) {
				var th = tables[i].getElementsByTagName("TH")[0];
				th.style.borderLeft = "0";
			}
		}
		setTimeout(fixtable, 1000);
	}
}
*/

function mailafriend(url) {
  var page = location.href;
  var title = document.getElementsByTagName("TITLE")[0].innerText;
  location.href = "/"+url+"?page_url="+encodeURIComponent(page)+";title="+escape(title);
  return false;
}
