var day       = new Array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
var month     = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September",
                          "Oktober", "November", "Dezember");

var navcolor  = new Array('#ffffff', '#4b618d');
var navstatus = new Array('Fotogalerie', 'Speisenkarte', 'Reservierungen', 'Anfahrt');
var navhref   = new Array("takes.phtml", "dokus.phtml", "message.phtml", "message.phtml");

var browser	  = new browsercheck();

// -------------------------------------------------------------------------------------------------------------					  

pic = new Array(new Array(new Image(), new Image()),
                new Array(new Image(), new Image()),
				new Array(new Image(), new Image()),
				new Array(new Image(), new Image()));

pic[0][0].src="images/pic01_of.jpg";	
pic[0][1].src="images/pic01_on.jpg";			

pic[1][0].src="images/pic02_of.jpg";	
pic[1][1].src="images/pic02_on.jpg";			

pic[2][0].src="images/pic03_of.jpg";	
pic[2][1].src="images/pic03_on.jpg";			

pic[3][0].src="images/pic04_of.jpg";	
pic[3][1].src="images/pic04_on.jpg";			

// -------------------------------------------------------------------------------------------------------------					  

function browsercheck() {
	this.ver=navigator.appVersion;
	this.agent=navigator.userAgent;
	this.dom=document.getElementById?1:0;
	this.opera5=this.agent.indexOf("Opera 5")>-1;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6;
	this.mac=this.agent.indexOf("Mac")>-1;
	this.ns6=(this.dom && parseInt(this.ver)>=5)?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.browser=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5);
	
	return this;
}

// -------------------------------------------------------------------------------------------------------------					  

function init() {
 window.resizeTo(840, 600);
 window.moveTo((screen.width-840)/2,(screen.height-600)/2);
}
					  
// -------------------------------------------------------------------------------------------------------------					  

function printdate() {
	var d = new Date();
	var dString = day[d.getDay()]+", ";
    
	d.getDate()<10?dString+="0"+d.getDate():dString+=d.getDate();
	dString+=". "+month[d.getMonth()]+" "+d.getYear();	
	
	document.write(dString);
}

function printdate_short() {
	var d = new Date();
	var dString = "";
    
	d.getDate()<10?dString+="0"+d.getDate():dString+=d.getDate();
	d.getMonth()<10?dString+=".0"+(d.getMonth()+1):dString+="."+(d.getMonth()+1);
	dString+="."+d.getYear();	
	
	document.write(dString);
}

function swapnav(img, no, visible) {
	img.src=pic[no][(visible?1:0)].src;
	status=(visible?navstatus[no]:"");
	
	var div="menu"+no;
	if(browser.dom) document.getElementById(div).style.color=navcolor[(visible?1:0)];
	else if(browser.ns4) document.layers[div].color=navcolor[(visible?1:0)];
	else if(browser.ie4) document.all[div].style.color=navcolor[(visible?1:0)];
}

// -------------------------------------------------------------------------------------------------------------					  

function showpic(file, height, width) {
	var win=open("showpic.phtml?file="+file, "foto", "left="+((screen.width-width)/2)+", top="+((screen.height-height)/2)+", height="+height+", width="+width+", menubar=no, resizable=no, scrollbars=no, status=no, toolbar=no");
}

// -------------------------------------------------------------------------------------------------------------					  


