//              JAVASCRIPT-FUNKTIONEN c2006 Nico Binder
//
//             	browser_erkennung()
//				is_flash()
//				start() + big_foto_anzeigen()
//				popUpWindow 2x
//				ele_ein(), ele_aus()
//				ersetzen()
//				dynamic_ein(), dynamic_aus()
//				changeHeightPlus(), changeHeightMinus(), reset_menu()
//				m_over, m_out. m_ouvr_sub, m_out_sub, mouse_over, mouse_out, element_change()
//				submit_form()
//             	zeiger_ein(id)
//             	zeiger_aus(id)
//             	schriftfarbe(ele, farbe)
//             	bild_neu(id, src)       tauscht foto aus
//             	openFotoWindow(foto, width, height)
//				changeBackground(id, foto)
//				bigFoto_aus()
//				png_alphaloader_ie()
//				alphaBackgrounds()
//				setOpac()
//				changeHeight()

//******************************************************************************************************

var aktiv = 1;
var browser = "";
var browser_version = "";
var browser_ver = "";		// nur temporär beinhaltet brow.+version

function browser_erkennung() {


      var name = navigator.appName;
      var vers = navigator.appVersion;
      var ua = navigator.userAgent;

      browser_ver = browser_();
//      alert(browser + ' - ' + browser_version + " :: " + browser_ver);



      function browser_() {
        if (ua.indexOf("Opera") != -1) {
          browser = "OP";
        } else if (name == "Konqueror") {
          browser = "KO";
        } else if ((name == "Netscape") && (ua.indexOf("Netscape") == -1) && (parseFloat(vers) >= 5)) {
          browser = "MO";
        } else if (name == "Netscape") {
          browser = "NN";
        } else if (name == "Microsoft Internet Explorer") {
          browser = "IE";
        } else {
          browser= "NB";
        }
        browser_version = eval("ver" + browser + "()");
        return browser + " " + browser_version;
      }

      function verOP() {
         if (name == "Opera") {
           return parseFloat(vers);
         } else if (name == "Netscape") {
           if (parseFloat(vers) < 5) {
             return "Opera als NN " + parseFloat(vers);
           } else {
             return "Opera als NN 6+";
           }
         } else {
           return "Opera als IE " + verIE();
         }
      }
      function verKO() {
         var pos = ua.indexOf("Konqueror/");
         var string = ua.substring(pos + 10, pos + 14);
         return parseFloat(string);
      }
      function verMO() {
         var pos = ua.indexOf("rv:");
         var string = ua.substring(pos + 3, pos + 7);
         return parseFloat(string);
      }
      function verNN() {
         if (parseFloat(vers) < 5) {
           return parseFloat(vers)
         } else if (ua.indexOf("Netscape/") != -1) {
           var pos = ua.indexOf("Netscape/");
           var string = ua.substring(pos + 9, pos + 13);
           return parseFloat(string);
         } else {
           var pos = ua.indexOf("Netscape");
           var string = ua.substring(pos + 8, pos + 12);
           return parseFloat(string);
         }
      }
      function verIE() {
         var pos = ua.indexOf("MSIE");
         var string = ua.substring(pos + 5, pos + 9);
         return parseFloat(string);
      }
      function verNB() {
         return parseFloat(vers);
      }
}


//******************************************************************************************************
//     FLASH Abfrage !!
//******************************************************************************************************
function is_flash(MM_contentVersion) {

		MM_FlashCanPlay = false;
		var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		if ( plugin ) {
			  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			     for (var i = 0; i < words.length; ++i)
			     {
			  if (isNaN(parseInt(words[i])))
			  continue;
			  var MM_PluginVersion = words[i];
			     }
			 var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
		}
		else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
		   && (navigator.appVersion.indexOf("Win") != -1)) {
			 document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
			 document.write('on error resume next \n');
			 document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
			 document.write('</SCR' + 'IPT\> \n');
		}
		return MM_FlashCanPlay;
}



