
function noerror() { return true; }

onerror = noerror;
	
window.defaultStatus = "jÖrGs waltari world";

self.name = "waltariworld";

function check() {
		if(parent.frames.length!=0)top.location='index.htm';
		}

function st(text) {
	status = "jÖrGs waltari world : " + text;
	}

function evangelicum() {
	evankeliumi = window.open("../evangelicum/index.htm","evangelicumwindow","width=640,height=480,left=0,top=0,location=no,menubar=no,resizable=yes,status=yes,toolbar=no");
	evankeliumi.focus;
	evankeliumi.defaultStatus = "waltari: evangelicum / evankeliumi";
	}
	
function openup(what) { 
	openwindow = window.open(what,"thewindow","width=800,height=600,location=no,menubar=no,resizable=yes,status=yes,toolbar=no");
	openwindow.focus;
	openwindow.defaultStatus = "j&Ouml;rGs waltari world";
	}

// snow start
var boe = 150;
var boemax = 300 + (Math.random()*250);
var no = 12; 	// Anzahl der Schneeflocken
var speed = 30; 	// "Schnei-Geschwindigkeit"; je kleiner die Zahl, um so schneller fallen die Flocken
var snowflake = "../images/snow7.gif"; 	// Bild der Schneeflocke, beliebig
// ***** Ab hier nichts mehr ändern! ********************
var ns4up = (document.layers) ? 1 : 0;	// Browser Tester
var ie4up = (document.all) ? 1 : 0;
var dx, xp, yp;							// Variablen für Koordinaten und Position
var am, stx, sty;						//Variablen für Amplitude und Schrittweite
var i, doc_width = 1200, doc_height = 800;
if (ns4up) {							// Bildschirm-Auflösung holen, Netscape-Funktion
var doc_width = self.innerWidth;
var doc_height = self.innerHeight;  }
// else if (ie4up) {						// Bildschirm-Auflösung holen, Internet Explorer-Funktion
// doc_width = document.body.clientWidth;
// doc_height = document.body.clientHeight;
// }
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
boex = new Array();
for (i = 0; i < no; ++ i) {
dx[i] = 0;                             // Koordinaten-Variable setzen
xp[i] = Math.random()*(doc_width-50);  // Position-Variable setzen
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;              // Amplituden-Variable setzten
stx[i] = 0.02 + Math.random()/10;      // Variable für Schrittweite setzen
sty[i] = 0.7 + Math.random();          // Variable für Schrittweite setzen
boex[i] = 0.5 + Math.random();         // Variable für Boe-Abweichung
// ----------------------------------------------------------------------
// Layer konfigurieren für Netscape
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
} else {
document.write("<layer name=\"dot"+ i +"\" left=\"15\" ");
document.write("top=\"15\" visibility=\"show\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></layer>");
}
// ----------------------------------------------------------------------
// Layer konfigurieren für Internet Explorer
} else if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
} else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><img src=\"");
document.write(snowflake + "\" border=\"0\"></div>");
}
}
}
// ----------------------------------------------------------------------
// Haupt-Animations-Funktion für Netscape
function snowNS() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-10) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
dx[i] += stx[i];

if (boe > 0 && boe < 64) { xp[i] +=12* boex[i]*Math.sin(boe/20); yp[i] += Math.random()*2;}
if (boe > 63 && boe < 126) { xp[i] +=2* boex[i]*Math.sin(boe/20);}

if (xp[i] > (doc_width-20)) xp[i] = 10;

document.layers["dot"+i].top = yp[i];
document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
}

boe = boe+1;
if (boe > boemax) 
	{
	boe = 0;
	boemax = 250 + (Math.random()*500);
	}

setTimeout("snowNS()", speed);
}
// ----------------------------------------------------------------------
// Haupt-Animations-Funktion für Internet Explorer
function snowIE() {
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height-20) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx[i] += stx[i];

if (boe > 0 && boe < 64) { xp[i] +=12* boex[i]*Math.sin(boe/20); yp[i] += Math.random()*2;}
if (boe > 63 && boe < 126) { xp[i] +=2* boex[i]*Math.sin(boe/20); }

if (xp[i] > (doc_width-20)) xp[i] = 10;

document.all["dot"+i].style.pixelTop = yp[i];
document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]);
}

boe = boe+1;
if (boe > boemax) 
	{
	boe = 0;
	boemax = 250 + (Math.random()*500);
	}

setTimeout("snowIE()", speed);
}

if (ns4up) {
	snowNS();
	} 
else if (ie4up) {
	snowIE();
	}

// snow end 

// Newsletter Adresse checken

function check(it) {
	var email=document.nform.email.value;
	var adresse=1;
	
	if (email!="") 
		{
		if (email.indexOf('@',0)==-1 || email.indexOf('.',0)==-1 || email.length<7) adresse=0; 
		}
	else adresse=0;

	if (adresse == 0) 
		{
		alert("'" + email + "' is not valid\nplease enter your email\n")
		return false;
		}
	else
		{
		alert("'" + email + "' is ok")
		return true;
	}

