<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->

document.write('<script language="VBScript" type="text/vbscript"\> \n');
document.write('// Visual basic helper required to detect Flash Player ActiveX control version information\n');
document.write('Function VBGetSwfVer(i)\n');
document.write('  on error resume next\n');
document.write('  Dim swControl, swVersion\n');
document.write('  swVersion = 0\n');
document.write('  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('  if (IsObject(swControl)) then\n');
document.write('    swVersion = swControl.GetVariable("$version")\n');
document.write('  end if\n');
document.write('  VBGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('//\n ');
document.write('</script\>');

<!-- // Detect Client Browser type

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// Cant detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
};

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision){

 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// loop backwards through the versions until we find the newest version	
	
	for (i=25;i>0;i--) {	
		
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
			
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		
		
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
};

// Version check based upon the values entered above in "Globals"
var fl = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

function mf(f,x,w,h,bg,e) {
	var specialchar = new Array('À','&reg;','&amp;','&AMP;','ä','&auml;','&AUML;','ö','&ouml;','&OUML;','ü','&uuml;','&UUML;','Ä','Ö','Ü','ß','á','à','â','ã','é','è','ê','ú','ù','û','ó','ò','ô','í','ì','î');
	var specialcharutf8 = new Array('%C3%80','%C2%AE','%26','%26','%C3%A4','%C3%A4','%C3%A4','%C3%B6','%C3%B6','%C3%B6','%C3%BC','%C3%BC','%C3%BC','%C3%84','%C3%96','%C3%9C','%C3%9F','%C3%A0','%C3%A1','%C3%A2','%C3%A9','%C3%A8','%C3%AA','%C3%BA','%C3%B9','%C3%BB','%C3%B3','%C3%B2','%C3%B4','%C3%AD','%C3%AC','%C3%AE');
/*	for (iii=0;iii<specialchar.length;iii++){
		x = x.replace(specialchar[iii], specialcharutf8[iii]);
	}
*/
	for (iii=0;iii<specialchar.length;iii++){
		x = x.split(specialchar[iii]).join(specialcharutf8[iii]);
	}


	//alert(x);
	var flashsrc = "";
	flashsrc+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
	flashsrc+='codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'">';
	flashsrc+='<param name="movie" value="'+f+'?'+x+'"><param name="bgcolor" value="'+bg+'"><param name="quality" value="high"><param name="scale" value="noscale"><param name="wmode" value="transparent">';	
	flashsrc+='<embed src="'+f+'?'+x+'" quality="high" scale="noscale" width="'+w+'" height="'+h+'" bgcolor="'+bg+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" />';
	flashsrc+='</object>';
	
	return flashsrc;
	
};

function Calender(obref, lang){
	var self = this;
	this.obref = obref;
	this.day_names_l = new Array();
	this.month_names_l = new Array();
	this.day_names_l['de'] = new Array('Mo','Di','Mi','Do','Fr','Sa','So');
	this.month_names_l['de'] = new Array('Jänner','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember');
	this.day_names_l['en'] = new Array('Mo','Tu','We','Th','Fr','Sa','Su');
	this.month_names_l['en'] = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
	this.day_names_l['fr'] = new Array('Lu','Ma','Me','Je','Ve','Sa','Di');
	this.month_names_l['fr'] = new Array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre');
	this.day_names_l['it'] = new Array('Lu','Ma','Me','Gi','Ve','Sa','Do');
	this.month_names_l['it'] = new Array('gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre');
	this.day_names = this.day_names_l[lang];
	this.month_names = this.month_names_l[lang];
	this.days = new Array();
	/**
	 * @projectDescription initialisiert den Kalender und befüllt den Container mit HTML-Code
	 */
	this.init = function(){
		html_output = '<div class="jsc_head"><a class="jsc_back" href="javascript:void(0);">&laquo;</a><h4></h4><a class="jsc_next" href="javascript:void(0);">&raquo;</a></div>\n';
		html_output += '<div class="jsc_body">\n';
		for(i=0;i<7;i++){
			html_output += '<span>' + self.day_names[i] + '</span>\n';
		}
		zw=0;
		for(i=0;i<41;i++){
			zw++;
			if(zw==6 || zw==7){
				html_output += '<a href="javascript:void(0);" class="jsc_special"></a>\n';
			}
			else{
				html_output += '<a href="javascript:void(0);"></a>\n';
			}
			if(zw==7){
				zw=0;
			}
		}
		html_output += '<a class="jsc_close" href="javascript:void(0);">x</a>\n';
		html_output += '</div>';
		self.obref.innerHTML = html_output;
		self.obref.getElementsByTagName('a')[self.obref.getElementsByTagName('a').length-1].onclick = function(){
			self.hide();
		};
		self.obref.getElementsByTagName('a')[0].onclick = function(){
			if(self.akt_month>1){
				self.setDate(self.akt_month-1, self.akt_year);
			}
			else{
				self.setDate(12, self.akt_year-1);
			}
		};
		self.obref.getElementsByTagName('a')[1].onclick = function(){
			if(self.akt_month<12){
				self.setDate(self.akt_month+1, self.akt_year);
			}
			else{
				self.setDate(1, self.akt_year+1);
			}
		};
		for(i=2;i<43;i++){
			self.obref.getElementsByTagName('a')[i].onclick = function(){
				self.itemOnClick(this);
			};
		}
		zw = new Date();
	};
	/**
	 * @projectDescription blendet den Kalender ein
	 */
	this.show = function(){
		self.obref.style.display = 'block';
	};
	/**
	 * @projectDescription blendet den Kalender aus
	 */
	this.hide = function(){
		self.obref.style.display = 'none';	
	};
	/**
	 * @projectDescription setzt Monat und Jahr
	 */
	this.setDate = function(month, year){
		self.akt_month = month;
		self.akt_year = year;
		blankdays = new Date(year,month-1,1).getDay();
		blankdays += -1;
		if(blankdays<0){
			blankdays=6;
		}
		for(i=27;month-1==new Date(year,month-1,i).getMonth();i++){
			maxdays = i;
		}
		for(i=0;i<blankdays+1;i++){
			self.days[i] = '';
		}
		for(i=i-1;i<maxdays+blankdays;i++){
			self.days[i] = i-blankdays+1;
		}
		for(;i<41;i++){
			self.days[i] = '';
		}
		self.aktualHTML();
	};
	/**
	 * @projectDescription aktualisiert den HTML-Code des Kalenders
	 */
	this.aktualHTML = function(){
		self.obref.getElementsByTagName('h4')[0].innerHTML = self.month_names[self.akt_month-1] + ' ' + self.akt_year;
		for(i=0;i<self.days.length;i++){
			self.obref.getElementsByTagName('a')[i+2].innerHTML = self.days[i];
			self.obref.getElementsByTagName('a')[i+2].className = self.obref.getElementsByTagName('a')[i+2].className.replace(/jsc_blank/gi, '');
			if(self.days[i]==""){
				self.obref.getElementsByTagName('a')[i+2].className += " jsc_blank";
			}
		}
	};
	/**
	 * @projectDescription wird aufgerufen wenn ein Item ausgewält wird
	 * @param {Object} obj
	 */
	this.itemOnClick = function(obj){
		if(obj.innerHTML!=''){
			self.callBackFunction(obj.innerHTML*1,self.akt_month,self.akt_year);
		}
	};
	this.hide();
	this.init();
	self.setDate(zw.getMonth()+1,zw.getFullYear());
};

function headreplacement(h,c){
	if (document.getElementById(c)){
		if (document.getElementById(c).getElementsByTagName(h)){
			var hh = document.getElementById(c).getElementsByTagName(h);

			for (var i=0; i<hh.length; i=i) {
				var r = hh[i].innerHTML;
		
				if ((h=="h1" && c=="left") || (h=="h1" && c=="hotellistwrap")){hhh=46;www=530;r = r.toUpperCase();
					if (typeof(h1width) != "undefined") { 
						www = h1width;
					}				
				}
				else if (h=="h1" && c=="package"){hhh=46;www=200;r = r.toUpperCase();}
				else if (h=="h1" && c=="partner"){hhh=46;www=200;r = r.toUpperCase();}
				else if (h=="h1" && c=="numeroverde"){hhh=25;www=170;r = r.toLowerCase(); h = "numeroverde"; t="06802A";}
				else if (h=="h1" && c=="idealeper"){hhh=46;www=160;r = r.toUpperCase();}
				else if (h=="h2" && c=="hotelcontact"){hhh=15;www=119; h = "numeroverde"; t="ffffff";}
				else if (h=="h1" && c=="nlbox"){hhh=25;www=159;r = r.toUpperCase();t="000000";}
				

				//alert(c+""+h);
				
				if (h=="dt"){hhh=35;www=190;}
				if (h=="h3"){hhh=17;www=170;}
				
				if (typeof(t) == "undefined") {t="000000";} 
				

				var src = mf("/flash/head_"+h+".swf","txt="+r+"&txtcolor="+t,www,hhh,"ffffff");
				
				
				
				if (h=="dt"){
					var e = document.createElement('dt');
					e.innerHTML = src;
					hh[i].parentNode.replaceChild(e,hh[i]);
					i++;	
				} else {				
					var e = document.createElement('span');
					e.className = "flash_h1";
					e.innerHTML = src;		
					hh[i].parentNode.replaceChild(e,hh[i]);
				}
			}
		}
	}
};
function sh(id,a){
	if (document.getElementById(id)){
		document.getElementById(id).style.display=a;
	}
};
function switchtabs(url,wrapper,bt_id){
	getsrc(url,wrapper);
	if (document.getElementById("switch_hotels")){
		document.getElementById("switch_hotels").className="";
	}
	if (document.getElementById("switch_packages")){
		document.getElementById("switch_packages").className="";
	}
	if (document.getElementById(bt_id)){
		document.getElementById(bt_id).className="active";
	}
	

};
function showshop(hotel_id){
	if (document.getElementById("bt_richiesta").className==""){
		document.getElementById("anfragewrap").innerHTML='<a href="javascript:void(0);" onclick="javascript:showshop();return false;" id="anfrageclose" class="close_bt">X</a><iframe src="/shop/?hotel_id='+hotel_id+'&cc=1" id="shopform" frameborder="0" border="0" ></iframe>';
		sh('anfragewrap','block');
		sh('map24','none');
		document.getElementById("bt_richiesta").className="active";
	} else {
		document.getElementById("anfragewrap").innerHTML="";
		sh('anfragewrap','none');
		sh('map24','block');
		document.getElementById("bt_richiesta").className="";
	}
	
	return false;
};
function showanfrage(hotel_id){
	if (document.getElementById("bt_richiesta").className==""){
		//getsrc('/anfrage/?hotel_id='+hotel_id+'&cc=1','anfragewrap');
		
                document.getElementById("anfragewrap").innerHTML='<a href="javascript:void(0);" onclick="javascript:showanfrage();return false;" id="anfrageclose" class="close_bt">X</a><iframe src="/anfrage/?hotel_id='+hotel_id+'&cc=1" id="anfrageform" frameborder="0" border="0"></iframe>';

                sh('anfragewrap','block');
		sh('map24','none');
		document.getElementById("bt_richiesta").className="active";
	} else {
		document.getElementById("anfragewrap").innerHTML="";
		sh('anfragewrap','none');
		sh('map24','block');
		document.getElementById("bt_richiesta").className="";
	}
	
	return false;
};
function showpackageanfrage(package_id){
	if (document.getElementById("bt_richiesta_package").className==""){
		//getsrc('/anfrage/?package_id='+package_id+'&cc=1','packageanfragewrap');
		document.getElementById("packageanfragewrap").innerHTML='<a href="javascript:void(0);" onclick="javascript:showpackageanfrage();return false;" id="anfrageclose" class="close_bt">X</a><iframe src="/packages/?nextsite=buchen&id='+package_id+'&nohf=1" id="packageanfrageform" frameborder="0" border="0" ></iframe>';
		sh('packageanfragewrap','block');
		document.getElementById("bt_richiesta_package").className="active";
	} else {
		document.getElementById("packageanfragewrap").innerHTML="";
		sh('packageanfragewrap','none');
		document.getElementById("bt_richiesta_package").className="";
	}
	
	return false;
};
function showgallery(hotelid){
	sh("flashgallery","block");
//	var src = mf("/flash/gallery.swf?hotelid="+hotelid,"",740,350,"ffffff");
//	src+='<a href="javascript:void(0);" onclick="javascript:hidegallery()" class="closegallery">x <strong>vicina finestra</strong> </a>';
//	document.getElementById("flashgallery").innerHTML=src;
	
//	<script type="text/javascript">draw_flash("/flash/gallery.swf?hotelid=<?=$t{hotel}{id}?>", 740, 350, "", "#ffffff", "");</script>
	
	//getsrc('/flashgallery.php?hotel_id=<?=$t{hotel}{id}?>','flashgallery');
	if (document.getElementById("hotellink_gallery")){
		document.getElementById("hotellink_gallery").className="active";
	}
};
function hidegallery(){
	sh("flashgallery","none");
//	document.getElementById("flashgallery").innerHTML="";
	//document.getElementById("flashgallery").innerHTML="";
	if (document.getElementById("hotellink_gallery")){
		document.getElementById("hotellink_gallery").className="";
	}
};
function draw_flash(pfad, width, height, wmode, bgcolor, alt){
	if(fl){
		params = false;
		if(pfad.indexOf("?") != -1){
			params = pfad.split("?")[1];
			pfad = pfad.split("?")[0];
		}
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" name="flash" width="' + width + '" height="' + height + '" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		if(wmode!=""){document.write('<param name="wmode" value="' + wmode + '" />');}
		if(bgcolor!=""){document.write('<param name="bgcolor" value="' + bgcolor + '" />');}
		if(params){document.write('<param name="flashvars" value="' + params + '" />');}
		document.write('<param name="movie" value="' + pfad + '" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="' + pfad + '" width="' + width + '" height="' + height + '"');
		if(wmode!=""){document.write(' wmode="' + wmode + '"');}
		if(bgcolor!=""){document.write(' bgcolor="' + bgcolor + '"');}
		if(params){document.write(' flashvars="' + params + '"');}
		document.write(' align="middle" quality="high" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flash" />');
		document.write('</object>');
	}
	else{
		document.write(alt);
	}
};


/******************* COOKIES **/
/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure) {
	document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toGMTString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
	
//	alert(value);
};
/**
 * Gets the value of the specified cookie.
 *
 * name  Name of the desired cookie.
 *
 * Returns a string containing value of specified cookie,
 *   or null if cookie does not exist.
 */
