// Clock script

var isn1=null;

var isn2=false;

today=new Date();



function stopit(){

 if(isn2){

  clearTimeout(isn1);

  }

 isn2 = false;

 }

 

function startit(){

 stopit();

 isnclock();

 }

function isnclock(){

 var now=new Date();
 var hrs=now.getHours();
 var min=now.getMinutes();
 var sec=now.getSeconds();
 document.clckh.disp.value=""+((hrs>12) ? hrs-12 : hrs); 
 document.clckm.disp.value=((min<10) ? "0" : "")+min;
 document.clcks.disp.value=((sec<10) ? "0" : "")+sec;
 document.clck.disp.value=(hrs>=12) ? "p.m." : "a.m.";
 isn1=setTimeout("isnclock()",1000);
 isn2=true;
 }

// Build an array initializer



function isnArray() {
 for (var i=0;i<isnArray.arguments.length;i++) {
  this[i+1] = isnArray.arguments[i];
  }
 }


// And months and day arrays



var isnMonths=new isnArray("Januar","Februar","M&auml;rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
var isnDays= new isnArray("Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag");
isnDays[0]="Sunday";

// fixes a Netscape 2 and 3 bug

function getFullYear(d) { // d is a date object
 yr = d.getYear();
 if (yr < 1000)
  yr+=1900;
 return yr;
}




// Print window

var gAutoPrint = true; // Flag for whether or not to automatically call the print function

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HE>\n<BODY>\n';
		
		var printReadyElem = document.getElementById("printReady");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the printReady section in the HTML");
			return;
		}
			
		html += '\n</BO>\n</HT>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print ready feature is only available in modern browsers.");
	}
}
