var imgtmp;
var imgs = new Array;
function meOnLoad()
{
	imgtmp=new Image();
			imgs["mood1"]=new Image();imgs["mood1"].src="/data/vkg.es/images/mood-1_over.jpg";
			imgs["mood2"]=new Image();imgs["mood2"].src="/data/vkg.es/images/mood-2_over.jpg";
			imgs["mood3"]=new Image();imgs["mood3"].src="/data/vkg.es/images/mood-3_over.jpg";
			imgs["mood4"]=new Image();imgs["mood4"].src="/data/vkg.es/images/mood-4_over.jpg";
	hasEventOnlinehelp = true;
	registerOnlineHelp();
	var elems = $$('a.onlinehelp');
	elems.forEach(function(toc)
	{
		toc.addEvent('mouseover', function(){eventOnlinehelp(toc.id)});
		toc.addEvent('mouseout', function(){eventOnlinehelp('floorPlanSelect')});
	});
}


function myEventOnlinehelp(action)
{
	return false;
}


function setActive(elem)
{

}
function checkformSearch(form){
    var message='';
		var tofocus='';
		var mail = form.email.value;

		if (form.name.value == ''){
		 message+="\n* Bitte tragen Sie Ihren Namen ein.";
		 if(!tofocus)
		 	tofocus='name';
		}
		if (mail == ''){
		 message+="\n* Bitte tragen Sie Ihren E-Mail-Adresse ein.";
		 if(!tofocus)
		 	tofocus='email';
		}
		if (mail.indexOf ('@',0) == -1 || mail.indexOf ('.',0) == -1){
		 message+="\n* Das E-Mail Feld benötigt ein @-Zeichen und einen \'.\'";
	  	if(!tofocus)
		 	tofocus='email';
		}
		if(!tofocus)
			form.submit();
		else{
			message="Bitte ändern Sie Ihre Eingabe:"+message;
			alert(message);
			eval('form.'+tofocus+'.focus()');
			return false;
		}
}
function checkform1(form){
    var message='';
		var tofocus='';

		if (form.name.value == ''){
		 message+="\n* Bitte tragen Sie Ihren Namen ein.";
		 if(!tofocus)
		 	tofocus='name';
		}
		if (form.telefon.value == ''){
		 message+="\n* Bitte tragen Sie Ihren Telefonnummer ein.";
		 if(!tofocus)
		 	tofocus='email';
		}

		if(!tofocus)
			form.submit();
		else{
			message="Bitte ändern Sie Ihre Eingabe:"+message;
			alert(message);
			eval('form.'+tofocus+'.focus()');
			return false;
		}
}
function validate(){
	inputfeld=document.getElementById('plz');
	if (inputfeld.value == ''){
		message="Bitte tragen Sie eine Postleitzahl ein.";
		alert(message);
		inputfeld.focus();
		return false;
	}
	return true;
}
function encode_utf8(rohtext) {
    // dient der Normalisierung des Zeilenumbruchs
    rohtext = rohtext.replace(/\r\n/g,"\n");
    var utftext = "";
    for(var n=0; n<rohtext.length; n++)
        {
        // ermitteln des Unicodes des  aktuellen Zeichens
        var c=rohtext.charCodeAt(n);
        // alle Zeichen von 0-127 => 1byte
        if (c<128)
            utftext += String.fromCharCode(c);
        // alle Zeichen von 127 bis 2047 => 2byte
        else if((c>127) && (c<2048)) {
            utftext += String.fromCharCode((c>>6)|192);
            utftext += String.fromCharCode((c&63)|128);}
        // alle Zeichen von 2048 bis 66536 => 3byte
        else {
            utftext += String.fromCharCode((c>>12)|224);
            utftext += String.fromCharCode(((c>>6)&63)|128);
            utftext += String.fromCharCode((c&63)|128);}
        }
    return utftext;
}


