/* ---------------------------------------------------------------
   FILENAME:	lib.js
   CLIENT:		Vereinigung Nordostschweizerischer Marktorte (VNOSM)
   PROJECT:		JavaScript Library - Standard
   AUTHOR:		Urs Tobler  uto@bluewin.ch
   HISTORY:		2007-02-29	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(i=1; i<=4; i++) {
		document.getElementById('tl'+i).className='tabn';
		document.getElementById('tp'+i).style.display='none';
	}
}

function SelTab(id) {
	ClrTab();
	document.getElementById('tl'+id).className='tabs';
	document.getElementById('tp'+id).style.display='block';
}

function Mai(p,g) {
	parent.name = p + "|" + g;
	window.location.href = "../vnosm/mail.html";
}

var popwin = null;
function PopWin(x){
	if (popwin) {
		if(!popwin.closed) popwin.close();
	}
	if (document.all) {
		popwin = window.open(x,"PopUpWin","dependent=1,scrollbars=1,width=" + parent.document.body.clientWidth*.7 + ",height=" + parent.document.body.clientHeight*.7 + ",left=" + ((parent.document.body.clientWidth*.15)+parent.screenLeft) + ",top=" + ((parent.document.body.clientHeight*.15)+parent.screenTop));
	}
	else if (window.innerWidth) {
		popwin = window.open(x,"PopUpWin","dependent=1,scrollbars=1,width=" + parent.window.innerWidth*.7 + ",height=" + parent.window.innerHeight*.7 + ",left=" + ((parent.window.innerWidth*.15)+parent.screenX) + ",top=" + ((parent.window.innerHeight*.3)+parent.screenY));
	}
}

