/*
JavaScript für jede seite von tinus page
*/	


  function loading(win) {
  	//alert(win.scrollbars); //.statusbar.visible);
  	//window.scrollbarss.visible = true;
	//self.scrollbars.visible = false;
  }
  
  function showPic(picName, breite, hoehe) {
  	//alert(picName);
  	window.open('bilder/' + picName, "bild_window", "status=false,menubar=false,resizable=false,locationbar=false,width=" + breite + ",height=" + hoehe);
  }
  
    function showMp3(mp3Name, breite, hoehe, text) {
  	//alert(mp3Name);
  	var mp3 = 'download/mp3/' + mp3Name;
  	var mp3Fenster = window.open( "", "mp3Fenster", "status=false,menubar=false,resizable=false,locationbar=false,width=" + breite + ",height=" + hoehe);
 	mp3Fenster.document.open(); 	
//	mp3Fenster.document.write("<!doctype html public '-//W3C/DTD HTML 4.0/EN'>");
//	mp3Fenster.document.write("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' >");
	mp3Fenster.document.write("<HTML>");
	mp3Fenster.document.write("<HEAD>");
	mp3Fenster.document.write("<style type='text/css'>");
	mp3Fenster.document.write("<!--");
    mp3Fenster.document.write(".mp3Titel {font-family: Arial, Helvetica, sans-serif; font-size:14px; margin-bottom:4px;}");
	mp3Fenster.document.write(".mp3Panel {font-family: Arial, Helvetica, sans-serif; font-size:11px; margin-top:4px;}");
	mp3Fenster.document.write("-->");
	mp3Fenster.document.write("</style>");
	mp3Fenster.document.write("<TITLE>" + mp3Name + "</TITLE></HEAD>");
	mp3Fenster.document.write("<body>");
	mp3Fenster.document.write("<br>");
	mp3Fenster.document.write("<CENTER>");
	mp3Fenster.document.write("<div class='mp3Titel'>wird gespielt: " + mp3Name + "<br>");
	mp3Fenster.document.write("</div>");
	mp3Fenster.document.write("<OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='200' HEIGHT='20' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'>");
	mp3Fenster.document.write("<PARAM NAME='controller' VALUE='TRUE'>");
	mp3Fenster.document.write("<PARAM NAME='type' VALUE='video/quicktime'>");
	mp3Fenster.document.write("<PARAM NAME='autoplay' VALUE='true'>");
	mp3Fenster.document.write("<PARAM NAME='target' VALUE='QuickTimePlayer'>");
	mp3Fenster.document.write("<PARAM NAME='src' VALUE=" + mp3 + ">");
	mp3Fenster.document.write("<PARAM NAME='pluginspage' VALUE='http://www.apple.com/quicktime/download/indext.html'>");
	mp3Fenster.document.write("<EMBED CONTROLLER='TRUE' WIDTH='200' HEIGHT='20' TARGET='QuickTimePlayer' SRC=" + mp3 + " type='video/quicktime' BGCOLOR='#FFFFFF' BORDER='0' PLUGINSPAGE='http://www.apple.com/quicktime/download/indext.html'></EMBED></OBJECT>");
	mp3Fenster.document.write("<br>");
    mp3Fenster.document.write("<div class='mp3Panel'>" + text + "</div>");
	mp3Fenster.document.write("</CENTER>");
	mp3Fenster.document.write("</body>");
	mp3Fenster.document.write("</HTML>");
    mp3Fenster.document.close();
  }
    
    function showVideo(VideoName, breite, hoehe, text) {
	//alert(VideoName);
  	var Video = 'videos/' + VideoName;
  	var VideoFenster = window.open( "", "VideoFenster", "status=false,menubar=false,resizable=false,locationbar=false,width=" + breite + ",height=" + hoehe);
 	VideoFenster.document.open(); 	
//	VideoFenster.document.write("<!doctype html public '-//W3C/DTD HTML 4.0/EN'>");
//	VideoFenster.document.write("<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' >");
	VideoFenster.document.write("<HTML>");
	VideoFenster.document.write("<HEAD>");
	VideoFenster.document.write("<style type='text/css'>");
	VideoFenster.document.write("<!--");
    VideoFenster.document.write(".VideoTitel {font-family: Arial, Helvetica, sans-serif; font-size:14px; margin-bottom:4px;}");
	VideoFenster.document.write(".VideoPanel {font-family: Arial, Helvetica, sans-serif; font-size:11px; margin-top:4px;}");
	VideoFenster.document.write("-->");
	VideoFenster.document.write("</style>");
	VideoFenster.document.write("<TITLE>" + VideoName + "</TITLE></HEAD>");
	VideoFenster.document.write("<body>");
	VideoFenster.document.write("<br>");
	VideoFenster.document.write("<CENTER>");
	VideoFenster.document.write("<div class='VideoTitel'>wird gespielt: " + VideoName + "<br>");
	VideoFenster.document.write("</div>");
	VideoFenster.document.write("<OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='320' HEIGHT='270' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'>");
	VideoFenster.document.write("<PARAM NAME='controller' VALUE='TRUE'>");
	VideoFenster.document.write("<PARAM NAME='type' VALUE='video/quicktime'>");
	VideoFenster.document.write("<PARAM NAME='autoplay' VALUE='true'>");
	VideoFenster.document.write("<PARAM NAME='target' VALUE='QuickTimePlayer'>");
	VideoFenster.document.write("<PARAM NAME='src' VALUE=" + Video + ">");
	VideoFenster.document.write("<PARAM NAME='pluginspage' VALUE='http://www.apple.com/quicktime/download/indext.html'>");
	VideoFenster.document.write("<EMBED CONTROLLER='TRUE' WIDTH='320' HEIGHT='270' TARGET='QuickTimePlayer' SRC=" + Video + " type='video/quicktime' BGCOLOR='#FFFFFF' BORDER='0' PLUGINSPAGE='http://www.apple.com/quicktime/download/indext.html'></EMBED></OBJECT>");
	VideoFenster.document.write("<br>");
    VideoFenster.document.write("<div class='VideoPanel'>" + text + "</div>");
	VideoFenster.document.write("</CENTER>");
	VideoFenster.document.write("</body>");
	VideoFenster.document.write("</HTML>");
    VideoFenster.document.close();
  }
/* lade die möglichen Bilder in das array */
/*  		var aImg = new Array(
  			"titelbild1.jpg", 
  			"titelbild2.jpg", 
  			"titelbild3.jpg",
			"titelbild4.jpg",
			"titelbild5.jpg",
			"titelbild6.jpg",
			"titelbild7.jpg",
			"titelbild8.jpg",
			"titelbild9.jpg",
			"titelbild10.jpg",
			"titelbild11.jpg",
			"titelbild12.jpg",
  			"titelbild13.jpg"
  		);
  		
	  var subPath = "layout_bilder/titelbilder/";
  		
  	  function getImgSrc() {
  	    // hole per zufallsgenerator einen index im range
  	    // die zahl ist zwischen 0 und 1 und muss multipliziert werden, danach gerundet
  	    var index_multi;
  	    index_multi = Math.round(Math.random() * 100);
  	    
  	    // per modulo wird nun der entsprechende index im array definieren
  	    var index = Math.round(index_multi%aImg.length);
		
		//alert(aImg[index]);
  	      	   
  	    document.images["img_change"].src = subPath + aImg[index];
  	  }