function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
};

/**
 * Deletes the specified cookie.
 *
 * name      name of the cookie
 * [path]    path of the cookie (must be same as path used to create cookie)
 * [domain]  domain of the cookie (must be same as domain used to create cookie)
 */
function deleteCookie(name, path, domain) {
    if (getCookie(name)) {
        document.cookie = name + "=" +
            ((path) ? "; path=" + path : "") +
            ((domain) ? "; domain=" + domain : "") +
            "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
};

/******************* AJAX - FUCTIONS */
//object detection to return the correct object depending upon broswer type. Used by the getAXHA(); function.
function getNewHttpObject() {
    var objType = false;
    try {
        objType = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        try {
            objType = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e) {
            objType = new XMLHttpRequest();
        }
    }
    return objType;
};

//Function used to update page content with new xhtml fragments by using a javascript object, the dom, and http.
function getsrc(url,elementContainer){
		document.getElementById(elementContainer).innerHTML = '<div class="loading" style="height:'+(document.getElementById(elementContainer).offsetHeight-10)+'px; width:'+(document.getElementById(elementContainer).offsetWidth)+'px;"></div>' + document.getElementById(elementContainer).innerHTML;
		var theHttpRequest = getNewHttpObject();
		//alert(url);
		// "/(.*?)\/hotels\/(.*?)/"
		if (!url.match(/(.*?)\/hotels\/(.*?)/) || url.match(/(.*?)fulltext(.*?)/)){

		} else {
			setCookie("getsrc",url);
		}
		
		
		theHttpRequest.onreadystatechange = function() {processAXAH(elementContainer);};
		theHttpRequest.open("GET", url);
		theHttpRequest.send(false);
	
		function processAXAH(elementContainer){
		   if (theHttpRequest.readyState == 4) {
			   if (theHttpRequest.status == 200) {
				   document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
			   } else {
				   document.getElementById(elementContainer).innerHTML="<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>";
			   }
		   }
		};
};

function expandcontent(cid){
	if (document.getElementById){
		for(i=1; i<=10; i++){
			if (i<=cid){
				document.getElementById("childage"+i).style.display="block";
			} else {
				document.getElementById("childage"+i).style.display="none";
				document.getElementById("age"+i).value="0";
			}
		}
	}
};
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
};
window.onload = externalLinks;