//******************************************************************************************************
//     Funktionen zum Mouseover-BildGross anzeigen (bei thumbs)
//******************************************************************************************************

      var x_koo;
      var y_koo;
      var maus_x;
      var maus_y;
      var bigfoto;

      function start() {
            //alert(browser);
        if (document.captureEvents) {
          document.captureEvents(Event.MOUSEDOWN);
        }
       if (document.layers) {
          document.onmousedown = big_foto_anzeigen;
       // } else if (document.all) {              alert("gEBid");
       //   document.all.onmousedown = big_foto_anzeigen;
        } else if (document.getElementById) {
          document.onmousedown = big_foto_anzeigen;
        }
      }

      function big_foto_anzeigen(e) {
        if (browser != 'IE')
                var id = e.target.id + "big";
        else    var id = window.event.srcElement.id + "big";     //alert(window.event.srcElement.id);

        if (document.layers) {
          document.id.offX = e.pageX - document.id.pageX;
          document.id.offY = e.pageY - document.id.pageY;
        } else if (document.all) {
          maus_x = event.clientX;
          maus_y = event.clientY;
        } else if (document.getElementById) {
          maus_x = e.clientX;
          maus_y = e.clientY;
        }

        bigfoto = document.getElementById(id);
        if (bigfoto) {
            bigfoto.style.left = -200 + maus_x;
            bigfoto.style.top = -150 + maus_y;
            bigfoto.style.visibility = "visible";
        }

        if (document.captureEvents)
          document.captureEvents(Event.MOUSEUP);

        document.onmouseup = aufheben;

        return false;
      }


      function aufheben() {

        if (document.releaseEvents)
          document.releaseEvents(Event.MOUSEMOVE);

        if (bigfoto) bigfoto.style.visibility = "hidden";
        document.onmouseup = null;

        return false;
      }

        // Event Capturing
        //if ((isNav4) || (isW3C)) {
        //        document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
        //}

        //document.onmousedown = startDrag;
        //document.onmouseup = endDrag;
        //document.write("hallo");


//******************************************************************************************************
//      Styles ändern
//******************************************************************************************************
function change_style_class(id, css) {
		obj = document.getElementById(id);
        obj.className = css;
}


//******************************************************************************************************
//      PopUp Window
//******************************************************************************************************
var fenster;
function popupWindow_text(text, title,  width, height, left, top) {          // width=400, height=800, left=1200, top=400) {

  fenster = window.open('', title, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',screenX='+left+',screenY='+top+',top='+top+',left='+left);
  text = "<html><head><title></title><link href='styles_generated.css' rel='stylesheet' type='text/css'></head><body class='textarea'>" + text + "</body></html>";
  fenster.document.clear();
  fenster.document.write(text);
  fenster.document.close();
}

function popupWindow_url(url, width, height, left, top) {          // width=400, height=800, left=1200, top=400) {

  fenster = window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',screenX='+left+',screenY='+top+',top='+top+',left='+left);
  fenster.focus();
}

//******************************************************************************************************
//      element_visible/hidden
//******************************************************************************************************
var z_vorher = 0;
function ele_ein(id, dummy) {    //alert(id);
		id1 = 'sub' + id;
        obj = document.getElementById(id1);
        obj.style.visibility = "visible";
        if (obj.style.zIndex != 999)   z_vorher = obj.style.zIndex;
        obj.style.zIndex = 999;

//         id2 = 'table_' + id1;                      //alert(id2);
//         obj = document.getElementById(id2);
//         obj.style.borderCollapse = "collapse";

         //obj.className = 'submenu_collapse';
//		alert(obj.innerHTML);
}

function ele_aus(id) {

//		if (window.event) {			//Betrifft nur IE - ist für 5.5 / 6, um ele_aus zu verhindern, wenn nicht vom <div> des submenüs,
//									//	wegen falscher Bildarstellng des IE <7
//			e = window.event;
//
//			var target;
//		  	if (e.srcElement) {
//		    	// Microsoft-proprietär
//		    	target = e.srcElement;
////		    	alert(target);
//		  	}
//		}
////		alert(target.id + " - " +id);
//
		id1 = 'sub' + id;
//		img = 'img_menu' + id;
//		if (id1 == target.id || target.id == img )	{

		        obj = document.getElementById(id1);
		        obj.style.visibility = "hidden";
		        obj.style.zIndex = z_vorher;

//         id2 = 'table_' + id1;
//         obj = document.getElementById(id2);
//         obj.style.borderCollapse = "separate";

         //obj.className = 'submenu';

}


