function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Copyright (C) 2003 by PowWeb.de");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

/*
Tetris Game
*/

var myimages=new Array()
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

preloadimages("tetris/block0.gif","tetris/block1.gif","tetris/block2.gif","tetris/block3.gif",
"block4.gif","tetris/block5.gif","tetris/block6.gif","tetris/blockb.gif","tetris/powli_start.gif")

function goTetris() {
  if (document.layers) {
    window.open("http://www.powweb.de/POW-LI/tetris/tetrisNN.html", "Tetris", "width=360,height=400,resizable,titlebar=1,top=100,left=250,x=0,y=0");
  }
  else if (document.all) {
    window.open("http://www.powweb.de/POW-LI/tetris/tetrisIE.html", "Tetris", "width=360,height=400,resizable,titlebar=1,top=100,left=250,x=0,y=0");
  }
  else {
    alert("Sie benötigen IE 4+ oder NS 4 um Tetris zu spielen!");
  }
}
/*****************************************
* LCD Clock 
*****************************************/

var alternate=0
var standardbrowser=!document.all&&!document.getElementById

if (standardbrowser)
document.write('<form name="tick"><input type="text" name="tock" size="6"></form>')

function show(){
if (!standardbrowser)
var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var newday = new Date();
var the_day = newday.getDate();
var this_day = newday.getDay()+1;
var the_month = newday.getMonth()+1;
var the_year = newday.getYear();
if (the_month == 1){my_month = "Jan"};
if (the_month == 2){my_month = "Feb"};
if (the_month == 3){my_month = "Mär"};
if (the_month == 4){my_month = "Apr"};
if (the_month == 5){my_month = "Mai"};
if (the_month == 6){my_month = "Jun"};
if (the_month == 7){my_month = "Jul"};
if (the_month == 8){my_month = "Aug"};
if (the_month == 9){my_month = "Sep"};
if (the_month == 10){my_month = "Okt"};
if (the_month == 11){my_month = "Nov"};
if (the_month == 12){my_month = "Dez"};
if (the_year <= 1000){the_year = the_year + 1900};
if (the_day <= 31){the_day = " " + the_day};
if (the_year >= 2000){no_year = the_year - 2000}
else{
no_year = the_year - 1900}
if (no_year<=9)
no_year="0"+no_year;
var no_month=the_month;
if (the_month<=9)
no_month="0"+the_month;
var no_day=the_day
if (the_day<=9)
no_day="0"+the_day
if (seconds<=9)
seconds="0"+seconds
var mydate = new Date();
var akt_day = mydate.getDay();
if (akt_day == 0){dday = "So"};
if (akt_day == 1){dday = "Mo"};
if (akt_day == 2){dday = "Di"};
if (akt_day == 3){dday = "Mi"};
if (akt_day == 4){dday = "Do"};
if (akt_day == 5){dday = "Fr"};
if (akt_day == 6){dday = "Sa"};
if (akt_day == 7){dday = "So"};
var dn = dday
if (hours.toString().length==1)
hours="0"+hours
if (minutes<=9)
minutes="0"+minutes

var cdate="<div id='micro' style='Z-INDEX: 20; LEFT: 357px; VISIBILITY: visible; WIDTH: 65px; POSITION: absolute; TOP: 15px; HEIGHT: 20px'><a class='pw' href='http://www.powweb.de' target='_blank'>© POWWEB.DE</a></div>";
if (document.all)
document.all.micro.innerHTML=cdate
else if (document.getElementById)
document.getElementById("micro").innerHTML=cdate
else
document.write(cdate)

if (standardbrowser){
if (alternate==0)
document.tick.tock.value=hours+":"+minutes+":"+seconds;

else
document.tick.tock.value=hours+" "+minutes+" "+seconds;
}
else{
if (alternate==0)
clockobj.innerHTML=hours+"<font color='#00FFFF'>:</font>"+minutes+" "+"<span style='font-family:Arial; font-size:10px; font-weight: bold;'>"+seconds+"</span>";
else
clockobj.innerHTML=hours+"<font color='black'>:</font>"+minutes+" "+"<span style='font-family:Arial; font-size:10px; font-weight: bold;'>"+seconds+"</span>";


}
alternate=(alternate==0)? 1 : 0
setTimeout("show()",1000)

}
window.onload=show

document.onmouseover = doOver;
document.onmouseout  = doOut;
document.onmousedown = doDown;
document.onmouseup   = doUp;
function doOver() {
	var toEl = getReal(window.event.toElement, "className", "buttons");
	var fromEl = getReal(window.event.fromElement, "className", "buttons");
	if (toEl == fromEl) return;
	var el = toEl;
	
//	alert(el);
	
//	var cDisabled = el.getAttribute("cDisabled");
	var cDisabled = el.cDisabled;
//	alert(cDisabled);
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	if (el.className == "buttons")
		el.onselectstart = new Function("return false");
	
	if ((el.className == "buttons") && !cDisabled) {
		makeRaised(el);
		makeGray(el,false);
	}
}

