/* ---------------------------------------------------------------
   FILENAME:	lib.js
   CLIENT:		KANYA AG · KanyaThek
   PROJECT:		Website JavaScript Library
   AUTHOR:		Urs Tobler  uto@bluewin.ch
   HISTORY:		2006-10-31	Initial Coding
   REVISION:	

   Copyright © 2006 Urs Tobler  uto@bluewin.ch
   --------------------------------------------------------------- */

if(top == self) sfc(decodeURI(window.location.pathname));

function sfc(p) {
	p = p.replace(/\\/g,"\/");
	if (p.indexOf("/inf/") != -1) {
		this.name = "inf/" + p.substr(p.lastIndexOf("\/") + 1);
		window.location.href = "../lndex.html";
	}
	else {
		this.name = p.substr(p.lastIndexOf("\/") + 1);
		window.location.href = "lndex.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));
	}
}