//////////////////// GetElementByClassName

function getElementsByClassName(oElm, strTagName, oClassNames){
    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    var arrRegExpClassNames = new Array();
    if(typeof oClassNames == "object"){
        for(var i=0; i<oClassNames.length; i++){
            arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
        }
    }
    else{
        arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
    }
    var oElement;
    var bMatchesAll;
    for(var j=0; j<arrElements.length; j++){
        oElement = arrElements[j];
        bMatchesAll = true;
        for(var k=0; k<arrRegExpClassNames.length; k++){
            if(!arrRegExpClassNames[k].test(oElement.className)){
                bMatchesAll = false;
                break;                      
            }
        }
        if(bMatchesAll){
            arrReturnElements.push(oElement);
        }
    }
    return (arrReturnElements);
};

//////////////////// IE - HOVER

function iehover(id,classname){
	if (document.getElementById(id)){
		if (getElementsByClassName(document.getElementById(id),"div",classname)){
			var classes = getElementsByClassName(document.getElementById(id),"div",classname);
			for (var i=0; i<classes.length; i++) {
				classes[i].onmouseover = function(){
					this.style.background = "#f3f3f3";
				};
				classes[i].onmouseout = function(){
					this.style.background = "";
				};
			}
		}
	}
	
};
///////////////////  Tooltipps