function doOut() {
	var toEl = getReal(window.event.toElement, "className", "buttons");
	var fromEl = getReal(window.event.fromElement, "className", "buttons");
	if (toEl == fromEl) return;
	var el = fromEl;

//	var cDisabled = el.getAttribute("cDisabled");
	var cDisabled = el.cDisabled;
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present

	var cToggle = el.cToggle;
	toggle_disabled = (cToggle != null); // If CTOGGLE atribute is present

	if (cToggle && el.value) {
		makePressed(el);
		makeGray(el,true);
	}
	else if ((el.className == "buttons") && !cDisabled) {
		makeFlat(el);
		makeGray(el,true);
	}

}

function doDown() {
	el = getReal(window.event.srcElement, "className", "buttons");
	
	var cDisabled = el.cDisabled;
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	if ((el.className == "buttons") && !cDisabled) {
		makePressed(el)
	}
}

function doUp() {
	el = getReal(window.event.srcElement, "className", "buttons");
	
	var cDisabled = el.cDisabled;
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	if ((el.className == "buttons") && !cDisabled) {
		makeRaised(el);
	}
}


function getReal(el, type, value) {
	temp = el;
	while ((temp != null) && (temp.tagName != "BODY")) {
		if (eval("temp." + type) == value) {
			el = temp;
			return el;
		}
		temp = temp.parentElement;
	}
	return el;
}

function findChildren(el, type, value) {
	var children = el.children;
	var tmp = new Array();
	var j=0;
	
	for (var i=0; i<children.length; i++) {
		if (eval("children[i]." + type + "==\"" + value + "\"")) {
			tmp[tmp.length] = children[i];
		}
		tmp = tmp.concat(findChildren(children[i], type, value));
	}
	
	return tmp;
}

function disable(el) {

	if (document.readyState != "complete") {
		window.setTimeout("disable(" + el.id + ")", 100);	// If document not finished rendered try later.
		return;
	}
	
	var cDisabled = el.cDisabled;
	
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present

	if (!cDisabled) {
		el.cDisabled = true;
		
		el.innerHTML = '<span class="input2" style="background: buttonshadow; width: 100%; height: 100%; text-align: center;">' +
						'<span class="input2" style="filter:Mask(Color=\'#F8F8F8\') DropShadow(Color=buttonhighlight, OffX=1, OffY=1, Positive=0); height: 100%; width: 100%%; text-align: center;">' +
						el.innerHTML +
						'</span>' +
						'</span>';

		if (el.onclick != null) {
			el.cDisabled_onclick = el.onclick;
			el.onclick = null;
		}
	}
}

function enable(el) {
	var cDisabled = el.cDisabled;
	
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	if (cDisabled) {
		el.cDisabled = null;
		el.innerHTML = el.children[0].children[0].innerHTML;

		if (el.cDisabled_onclick != null) {
			el.onclick = el.cDisabled_onclick;
			el.cDisabled_onclick = null;
		}
	}
}

function addToggle(el) {
	var cDisabled = el.cDisabled;
	
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	var cToggle = el.cToggle;
	
	cToggle = (cToggle != null); // If CTOGGLE atribute is present

	if (!cToggle && !cDisabled) {
		el.cToggle = true;
		
		if (el.value == null)
			el.value = 0;		// Start as not pressed down
		
		if (el.onclick != null)
			el.cToggle_onclick = el.onclick;	// Backup the onclick
		else 
			el.cToggle_onclick = "";

		el.onclick = new Function("toggle(" + el.id +"); " + el.id + ".cToggle_onclick();");
	}
}

function removeToggle(el) {
	var cDisabled = el.cDisabled;
	
	cDisabled = (cDisabled != null); // If CDISABLED atribute is present
	
	var cToggle = el.cToggle;
	
	cToggle = (cToggle != null); // If CTOGGLE atribute is present
	
	if (cToggle && !cDisabled) {
		el.cToggle = null;

		if (el.value) {
			toggle(el);
		}

		makeFlat(el);
		
		if (el.cToggle_onclick != null) {
			el.onclick = el.cToggle_onclick;
			el.cToggle_onclick = null;
		}
	}
}

function toggle(el) {
	el.value = !el.value;
	
	if (el.value)
		//el.style.background = "URL(/images/tileback.gif)";
		el.style.background = "http://www.dynamicdrive.com/images/tileback.gif";
	else
		el.style.backgroundImage = "";

//	doOut(el);	
}


function makeFlat(el) {
	with (el.style) {
		background = "";
		border = "1px solid buttonface";
		padding      = "0px";
	}
}

function makeRaised(el) {
	with (el.style) {
	    background = "#F8F8F8";
		borderLeft   = "1px solid buttonhighlight";
		borderRight  = "1px solid buttonshadow";
		borderTop    = "1px solid buttonhighlight";
		borderBottom = "1px solid buttonshadow";
		padding      = "0px";
	}
}

function makePressed(el) {
	with (el.style) {
	    background = "#ffaaaa";
		borderLeft   = "1px solid buttonshadow";
		borderRight  = "1px solid buttonhighlight";
		borderTop    = "1px solid buttonshadow";
		borderBottom = "1px solid buttonhighlight";
		paddingTop    = "0px";
		paddingLeft   = "0px";
		paddingBottom = "0px";
		paddingRight  = "0px";
	}
}

