/* JavaScripts fuer Porgy & Bess Website

   © A.G. WebDesign */ 



<!--

//Netscape resizeFix

if (document.layers) {

origWidth = innerWidth;

origHeight = innerHeight;}

function reDo() {

if (innerWidth != origWidth || innerHeight != origHeight)

location.reload();}

if (document.layers) onresize = reDo;

//Netscape resizeFix end



//MouseOver-Out Aktionen



function statusOver(x)

{

message = new Array(21);

message[0] = "Porgy & Bess ";
message[1] = "News - Neuigkeiten";
message[2] = "Programms & Tickets";
message[3] = "Tickets - Reservierungen";
message[4] = "MemberCard";
message[5] = "History - Geschichte";
message[6] = "Sponsors - Sponsoren";
message[7] = "The Club - Services";
message[8] = "Contact - Kontakt - Wie Sie uns erreichen";
message[9] = "eMail us - eMails an uns";
message[10] = "Lageplan";
message[11] = "Bocaccio ";
message[12] = "Uhu ";
message[13] = "Kunstspiele Pan ";
message[14] = "Wiener blauer Vogel ";
message[15] = "Rondell ";
message[16] = "Varieté und Theater ";
message[17] = "Jazz ";
message[18] = "Kino ";
message[19] = "next - weiter";
message[20] = "back - zurück";

window.status = message[x];
}

//MouseOver-Out Aktionen Ende 

//card - Layers tauschen bei MouseOver/Out

function card(z)  
{     
     n = new Array(5);
  n[0] = " ";
  n[1] = "TEXT1";
  n[2] = "TEXT2";
  n[3] = "TEXT3";
  n[4] = "TEXT4";

  if (navigator.appName == 'Netscape' && document.layers != null) 
       {
	   if (z != 0)
	     {
		for (i = 1; i < 5; i++)
		  {
            document.layers[n[i]].visibility = 'hide';
		  }
          document.layers[n[z]].visibility = 'show'; 
          } 
        else if (z == 0){
           for (z = 1; z < 5; z++)
			{
            	document.layers[n[z]].visibility = 'hide';
			}
        }  } 

	 else if (document.all != null )  //IE
	  {
	   if (z != 0)
	     {
		for (i = 1; i < 5; i++)
		  {
            document.all[n[i]].style.visibility = 'hidden';
		  }
          document.all[n[z]].style.visibility = 'visible';   
          } 
        else if (z == 0)
          {
           for (z = 1; z < 5; z++)
			{
            	document.all[n[z]].style.visibility = 'hidden';
			}
          } 
	  } 
	  
	  else if (document.getElementById) {// IE 5.x, NS 6.x
	  if (z != 0)
	     {
		for (i = 1; i < 5; i++)
		  {
            document.getElementById(n[i]).style.visibility = 'hidden';
		  }
          document.getElementById(n[z]).style.visibility = 'visible'; 
          } 
        else if (z == 0){
           for (z = 1; z < 5; z++)
			{
            	document.getElementById(n[z]).style.visibility = 'hidden';
			}
        }
	  }
}

// Ende card



//Script Ueberpruefung der Formulareingaben

function CheckForm() {  

if(document.RESE.NAME.value == "")

  {

  alert("Bitte geben Sie Ihren Namen ein!");

  document.RESE.NAME.focus();

  return false;

  }

if(document.RESE.eMAIL.value.indexOf('@') == -1)

  {

  alert("Bitte geben Sie unbedingt Ihre eMail-Adresse ein!");

  document.RESE.eMAIL.focus();

  return false;

  }

if(document.RESE.CONCERT.value == "")

  {

  alert("Bitte geben Sie unbedingt den Titel der Veranstaltung ein!");

  document.RESE.CONCERT.focus();

  return false;

  }

  

//if(document.RESE.DAY.options[0].selected == true)
if (document.RESE.DAY.value == "-")
  {

  alert("Sie haben vergessen den Tag auszuwählen!");

  document.RESE.DAY.focus();

  return false;

  }

// if(document.RESE.MONTH.options[0].selected == true)

//  {

//  alert("Bitte auch das MONAT eingeben!");

//  document.RESE.MONTH.focus();

//  return false;

//  }

if(document.RESE.NUMBER.selectedIndex == 0)

	{

	alert("Bitte geben Sie die Zahl der Personen ein!");

	document.RESE.NUMBER.focus();

	return false;

	} 

}



// Neue Fenster oeffnen

function auf(f)

{

window.open(f, "INFO", "status=yes,scrollbars=yes,menubar=yes,toolbar=yes," +

"resizable=yes,width=680,height=420,top=100,left=100");

}

function hist(h)

{

window.open("hist-" + h + ".html", "INFO", "status=no,scrollbars=yes,menubar=no,toolbar=no," +

"resizable=yes,width=550,height=480,top=120,left=200");

}



function plan()

{

window.open("plan.html", "INFO", "status=no,scrollbars=no,menubar=no,toolbar=no," +

"resizable=yes,width=440,height=380,top=100,left=100");

}

function kaufen(id,lang)
{
   k = window.open("kauf-01.php?id="+id+"&lang="+lang,"kaufen","width=620,height=600,status=yes");
   k.focus();
   
}

// Bildfenster oeffnen
function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {

// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 2.1.8

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){	
	  byFactor = w / imageWidth;			
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
 	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}

	var agt=navigator.userAgent.toLowerCase(); 
	var is_opera = (agt.indexOf("opera") != -1); 

	if (is_opera == true){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {

	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+'height='+imageHeight+' alt="Click screen to close" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}

// Ende neue Fenster

