
/*menu*/

// Some variables
var base= "images/m_"
var nrm = new Array();
var omo = new Array();
var stuff = new Array('home','bistro','terrasse','catering','lage','links','aktuell');
var loaded = (!(navigator.userAgent.indexOf('Netscape6')+1));
var ocl = new Array();
var select = -1;
var name2 = "";
var temp = 0;

// Pre-load part.
if (document.images)
{ for (i=0;i<stuff.length;i++)
    {nrm[i] = new Image;
    nrm[i].src = base + stuff[i] + ".gif"
    omo[i] = new Image;
    omo[i].src = base + stuff[i] + "-a.gif";
	ocl[i] = new Image;
	ocl[i].src = base + stuff[i] + "-a.gif"; }
}

// The functions: first mouseover, then mouseout
function over(no)
{	if (document.images && select != no && loaded)
    { document.images[stuff[no]].src = omo[no].src }
}

function out(no)
{	if (document.images && select != no && loaded)
    { document.images[stuff[no]].src = nrm[no].src }
}

function clic(no)
{ if (document.images && loaded)
	{ document.images[stuff[no]].src = ocl[no].src
	temp = select;
	select = no;
	if (temp != -1) {out(temp)} }
}



/* galerie */

function img_gallery(img_id){

xpos=100;
ypos=100;
width=10;
height=20;

if (xpos == -1 && ypos == -1) {
	xcenter=(screen.width/2)-(width/2);
	ycenter=(screen.height/2)-(height/2);
	window.open("popup-galerie.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xcenter+",top="+ycenter+"")
}
else {
	window.open("popup-galerie.asp?img="+img_id,1,"toolbar=no,location=no,directories=no,scrollbars=no,status=no,menubar=no,resizable=no,width=50,height=50,left="+xpos+",top="+ypos+"")
}
}

/* bilder popup */

function OpenNewWindow(Picture,Breit,Hoch)
{
xsize = Breit+60;// Zusatz f&uuml;r Rand rechts und links
ysize = Hoch+100; //Zusatz f&uuml;r Rand oben und unten - damit Button angezeit werden kann 
    
ScreenWidth = screen.width;
ScreenHeight = screen.height;

xpos = (ScreenWidth/3)-(xsize/3);
ypos = (ScreenHeight/3)-(ysize/3);
	
NewWindow=window.open("","Picture","height="+ysize+",width="+xsize+",scrollbars=no,resizable=no,top="+ypos+",left="+xpos+"");
NewWindow.document.write ("<html><head><title>Bistro Steinhalle - Bern");
NewWindow.document.write ("</title><link rel='stylesheet' type='text/css' href='steinhalle.css'></head>");
NewWindow.document.write ("<body bgcolor='#A1BBE4' topmargin='0' leftmargin='0' marginheight='0' marginwidth='0' bodymargin='0'>");
NewWindow.document.write ("<table align='center'><tr>");
NewWindow.document.write ("<td colspan='2' align='center' valign='top'>");
NewWindow.document.write ("<table border='0' cellpadding='0' cellspacing='0'><tr><td align='center'>");
NewWindow.document.write ("&nbsp;<br><img src=");
NewWindow.document.write (Picture);
NewWindow.document.write (">");
NewWindow.document.write ("</tr></td></table>");
NewWindow.document.write ("</td></tr><tr>");
NewWindow.document.write ("<td><a href='javascript:window.print()' class='gal'>drucken</a></td>");
NewWindow.document.write ("<td align='right'><a href='javascript:top.window.close()' class='gal'>schliessen</a></td>");
NewWindow.document.write ("</tr></table>");
NewWindow.document.write ("</body></html>");
NewWindow.document.close();
}