tooltipaktive = false;
function getMousePos(e) {
	if (document.all) { // IF is IE
		mousex=event.x + document.documentElement.scrollLeft; 
		mousey=event.y + document.documentElement.scrollTop;
	}
	else {mousex=e.pageX; mousey=e.pageY;}
	if(tooltipaktive == true){
		document.getElementById("tooltip_div").style.left = (mousex+10) + "px";
		document.getElementById("tooltip_div").style.top = (mousey+5) + "px";
	}
	//ret = new Array(mousex, mousey);
	//return ret;
};
document.onmousemove = getMousePos;
function tooltip_init(cname){
	for(i=0; i<document.images.length; i++){
		if(document.images[i].className == cname){
			document.images[i].onmouseover = function(){
				showTooltip(this);
			};
			document.images[i].onmouseout = function(){
				hideTooltip();
			};
			document.images[i].alt_h = document.images[i].alt;
			document.images[i].alt = "";
		}
	}
};
function showTooltip(obj){
	var mydiv = document.createElement("div");
	mydiv.id = "tooltip_div";
	mydiv.style.position = "absolute";
	mydiv.style.left = (mousex+10) + "px";
	mydiv.style.top = (mousey+5) + "px";
	var myText = document.createTextNode(obj.alt_h);
	mydiv.appendChild(myText);
	document.body.appendChild(mydiv);
	tooltipaktive = true;
};
function hideTooltip(obj){
	knoten = document.body.childNodes[document.body.childNodes.length-1];
	if(knoten.id == "tooltip_div"){
		document.body.removeChild(knoten);
	}
	tooltipaktive = false;
};