// ------ Tillat ikke document i eget vindu -----------------
var hent = "http://www.cavaler.no/default.aspx";
//	if (window != top) top.location.href = hent;
// ------ Hvis ikke Explorer --------------------------------
var tell = '0';
var sSize;
var detect = navigator.userAgent.toLowerCase();
var browser,
	version,
	total,
	thestring;
if (checkIt('opera'))
	browser = "Opera"
else if (checkIt('msie'))
	browser = "Internet Explorer"
else if (!checkIt('compatible')) {
	browser = "Netscape Navigator"
	version = detect.charAt(8);
	}
else browser = "Ukjent nettleser";
// ------ Sjekker versjonsnummer paa Explorer og Opera -----
if (!version)
	version = detect.charAt(place + thestring.length);
	function checkIt(string) {
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}
// if (browser == "Netscape Navigator") {
//	document.write("<link rel='stylesheet' type='text/css' href='http://www.cavaler.no/css/styleinfo_netscape.css' media='screen'>");
//	}
// ------ Hent - om disse sidene ----------------------------
function om(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,status=no'
	win = window.open(mypage, myname, winprops)
	}
// ------ Legg til i favoritter -----------------------------
function addbookmark() {
	bookmarkurl="http://www.cavaler.no/";
//	bookmarktitle="Caval&#233;r Skyved&oslash;rsgarderobe - Moderne Eleganse p&aring; &oslash;verste hylle.";
	bookmarktitle=document.title;
	if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle);
	if(window.sidebar&&window.sidebar.addPanel)
		window.sidebar.addPanel("Cavalér","http://www.cavaler.no/",bookmarktitle);
}
// ------ Hent nytt bg-bilde mellom feltene -----------------
var bilde;
function startbilde() {
	parent.parent.frames.cavaler_midt.bg_table_aa.style.backgroundImage = "url('http://www.cavaler.no/fp/images/bg/" + bilde + ".jpg')";
	parent.parent.frames.cavaler_midt.bg_table_aa.style.backgroundRepeat = "no-repeat";
	parent.parent.frames.cavaler_midt.bg_table_aa.style.backgroundAttachment = "fixed"
	if (screen.width <= 1000) {
		parent.parent.frames.cavaler_midt.bg_table_aa.style.backgroundPosition = "center 38";
		} else {
		parent.parent.frames.cavaler_midt.bg_table_aa.style.backgroundPosition = "center 18";
	}
}
// ------- Msg pĺ statuslinje ------------------------------
// var sidetema = "";
// function UpdateIt(){
//	if (sidetema == "") { sidetema = parent.cavalerhoved.document.title };
//	window.status=' ::: ' + sidetema + ' ::: ';
//	setTimeout("UpdateIt()", 200);
//	}
// setTimeout("UpdateIt()", 1000);
// ------- Tips en venn ------------------------------------
var Subjecttxt='Jeg tror dette vil intressere deg!'; 
var Bodytxt='         Se webadresse: www.cavaler.no';

function sendpostIE() {
	window.location = "mailto:?SUBJECT="+(Subjecttxt)+"&BODY="+(Bodytxt);
	}
function sendpost() {
	window.location = "mailto:?SUBJECT="+escape(Subjecttxt)+"&BODY="+escape(Bodytxt);
	}