/* ---------------------------------------------------------------
   FILENAME:	lib.js
   CLIENT:		Rolf Aeschlimann - Möbelagentur
   PROJECT:		Standard JavaScript Library
   AUTHOR:		Urs Tobler  uto@bluewin.ch
   HISTORY:		2007-07-24	Initial Coding
   REVISION:	

   Copyright © 2007 Urs Tobler  uto@bluewin.ch
   --------------------------------------------------------------- */

if(top == self) sfc(decodeURI(window.location.pathname));

function sfc(p) {
	this.name = p;
	window.location.href = "/lndex.html";
}

function ClrTab() {
	for(var i=1; i<=9; i++) {
		parent.document.getElementById('ml'+i).className='menn';
		parent.document.getElementById('ml'+i).style.display='none';
	}
}

function SelTab() {
	ClrTab();
	parent.document.getElementById('ml'+SelTab.arguments[0]).className='mens';
	parent.document.getElementById('ml'+SelTab.arguments[0]).style.display='inline';
	for(var i=1; i<SelTab.arguments.length; i++) {
		parent.document.getElementById('ml'+SelTab.arguments[i]).className='menn';
		parent.document.getElementById('ml'+SelTab.arguments[i]).style.display='inline';
	}
}

function PopCat(c) {
	var w = screen.availWidth;
	var h = screen.availHeight
	var x = (Math.floor(0.75 * w) > 1280) ? 1280 : Math.floor(0.9 * w);
	var y = (Math.floor(0.85 * h) > 800) ? 800 : Math.floor(0.9 * h);
	popwin = window.open(c,"cat","scrollbars=1,menubar=0,location=0,titlebar=0,toolbar=0,status=0,resizable=0,width=" + x + ",height=" + y + ",left=" + Math.ceil((w-x)/2) + ",top=" + Math.ceil((h-y)/2));
}