//******************************************************************************************************
//      Dynamisches Menü ausfahren: erzeugt nach <td id='menu(id)'> eine weiter Zelle und zeigt darin <div id='sub(id)'....> an
//******************************************************************************************************
var dynamic_ein_läuft = new Array();		// 0 = inaktiv, 1 = in arbeit, 2 = fertig
var dynamic_aus_läuft = new Array();
var menuID_aktiv = 0;
var intervalID_ein = new Array();
			for(var i=0; i < 100; i++) {
				intervalID_ein[i] = 0;
			}
var intervalID_aus = new Array();
			for(i=0; i < 100; i++) {
				intervalID_aus[i] = 0;
			}
var maxHeight = new Array();
			for(i=0; i < 100; i++) {
				maxHeight[i] = 0;
			}

function menu_check_aktiv() {  }

// Funkton für js-HTML-Ausgabe mittles .innerHTML: ersetzt < durch !
function ersetzen(text) {
         var reg = new RegExp("<");
         while (text.search(reg) != -1){
         	text = text.replace(reg, "!");
         }
         return text;
}


//******************************************************************************************************
//      Funktion dynamic_ein - fährt ein Submenü dynamisch nach unten aus: Geschwindigkeit durch speed (=pixel-steps & ms in setInterval());
//******************************************************************************************************
function dynamic_ein(id, speed) {    //alert(id);

		 var id_num = parseInt(id);
		 if (dynamic_ein_läuft[id_num] == 1)		return;
		 //if (dynamic_aus_läuft[id_num] == 1)		return;

		 dynamic_ein_läuft[id_num] = 1;
		 dynamic_aus_läuft[id_num] = 0;

		 clearInterval(intervalID_aus[id_num]);

		 id1 = 'sub' + id;
         subObj = document.getElementById(id1);
         if (!subObj)	return;
         var div_content = subObj.innerHTML;


         id0 = 'table_' + id1;
         tableObj = document.getElementById(id0);
         tableObj.style.borderCollapse = "collapse";
         maxHeight[id_num] = tableObj.offsetHeight;				//alert(maxHeight[id_num]);
         var width = tableObj.offsetWidth;

         id2 = 'menu' + id + '_dynamic';
         dynObj = document.getElementById(id2);
         if (!dynObj.innerHTML) {
         		if (menuID_aktiv != id_num) {
         			var m_over = 'dynamic_ein("' + id_num + '", 8); ';
         			var m_out = 'dynamic_aus("' + id_num + '"); ';
         		} else {
         			var m_over = '';
         			var m_out  = '';
         		}
         		dynObj.innerHTML = "<div id='menu_aktiv"+ id +"' onmouseover='"+ m_over + "'  onmouseout='"+ m_out + "' style='osition:absolute; left:10px; height:0px; idth:" + width + "px; overflow:hidden; '></div>";
         }

         div = document.getElementById('menu_aktiv'+id);
         if (!div.innerHTML) div.innerHTML = div_content; 			//div_content = ersetzen(div.innerHTML);
																	//popupWindow_text(div_content, '',  200, 200, 1400, 0)	;
         if (!div.style.height) div.style.height = '0px';

         document.getElementById(id1).innerHTML = "";


         intervalID_ein[id_num] = setInterval("changeHeightPlus("+ speed +", '"+ id +"')", 1);		//alert(id);
         //obj.className = 'submenu_collapse';
}


//******************************************************************************************************
//      Funktion dynamic_ein - fährt ein Submenü dynamisch nach ein: Geschwindigkeit durch pixel-steps & ms in setInterval());
//******************************************************************************************************
function dynamic_aus(id) {
		 var obj = document.getElementById('menu_aktiv' + id);
		 var id_num = parseInt(id);

		 if (dynamic_aus_läuft[id_num] == 1)		return;
		 if (dynamic_ein_läuft[id_num] == 1)		{

		 		clearInterval(intervalID_aus[id_num]);
				//obj.style.height = maxHeight[id_num] + "px";
		 		return;
		 }
		 dynamic_aus_läuft[id_num] = 1;

         intervalID_aus[id_num] = setInterval("changeHeightMinus(8, '"+ id +"')", 20);
}


