

// ======================================================================== //
// klass Application()													//
// ======================================================================== //


function sendToFlash(param1, param2) {
	thisMovie("index").receiveJavaScript(param1, param2);
}
	
function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName]
	} else {
		return document[movieName]
	}
}


// ======================================================================== //
// ms													//
// ======================================================================== //

function picpopup (pfad) {
	if (navigator.platform =="MacPPC") {
  	  macpopup(pfad);
	} else {
		  Bild1= new Image(); 
			Bild1.src=(pfad); 
			Control(pfad); 
	}
} 

function macpopup (Datei) {

	xsize=500; // Rand zum Fensterabstand horizintal 
	ysize=500; // Rand zum Fenster vertikal 
	
	
	ScreenWidth = screen.width; // Bildschirmeinstellung auslesen 
	ScreenHeight = screen.height; //Bildschrimeinstellung auslesen 
	
	xpos = (ScreenWidth/2)-(xsize/2); // Position des Fensters horizontal 
	ypos = (ScreenHeight/2)-(ysize/2); // Position des Fensters vertikal 
	
	
	
	
	string="width="+xsize+",height="+ysize+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,location=0,directories=0,status=0,menubar=0,toolbar=0"; 
	
	NewWindow=window.open("BILDANSICHT","Datei",string); 
	NewWindow.document.writeln ("<html><head><title>Musikschule Bad-Salzuflen</title>");
	NewWindow.document.writeln ("</head>"); 
	NewWindow.document.writeln ("<body bgcolor='#000000' topmargin='0' leftmargin='0' top='0' left='0' onload=focus()>"); 
	NewWindow.document.writeln ("<table width='100%' height='100%' cellspacing='0' cellpadding='0' border='0'><tr>"); 
	NewWindow.document.writeln ("<td align='center' valign='middle'>"); 
	NewWindow.document.writeln ("<img src='" + Datei + "'></td></tr></table></body></html>");
	NewWindow.document.close(); 


}


function Control(Datei){ 
	if((Bild1.width!=0)&&(Bild1.height!=0)){ 
		Anzeige(Datei); 
	} else{ 
		funzione="Control('"+Datei+"')"; 
		intervallo=setTimeout(funzione,20); 
	} 
} 

function Anzeige(Datei){ 


	xsize=Bild1.width+10; // Rand zum Fensterabstand horizintal 
	ysize=Bild1.height+29; // Rand zum Fenster vertikal 
	
	
	ScreenWidth = screen.width; // Bildschirmeinstellung auslesen 
	ScreenHeight = screen.height; //Bildschrimeinstellung auslesen 
	
	xpos = (ScreenWidth/2)-(xsize/2); // Position des Fensters horizontal 
	ypos = (ScreenHeight/2)-(ysize/2); // Position des Fensters vertikal 
	
	
	
	
	string="width="+xsize+",height="+ysize+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,location=0,directories=0,status=0,menubar=0,toolbar=0"; 
	
	NewWindow=window.open("BILDANSICHT","Datei",string); 
	NewWindow.document.write ("<html><head><title>Musikschule Bad-Salzuflen</title>");
	NewWindow.document.write("</head>"); 
	NewWindow.document.write ("<body bgcolor='#000000' topmargin='0' leftmargin='0' top='0' left='0' onload=focus()>"); 
	NewWindow.document.write ("<table width='100%' height='100%' cellspacing='0' cellpadding='0' border='0'><tr>"); 
	NewWindow.document.write ("<td align='center' valign='middle'>"); 
	NewWindow.document.write ("<img src='" + Datei + "'></td></tr></table></body></html>");
	NewWindow.document.close(); 
	NewWindow.resizeTo(xsize,ysize); 

} 
