var SgDOM;
function SgBrowserobj(){
	this.ver = navigator.appVersion.toLowerCase();
	this.agent = navigator.userAgent.toLowerCase();
	this.name = navigator.appName.toLowerCase();
	this.byid = document.getElementById;
	this.opera = (this.agent.indexOf("opera")>-1);
	this.ie = (this.name == 'microsoft internet explorer' && !this.opera);
	this.ie4 = (this.ie && ( this.ver.indexOf("msie 4")>-1 || this.agent.indexOf("msie 4")>-1 ) );
	// ie5 didn't exist in production
    this.ie5 = (this.ie && ( this.ver.indexOf("msie 5")>-1 || this.agent.indexOf("msie 5")>-1 ) );
	this.ns = (this.name == 'netscape' && !this.opera);
	this.ns4 = (this.ns && document.layers);
	this.mac = (this.agent.indexOf("mac")>-1);
	this.windows = (this.agent.indexOf("windows")>-1);
return this;
}
if(!SgDOM){
	SgDOM = new SgBrowserobj();
}
function Bookmark(url,headline) {
	if(SgDOM.ie){
		window.external.AddFavorite(url,headline);
	} else if(SgDOM.ns) {
		alert("Klicka OK och tryck sedan CTRL+D för att lägga till i favoriter.");
	}
}
function openwin(link, name)
	{
		var iHeight = screen.height - 130
		var iWidth = 1024
		//window.open(link,'contracts','width='+screen.width+',height='+screen.height+',scrollbars=1,top=0,left=0');
		newWin = window.open(link,name,'fullscreen=0,menubar=1,resizable=1,scrollbars=1,width='+iWidth+',height='+iHeight+',top=0,left=0');
		newWin.focus();
	}

