	 
function position()
{
	var ua = navigator.userAgent.toLowerCase();
	var content_height=window.innerHeight-161;
	var content_wight=(window.innerWidth/2)-510;
	if (content_height<1) content_height=1;
	if (content_wight<2) content_wight=0;

	if (ua.indexOf('msie') != -1) {
	}
	else {
	document.getElementById('wrapper2').style.height=content_height+"px";
	document.getElementById('wrapper').style.left=content_wight+"px";
	document.getElementById('wrapper2').style.left=content_wight+"px";
	document.getElementById('wrapper3').style.left=content_wight+"px";
	document.getElementById('headspace').style.left=content_wight+"px";
	}
	timer=setTimeout("position()", 1);
	
}



var Jetzt = new Date(); 
var Tag = Jetzt.getDate();
var Wochentag = Jetzt.getDay();
Wochentagname = new Array ("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");
var Monat = Jetzt.getMonth(); 
Monatsname = new Array ("Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");

var Jahr = Jetzt.getYear();
var Stunden = Jetzt.getHours(); 
var Minuten = Jetzt.getMinutes();
var NachVoll = ((Minuten < 10) ? ":0" : ":");

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function printsite(){
	var strHref = window.location.href;
	if ( strHref.indexOf("?") > -1 ){
	var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();	
	window.open('print.php' + strQueryString,'','width=600,height=600');
	}
	else {
	window.open('print.php?id=8','','width=600,height=600');	
	}
}

function randpic() {
  var quotenumber = 6;
  var randomnumber = Math.random() ;
  var rand1 = Math.round( (quotenumber-1) * randomnumber) + 1 ;
  quotes = new Array
  quotes[1] = '<IMG SRC="/userfiles/bilder/wersonst_aurich.jpg" ALT="Thomas Aurich">';
  quotes[2] = '<IMG SRC="/userfiles/bilder/wersonst_kolonko.jpg" ALT="Martin Kolonko">';
  quotes[3] = '<IMG SRC="/userfiles/bilder/wersonst_beltle.jpg" ALT="Herbert Beltle">';
  quotes[4] = '<IMG SRC="/userfiles/bilder/wersonst_langhauser.jpg" ALT="Thomas Langhauser">';
  quotes[5] = '<IMG SRC="/userfiles/bilder/wersonst_strenger.jpg" ALT="Christoph Strenger">';
  quotes[6] = '<IMG SRC="/userfiles/bilder/wersonst_winkler.jpg" ALT="Heinz Winkler">';
  
  var quote = quotes[rand1];
  return quote;
}

function in_array(a_mVal, a_aArray)
{
    for (sIndex in a_aArray) {
        if (a_aArray[sIndex] == a_mVal) {
            return true;
        }
    }

    return false;
}

function generateNumbers()
{
	var space = 0;
    aUsed = new Array();

    for (i=0; i<3; i++) {
        do {
            iRndNum = Math.round(Math.random() * 14) + 1;
        } while (in_array(iRndNum, aUsed));
		space++;
		document.write('<IMG SRC="/images2/kopfbild' + iRndNum + '.jpg" width="154" height="120">');
		if(space != 3) document.write('<img src="images2/dehoga_space.gif" width="2" height="120">');
        //window.document.forms['LottoForm'].elements['num' + i].value = iRndNum;
        aUsed[aUsed.length] = iRndNum;
    }
}