//******************************************************************************************************
//      Funktion changeHeightPlus/Minus werden - wird durch setInterval ständig aufgerufen bis 0 oder maxHeight erreicht -> clearInterval()
//******************************************************************************************************
function changeHeightPlus(x, id) {
	var obj = document.getElementById('menu_aktiv' + id);
	var id_num = parseInt(id);


	if (obj) {
		var height = parseInt(obj.style.height);
		height += x;								//if (height < 5)  alert(id);
		obj.style.height = height + "px";

		// wenn ganz ausgefahren...
	if (height > maxHeight[id_num]) {
			clearInterval(intervalID_ein[id_num]);
			//intervalID_ein[id_num] = 0;
			dynamic_ein_läuft[id_num] = 2;
			obj.style.height = maxHeight[id_num] + "px";

			// Ausgabe
			var text = "id= " + id + " &nbsp;&nbsp;  maxHeight: " + maxHeight[id_num] + " &nbsp;&nbsp;  Height: " + obj.style.height
					+ " <br> dyn_ein: " + dynamic_ein_läuft + " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  dyn_aus: " + dynamic_aus_läuft;
			var text2 = " <br> ID_ein: " + intervalID_ein + " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ID_aus: " + intervalID_aus;
//					for(i=0; i < intervalID.length; i++) {
//						text2 += " "+ i+ " " + intervalID[i];
//					}

			var text3 = "<br><br>"; //+ ersetzen(dynObj.innerHTML);
//			aus = document.getElementById('ausgabe');
//			aus.innerHTML = text + text2 + text3;
		}
	}
}

function changeHeightMinus(x, id) {
	var obj = document.getElementById('menu_aktiv' + id);
	var id_num = parseInt(id);


	if (obj) {
		var height = parseInt(obj.style.height);
		height -= x;								//if (height < 5)  alert(id);
		if (height < 0)		height = 0;		//alert(height);
		obj.style.height = height + "px";


		// wenn ganz auf 0...
		if (height < 7) {
			clearInterval(intervalID_aus[id_num]);
			//intervalID_aus[id_num] = 0;
			dynamic_aus_läuft[id_num] = 2;
			height = 0;
			obj.style.height = "0px";


			id1 = 'sub' + id;
         	subObj = document.getElementById(id1);
         	if (!subObj)	return;

			id2 = 'menu' + id + '_dynamic';
			menu_dyn = document.getElementById(id2);

			div = document.getElementById('menu_aktiv'+id);

			var div_content = div.innerHTML;
			menu_dyn.innerHTML = "";
			subObj.innerHTML = div_content;

			//alert(dynamic_ein_läuft + dynamic_aus_läuft);

			// Ausgabe
			var text = "id= " + id + " &nbsp;&nbsp;  maxHeight: " + maxHeight[id_num] + " &nbsp;&nbsp;  Height: " + obj.style.height
					+ " <br> dyn_ein: " + dynamic_ein_läuft + " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  dyn_aus: " + dynamic_aus_läuft;
			var text2 = " <br> ID_ein: " + intervalID_ein + " &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  ID_aus: " + intervalID_aus;
//					for(i=0; i < intervalID.length; i++) {
//						text2 += " "+ i+ " " + intervalID[i];
//					}

			var text3 = "<br><br>"; //+ ersetzen(dynObj.innerHTML);
//			aus = document.getElementById('ausgabe2');
//			aus.innerHTML = text + text2 + text3;

//			id2 = 'menu' + id + '_dynamic';
//        	obj2 = document.getElementById(id2);
//        	obj2.innerHTML = "";
	         id0 = 'table_sub' + id;                      //alert(id2);
         	obj0 = document.getElementById(id0);
         	//obj0.style.borderCollapse = "collapse";
		}
	}
}