function makeGray(el,b) {
	var filtval;
	
	if (b)
		filtval = "gray()";
	else
		filtval = "";

	var imgs = findChildren(el, "tagName", "IMG");
		
	for (var i=0; i<imgs.length; i++) {
		imgs[i].style.filter = filtval;
	}

}
	

document.write("<style>");
document.write(".buttonLeiste	{background: \'#F8F8F8\';border-top: 1px solid buttonhighlight;	border-left: 1px solid buttonhighlight;	border-bottom: 1px solid buttonshadow; border-right: 1px solid buttonshadow; padding: 0px; font: menu;}");
document.write(".buttons {border: 1px solid white; padding: 0px; text-align: center; cursor: default;}");
document.write(".buttons IMG	{filter: gray();}");
document.write("</style>");

function openIT(u,W,H,X,Y,n,b,x,m,r,tH,tW,wB,wBs,wBG,wBGs) {
	var cU  ='http://www.powweb.de/chromless-window/close.gif'   //gif for close on normal state.
	var cO  ='http://www.powweb.de/chromless-window/close.gif'  //gif for close on mouseover.
	var cL  ='http://www.powweb.de/chromless-window/clock.gif'      //gif for loading indicator.
	var mU  ='http://www.powweb.de/chromless-window/minimize.gif'     //gif for minimize to taskbar on normal state.
	var mO  ='http://www.powweb.de/chromless-window/minimize.gif'    //gif for minimize to taskbar on mouseover.
	var xU  ='http://www.powweb.de/chromless-window/max.gif'     //gif for maximize normal state.
	var xO  ='http://www.powweb.de/chromless-window/max.gif'    //gif for maximize on mouseover.
	var rU  ='http://www.powweb.de/chromless-window/restore.gif'     //gif for minimize on normal state.
	var rO  ='http://www.powweb.de/chromless-window/restore.gif'    //gif for minimize on mouseover.
	//var tH  ="<font face=verdana color='#FFFFFF'><span style='font-size: 11px'>POWLI's Nachrichtenticker</span></font>"   //title for the title bar in html format.
	//var tW  ="POWLI's Nachrichtenticker"   //title for the task bar of Windows.
	//var wB  ='#0000FF'   //Border color.
	//var wBs ='#FF0000'   //Border color on window drag.
	//var wBG ='#0000FF'   //Background of the title bar.
	//var wBGs='#0000FF'   //Background of the title bar on window drag.
	var wNS ='toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0'  //Html parameters for Netscape.
	var fSO ='scrolling=auto noresize'   //Html parameters for main content frame.
	var brd =b||0;   //Extra border size.
	var max =x||false;   //Maxzimize option (true|false).
	var min =m||false;   //Minimize to taskbar option (true|false).
	var res =r||false;   //Resizable window (true|false).
	var tsz =19;   //Height of title bar.
	return chromeless(u,n,W,H,X,Y,cU,cO,cL,mU,mO,xU,xO,rU,rO,tH,tW,wB,wBs,wBG,wBGs,wNS,fSO,brd,max,min,res,tsz)
}


function drucken()
{
window.print();
}
function suche()
{
win = window.open("http://www.powweb.de/POW-LI/suche.html","powli_win","width=355,height=220,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function ip()
{
win = window.open("http://www.powweb.de/POW-LI/ip.php","powli_win1","width=355,height=360,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function rechner()
{
win = window.open("http://www.powweb.de/POW-LI/rechner.html","powli_win2","width=355,height=400,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function rechner2()
{
win = window.open("http://www.powweb.de/POW-LI/rechner2.html","powli_win3","width=355,height=365,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function kalender()
{
win = window.open("http://www.powweb.de/POW-LI/kalender.html","powli_win4","width=355,height=395,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function help()
{
win = window.open("http://www.powweb.de/POW-LI/help.html","powli_win5","width=355,height=469,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function ecard()
{
win = window.open("http://www.powweb.de/cgi-bin/powli-ecard/epostkarten.cgi","powli_win6","width=715,height=580,scrollbars=yes,resizable=yes,top=100,left=150,x=0,y=0");
}
function nachrichten()
{
mywin001=openIT('http://www.powweb.de/POW-LI/nachrichtenticker.html',460,140,window.innerWidth-450,40,'mywin001',0,false,false,false,'<font face=verdana color=\'#FFFFFF\'><span style=\'font-size: 11px\'>POWLI\'s Nachrichtenticker</span></font>','POWLI\'s Nachrichtenticker','#0000FF','#FF0000','#0000FF','#0000FF');
}
function lotto()
{
win = window.open("http://www.powweb.de/POW-LI/lotto_generator.html","powli_win6","width=355,height=275,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function empfehlen()
{
win = window.open("empfehlen.html","powli_win7","width=355,height=431,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}
function webmastermail()
{
win = window.open("mail.html","powli_win8","width=355,height=361,scrollbars=no,resizable=yes,top=100,left=150,x=0,y=0");
}