function open_extern(url) {	
	remote = window.open("", "_blank");
	if (remote.opener == null) remote.opener = window; 
	remote.location = url;
	remote.focus(); 
}
function open_popupp(url,w,h) {
	s = "scrollbars=yes,resizable=yes,status=no,width=" + w + ",height=" + h;
	remote = window.open(url, "_blank", s);
	if (remote != null) {
		if (remote.opener == null) remote.opener = window; 
		remote.focus(); 
	} else {
		alert("Denna webbplats kräver stöd för popup-fönster.");
		top.location.href=url;
	}
}
function open_anpassad(url,w,h) {
	s = "width=" + w + ",height=" + h + ",scrollbars,resizable,status,toolbar,location,menubar,titlebar";
	remote = window.open(url, "_blank", s);
	if (remote != null) {
			if (remote.opener == null) remote.opener = window; 
			remote.focus(); 
		
	} else {
		alert("Denna webbplats kräver stöd för popup-fönster.");
		top.location.href=url;
	}
}
function open_popupp_sitekarta(url,w,h) {
	s = "scrollbars=yes,resizable=yes,status=no,width=" + w + ",height=" + h;
	remote = window.open("", "sitekarta", s);
	if (remote.opener == null) { remote.opener = window }
	//remote.moveTo(120,140);
	remote.location = url;
	remote.focus();
}

function openModal(url, bredd, hojd) {
	// obs funkar endast i ie
	// del av kod från http://support.microsoft.com/kb/167820

	var msie = false;
	if (window.navigator.userAgent) {
		var ua = window.navigator.userAgent
		msie = (ua.indexOf ( "MSIE " ) > 0);
	}
	
	if (msie) {
		s = "scroll:no;dialogHeight:" + hojd + "px;dialogWidth:" + bredd + "px;"
		window.showModalDialog(url, self, s);
	}
	else {
		open_popupp(url, bredd, hojd);
	}
}