function reset_menu() {
	for(i=0; i < intervalID_ein.length; i++) {
		if (intervalID_ein[i]) clearInterval(intervalID_ein[i]);
//		id2 = 'menu' + i.toString() + '_dynamic';
//        obj2 = document.getElementById(id2);
//        if (obj2)	obj2.innerHTML = "";
	}

	dynamic_ein_läuft = new Array();
	dynamic_aus_läuft = new Array();
	intervalID_ein = new Array();
	intervalID_aus = new Array();
			for(var i=0; i < 100; i++) {
				intervalID_ein[i] = 0;
				intervalID_aus[i] = 0;
			}
	maxHeight = new Array();
			for(i=0; i < 100; i++) {
				maxHeight[i] = 0;
			}
}





//******************************************************************************************************
//     Mouseover-funktionen (für jedes Projekt eventl. verschieden !!!!!    getrennt für Haupt/Submenüs/allgemeine
//******************************************************************************************************
var menucolor = "";
var backgroundcolor = "";

        // hauptmenu
function m_over(id) {    //alert(id);
         zeiger_ein(id);
         obj = document.getElementById(id);
         obj.className = "menu_over";
}
        // hauptmenu
function m_out(id) {
         zeiger_aus(id);
         obj = document.getElementById(id);
         obj.className = "menu";
}
       // submenu...
function m_over_sub(id) {    //alert(id);
         zeiger_ein(id);
         obj = document.getElementById(id);
         obj.className = "submenu_over";
}
       // submenu...
function m_out_sub(id) {
         zeiger_aus(id);
         obj = document.getElementById(id);
         obj.className = "submenu";
}

function mouse_over(id, classname) {    //alert(id);
         zeiger_ein(id);
         obj = document.getElementById(id);
         obj.className = classname;
}

function mouse_out(id, classname) {
         zeiger_aus(id);
         obj = document.getElementById(id);
         obj.className = classname;
}

function element_change(id, pic_over) {

		obj = document.getElementById(id);
		if (pic_over == 'check')	{

			var arVersion = navigator.appVersion.split("MSIE");
			var version = parseFloat(arVersion[1]);

			if (browser == "IE" && (browser_version >= 5.5 && browser_version < 7) && document.body.filters && obj.style.filter) {
				var filter = obj.style.filter;
//				alert(filter);
				var teile = filter.split("'");
//				alert(teile[1]);
				src = teile[1];
			} else {
				src = obj.src;
			}
			aktiv = src.substring(src.length-6, src.length-4);
			li = aktiv.substring(0,1);
			re = aktiv.substring(1,2);
//			alert(li + " + " + re);
			if (li == "a")		neu = "n";
			else				neu = "a";
			bild_n = src.substring(0, src.length-7) + "_" + neu + re + src.substring(src.length-4, src.length);
//			alert(bild_n);
			bild_neu(id, bild_n);

		} else {
			 bild_neu(id, pic_over);
		}
}

//******************************************************************************************************
//     RTE-Funktion: wird in <form> als onSumbmit() eingefügt !!!!!!
//******************************************************************************************************
function submitForm() {
        //make sure hidden and iframe values are in sync for all rtes before submitting form
        updateRTEs();

        return true;
}




//******************************************************************************************************
//       Pointer ein/aus
//******************************************************************************************************
function zeiger_ein(id) {
        ele = document.getElementById(id);
        ele.style.cursor = "pointer";
}

function zeiger_aus(id) {
        ele = document.getElementById(id);
        ele.style.cursor = "default";
}

//******************************************************************************************************
//           Schriftfarbe wechseln
//******************************************************************************************************
function schriftfarbe(ele, farbe) {
         var obj = document.getElementById(ele);
         obj.style.color = farbe;
         //obj.style.fontWeight = style;
}


//******************************************************************************************************
//         bild_neu
//******************************************************************************************************
function bild_neu(id, src) {

		var endung = src.substring(src.length-3, src.length);
		var arVersion = navigator.appVersion.split("MSIE");
		var version = parseFloat(arVersion[1]);

		if (browser == "IE" && (browser_version >= 5.5 && browser_version < 7) && document.body.filters && endung.toUpperCase() == "PNG") {
				var obj = document.getElementById(id);
				obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + src + "\', sizingMethod='image')";
//				alert(endung.toUpperCase());
		} else {
			foto = document.getElementById(id);
        	foto.src = src;
		}

		// Testen
//		obj = document.getElementById('sub0');
//		if (id == 'img_menu7')  alert(obj.innerHTML);
}

function openFotoWindow(foto, width, height) {

}

function changeBackground(id, foto) {
		ele = document.getElementById(id);
		ele.style.backgroundImage = "url("+ foto +")";
}

function changeBackgroundColor(id, color) {
		ele = document.getElementById(id);
		ele.style.backgroundColor = color;
}

function bigfoto_aus(id) {
         id1 = 'sub' + id;
         obj = document.getElementById(id1);
}






/*******************************************************************************************
//
//		Funktion für Darstellung von transparenten pngs für IE >= 5.5
//
********************************************************************************************/
function  png_alphaloader_ie() {

		if (!(browser == "IE" && (browser_version >= 5.5 && browser_version < 7))) {
//			alert("return: png_alhaloader_ie()");
			return;
		}

		var namen = "";
		var arVersion = navigator.appVersion.split("MSIE");
		var version = parseFloat(arVersion[1]);

		if ((browser_version >= 5.5 && browser_version < 7) && (document.body.filters))
		{
//			alert("alphaLoader");
			for(var i=0; i<document.images.length; i++)
			{
		      var img = document.images[i];
		      var imgName = img.src.toUpperCase();
		      namen += img.src + "\n";
		      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		      {

		      	 var imgID = (img.id) ? "id='" + img.id + "' name='" + img.id + "' " : "";
		         var imgClass = (img.className) ? "class='" + img.className + "' " : "";
		         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
		         var imgStyle = "display:inline-block;" + img.style.cssText;
		         if (img.align == "left") imgStyle = "float:left;" + imgStyle;
		         if (img.align == "right") imgStyle = "float:right;" + imgStyle;
		         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
		         var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + "1" + "px; height:" + "1" + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>";
		         img.outerHTML = strNewHTML;
		         i = i-1;
//		         alert(strNewHTML);
		      }
		   }
//		   alert(namen);
		}
}


function alphaBackgrounds(){

	if (!(browser == "IE" && (browser_version >= 5.5 && browser_version < 7))) {
//		alert("return: alphaBackgrounds()");
		return;
	}

   var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
   var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
   for (i=0; i<document.all.length; i++){
      var bg = document.all[i].currentStyle.backgroundImage;
      if (itsAllGood && bg){
         if (bg.match(/\.png/i) != null){
            var mypng = bg.substring(5,bg.length-2);
            document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
            document.all[i].style.backgroundImage = "url('/mambots/system/bot_ultimatepngfix/x.gif')";
         }
      }
   }
}

/*******************************************************************************************
//
//		setOpac :  Transparenz mit ID setzen
//
********************************************************************************************/
function setOpac(id, opac) {

			var foto_small = document.getElementById(id);
			if (browser == 'IE') {

				if (foto_small.style.filter.alpha) {
					foto_small.style.filter.alpha.opacity = opac;
				} else {
					foto_small.style.filter = "Alpha(opacity=" + opac + ")";
				}

			} else {

				foto_small.style.opacity = opac/100;
				foto_small.style.mozOpacity= opac/100;
			}
}


/*******************************************************************************************
//
//		changeHeight:  Transparenz mit ID setzen
//
********************************************************************************************/
function changeHeight(id, delta) {
//			funktioniert so nicht.........................................!!!!!!
			var elem = document.getElementById(id);

			if (browser != "IE") {
				var computedStyle = window.getComputedStyle(elem, "");
				var height = parseInt(computedStyle.getPropertyValue("height"));
				height += delta;
				elem.style.overflow = "none";
				elem.style.width = height + "px";
			} else {
				var height = elem.currentStyle.height;
			}
			alert(height);
}