//*************************************************************************************////*********  B I L D A U S T A U S C H   U N D   S T A T U S A N Z E I G E   **********////*************************************************************************************//if (document.images) {            // mouseover Images            img1on=new Image();                  img1on.src="img/nav/nav1_profil_mo.gif";             img2on=new Image();             img2on.src="img/nav/nav2_internet_mo.gif";              img3on=new Image();            img3on.src="img/nav/nav3_cd_mo.gif";            img4on=new Image();            img4on.src="img/nav/nav4_print_mo.gif";						img5on=new Image();            img5on.src="img/nav/nav5_illu_mo.gif";            img6on=new Image();            img6on.src="img/nav/nav6_partner_mo.gif";						img7on=new Image();            img7on.src="img/nav/nav7_kontakt_mo.gif";                        						// InActive Images			 			img1off=new Image();                  img1off.src="img/nav/nav1_profil.gif";             img2off=new Image();             img2off.src="img/nav/nav2_internet.gif";              img3off=new Image();            img3off.src="img/nav/nav3_cd.gif";            img4off=new Image();            img4off.src="img/nav/nav4_print.gif";						img5off=new Image();            img5off.src="img/nav/nav5_illu.gif";            img6off=new Image();            img6off.src="img/nav/nav6_partner.gif";						img7off=new Image();            img7off.src="img/nav/nav7_kontakt.gif";																		// Active Images (Status)						img1sta=new Image();                  img1sta.src="img/nav/nav1_profil_on.gif";             img2sta=new Image();             img2sta.src="img/nav/nav2_internet_on.gif";              img3sta=new Image();            img3sta.src="img/nav/nav3_cd_on.gif";            img4sta=new Image();            img4sta.src="img/nav/nav4_print_on.gif";						img5sta=new Image();            img5sta.src="img/nav/nav5_illu_on.gif";            img6sta=new Image();            img6sta.src="img/nav/nav6_partner_on.gif";            						// bt-vor/zurueck						//img8on=new Image();            //img8on.src="img/allg/bt_zurueck.gif";						//img8off=new Image();            //img8off.src="img/allg/bt_zurueck_in.gif";}		var aktiv = "";// Function to 'activate' images.function imgOn(imgName) {			if (aktiv != eval(imgName + "off.src"))      //if (document.images) 			{         document[imgName].src=eval(imgName + "on.src");      }}// Function to 'deactivate' images.function imgOff(imgName) {			  if (aktiv != eval(imgName + "off.src"))				//if (document.images) 				{						document[imgName].src=eval(imgName + "off.src");				}}	// Function fuer "aktive" Bilderfunction imgActive(imgName) {				if (document.images)		{						document[imgName].src=eval(imgName + "sta.src");        aktiv = eval(imgName + "off.src");				var zaehler = imgName.slice(3,5);		}							for (var i = 1; i <= 7; i++) //  <= Anzahl der Bilder insgesamt eintragen		{			if (zaehler != i) //stellt alle anderen Bilder zurueck			{					document["img"+i].src=eval(("img"+i) + "off.src");					//alert("img"+i);				}		}									 }							//*************************************************************************************////*********            D R E A M W E A V E R   F U N K T I O N E N           **********////*************************************************************************************//function MM_reloadPage(init) {  //reloads the window if Nav4 resized  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true);function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}//*************************************************************************************////*********      T H U M B N A I L S   A U S T A U S C H   E T C .           **********////*************************************************************************************//function initialisiere(){	thumbs_wechsel(1);	th_internet(1);	einblenden_bt_block_vor_zurueck();}function MM_setTextOfLayer(objName,x,newText) { //v4.01  if ((obj=MM_findObj(objName))!=null) with (obj)    if (document.layers) {document.write(unescape(newText)); document.close();}    else innerHTML = unescape(newText);}function th_internet(zaehler){	MM_setTextOfLayer(content_x,'', eval('th'+zaehler+'_b_1')); // var content_x steht in der .js datei	MM_setTextOfLayer('text_internet','', eval('th'+zaehler+'_t'));  	i = zaehler;	th_status();	einblenden_bt_vor_zurueck();	text_status(); //setzt den status a la 1/3	//thumb_status();	//einblenden_bt_block_vor_zurueck();}function thumbs_wechsel(alle12){	MM_setTextOfLayer('thumbs_ref','',eval('thumbs_'+alle12));	//alert('peter');}function bt_weiter_weiss(){	 	if (i < anzahl_thumbs) // Gesamtzahl eintragen	{			if (i==12)		{			thumbs_wechsel(2);		}		if (i==24)		{			thumbs_wechsel(3);		}		if (i==36)		{			thumbs_wechsel(4);		}		i++;	}	else	{		i=1;		thumbs_wechsel(1);	}	th_internet(i);}function bt_zurueck_weiss(){		if (i>1)	{  			if (i==13)		{			thumbs_wechsel(1);		}		if (i==25)		{			thumbs_wechsel(2);		}		if (i==37)		{			thumbs_wechsel(3);		}		i--;	}	else if (i==1)	{		i = anzahl_thumbs; // Gesamtzahl eintragen		z = (Math.ceil(anzahl_thumbs/12));		thumbs_wechsel(z);	}	th_internet(i);}function th_status() //ändert sie rahmenfarbe des thumbnails{	if ((i<=12)&&(anzahl_thumbs <= 12))	{		for (a = 1; a <= anzahl_thumbs; a++) //  setzt ale anderen wieder auf normal			{								idNeu2=("d"+a);				document.getElementById(idNeu2).style.borderColor = "#D7E994";			}	}	else if ((i<=12)&&(anzahl_thumbs > 12))	{ 		for (a = 1; a <= 12; a++) //  setzt ale anderen wieder auf normal			{								idNeu2=("d"+a);				document.getElementById(idNeu2).style.borderColor = "#D7E994";			}	}	else if ((i>12)&&(i<=24)&&(anzahl_thumbs > 24))	{		for (a = 13; a <= 24; a++) //  Gesamtzahl eintragen, setzt ale anderen wieder auf normal			{								idNeu2=("d"+a);				document.getElementById(idNeu2).style.borderColor = "#D7E994";			}	}	else if ((i>12)&&(i<=24)&&(anzahl_thumbs <= 24))	{		for (a = 13; a <= anzahl_thumbs; a++) //  Gesamtzahl eintragen, setzt ale anderen wieder auf normal			{								idNeu2=("d"+a);				document.getElementById(idNeu2).style.borderColor = "#D7E994";			}	}	else if ((i>24)&&(i<=36))	{		for (a = 25; a <= anzahl_thumbs; a++) //  Gesamtzahl eintragen, setzt ale anderen wieder auf normal			{								idNeu2=("d"+a);				document.getElementById(idNeu2).style.borderColor = "#D7E994";			}	}							idNeu=("d"+i); // setzt eine neue Rahmenfarbe	document.getElementById(idNeu).style.borderColor = "#FF7800";	zaehler_thumb_gross = 1; // zaehler fuer function bt_weiter()}var buttons_vor_zurueck = '<a href="javascript:bt_zurueck()" onfocus="this.blur()"><img src="img/allg/bt_zurueck.gif" alt="zur&uuml;ck" width="21" height="11" border="0" /></a><a href="javascript:bt_weiter()" onfocus="this.blur()"><img src="img/allg/bt_vor.gif" alt="vor" width="21" height="11" border="0" style="margin-left:10px" /></a>'function einblenden_bt_vor_zurueck(){	//if (eval('th'+i+'_buttons') == true)	if (eval('th'+i+'_anzahl') > 1)	{		MM_setTextOfLayer('bt_vor_zurueck_re','',buttons_vor_zurueck);	}	 else	{		MM_setTextOfLayer('bt_vor_zurueck_re','','');	}}function bt_weiter() //zaehler_thumb_gross wird in th_internet () initialisiert{	if (zaehler_thumb_gross < eval('th'+i+'_anzahl'))	{		zaehler_thumb_gross++;	}	else	{		zaehler_thumb_gross=1;	}	thumb_gross = eval('th'+i+'_b_'+zaehler_thumb_gross);	MM_setTextOfLayer(content_x,'',thumb_gross);	text_status();}function bt_zurueck() //zaehler_thumb_gross wird in th_internet () initialisiert{		if (zaehler_thumb_gross > 1)	{			zaehler_thumb_gross--;	}	else 	{		zaehler_thumb_gross = eval('th'+i+'_anzahl');	}		thumb_gross = eval('th'+i+'_b_'+zaehler_thumb_gross);	MM_setTextOfLayer(content_x,'',thumb_gross);	text_status();}function text_status() // wird auch in th_internet () ausgeführt{	//alert(zaehler_thumb_gross);	MM_setTextOfLayer('status','',zaehler_thumb_gross+'/'+eval('th'+i+'_anzahl'));}/************* AUSTAUSCH 12er THUMBNAILBLOCK ***********/var buttons_block_vor_zurueck = '<a href="javascript:bt_block_zurueck_weiss()" onfocus="this.blur()"><img src="img/allg/bt_block_zurueck_weiss.gif" alt="Block zur&uuml;ck" width="21" height="11" border="0" /></a><a href="javascript:bt_block_weiter_weiss()" onfocus="this.blur()"><img src="img/allg/bt_block_vor_weiss.gif" alt="Block vor" width="21" height="11" border="0" style="margin-left:10px" /></a>'function einblenden_bt_block_vor_zurueck(){	//alert(Math.ceil(anzahl_thumbs/12));	if (Math.ceil(anzahl_thumbs/12) > 1)	{		MM_setTextOfLayer('bt_block_vor_zurueck_weiss','',buttons_block_vor_zurueck);	}	 else	{		MM_setTextOfLayer('bt_block_vor_zurueck_weiss','','');	}}function bt_block_weiter_weiss(){		b = Math.ceil(i/12)+1;	c = Math.ceil(anzahl_thumbs/12);	if (b <= c)	{		thumbs_wechsel(b);		i = ((b-1)*12+1)		th_internet(i);	}	else	{		thumbs_wechsel(1);		th_internet(1);	}}function bt_block_zurueck_weiss(){		b = Math.ceil(i/12)-1;	c = Math.ceil(anzahl_thumbs/12);	if (b >= 1)	{		thumbs_wechsel(b);		i = ((b-1)*12+1)		th_internet(i);	}	else	{				b = c;		thumbs_wechsel(b);		i = ((b-1)*12+1)		th_internet(i);	}}function impr_ein(){	document.getElementById("impressum").style.visibility ="visible";	document.getElementById("impr_text").style.overflow ="auto";}function impr_aus(){	document.getElementById("impressum").style.visibility ="hidden";	document.getElementById("impr_text").style.overflow ="hidden";}/*function thumb_status() {	//alert(zaehler_thumb_gross);	MM_setTextOfLayer('status_thumb','','peter');}*///*************************************************************************************////*********                             E M A I L                            **********////*************************************************************************************//// JS function for uncrypting spam-protected emails:function UnCryptMailto(s) {	//	var n=0;	var r="";	for(var i=0; i < s.length; i++) {		n=s.charCodeAt(i);		if (n>=8364) {n = 128;}		r += String.fromCharCode(n-(2));	}	return r;}// JS function for uncrypting spam-protected emails:function linkTo_UnCryptMailto(s)	{	//	location.href=UnCryptMailto(s);}//*************************************************************************************////*********                        P O P U P B I L D E R                     **********////*************************************************************************************//function BilderPopup(BildName,BildBreite,BildHoehe,HeadLine,Text){var Fenster = null;var LeftPosition = screen.width/2 - (parseInt(BildBreite)+80)/2 - 25; //25 px Versatz wie Hauptfenstervar TopPosition = screen.height/2 - (parseInt(BildHoehe)+100)/2 - 50; //50 px Versatz nach obenvar Settings = 'width='+(parseInt(BildBreite)+80)+ ',height='+(parseInt(BildHoehe)+100)+',top='+TopPosition+',left='+LeftPosition+',scrollbars=0';//var TarName = ''+BildName.replace(/.jpg/,"")+''; // Target Name ist BildName ohne ".jpg"var TarName = Math.ceil(Math.random()*1000);var Fenster = window.open("",TarName,Settings);Fenster.focus();   if (Fenster != null)   {      with (Fenster.document)	  {        open();		writeln("<html>");		writeln("<head>");		writeln("<title>ROCK DJ</title>");		writeln("<link rel='stylesheet' href='css/styles.css' type='text/css'>");		writeln("</head>");		writeln("<body style='background-image:url(img/bg_kachel_main.gif);'>");		writeln("<div align='center' style='margin-top:40px'>");		writeln("<img src='img/media_fotos/"+BildName+"' width='"+BildBreite+"' height='"+BildHoehe+"'>");		writeln("<br><br><div align='right' id='btpopup' style='margin-right:40px'><a href='javascript:window.close();' style='font-family: Verdana, Arial, Helvetica, sans-serif;font-size:11px;color:#FF4800;letter-spacing:2px;text-decoration: none;'>  >> Fenster schlie&szlig;en</a></div>");		writeln("</div></body></html>");		close();	   }   }}//*************************************************************************************////*********                 K O N T A K T F O R M U L A R                    **********////*************************************************************************************//// Überprüfung von Formulareingaben so nicht global verwendbar// Nice to have und später anpassen// Das Array übergeben und dann sollte das funkenfunction chkFormularArray() {	var checkarray=new Array ("N","Y","Y","N","N","Y","N","Y","Y","N","N","N","M","N","N","N","0");      for(count=0; count < (checkarray.length-2); count++){          if (checkarray[count] == 'Y'){              var wert = document.Formular[count].value;              if ( wert == "" || wert == " "){                  ersetz = /\+/gi;                  feldname = document.Formular[count].name.replace(ersetz," ");                  alert("Bitte füllen Sie das Feld "+unescape(feldname)+" aus!");                  document.Formular[count].focus();                  return false;              } // end of if wert = ""          }          if (checkarray[count] == 'M'){              var ok = 1;              var email = document.Formular[count].value;              var geteilt = email.split ("@");              // falls mehr als ein oder gar kein '@' im string              if (geteilt.length != 2){                  ok = 0;              }              else{                  // falls vor oder nach dem '@' nichts mehr kommt                  if (geteilt[0] == "" || geteilt[1] == "" ) { ok = 0; }                  // falls nach dem '@' kein Punkt mehr kommt                  if (geteilt[1].indexOf(".") == "-1" ) { ok = 0; }                  // falls direkt nach dem '@' oder ganz am Schluss ein Punkt kommt                  var laenge = geteilt[1].length;                  if (geteilt[1].indexOf(".") == "0" || geteilt[1].charAt(laenge-1) == ".") { ok = 0; }                  // falls direkt vor dem '@' oder am Anfang ein Punkt kommt                  var laenge = geteilt[0].length;                  if (geteilt[0].indexOf(".") == "0" || geteilt[0].charAt(laenge-1) == ".") { ok = 0; }              }              if (ok == 0){                  alert ("Keine gültige E-Mail-Adresse!");                  document.Formular[count].focus();                  return false;              }          }      } // end of for  }   function chkFormular() {	// Name Check	if(document.Formular.name.value == "") {		alert("Bitte einen Namen eingeben!");  	document.Formular.name.focus();  	return false;  }    // Baujahr Check	if(document.Formular.baujahr.value == "") {		alert("Bitte ein Baujahr eingeben!");  	document.Formular.baujahr.focus();  	return false;  }    // Kilometer Check	if(document.Formular.kilometer.value == "") {		alert("Bitte die Kilometer eingeben!");  	document.Formular.kilometer.focus();  	return false;  }    // preis Check	if(document.Formular.preis.value == "") {		alert("Bitte einen Preis eingeben!");  	document.Formular.preis.focus();  	return false;  }    // bildklein Check	if(document.Formular.bildklein.value == "") {		alert("Bitte eine kleines Bild eingeben!");  	document.Formular.bildklein.focus();  	return false;  }}function chkFormularKontakt() {      // Nachname Check      if(document.Formular.name.value == "") {          alert("Bitte einen Namen eingeben!");          document.Formular.name.focus();          return false;      }            // E-Mail Adressen Check      var ok = 1;      var email = document.Formular.email.value;      var geteilt = email.split ("@");      // falls mehr als ein oder gar kein '@' im string      if (geteilt.length != 2){          ok = 0;      }      else{          // falls vor oder nach dem '@' nichts mehr kommt          if (geteilt[0] == "" || geteilt[1] == "" ) { ok = 0; }          // falls nach dem '@' kein Punkt mehr kommt          if (geteilt[1].indexOf(".") == "-1" ) { ok = 0; }          // falls direkt nach dem '@' oder ganz am Schluss ein Punkt kommt          var laenge = geteilt[1].length;          if (geteilt[1].indexOf(".") == "0" || geteilt[1].charAt(laenge-1) == ".") { ok = 0; }          // falls direkt vor dem '@' oder am Anfang ein Punkt kommt          var laenge = geteilt[0].length;          if (geteilt[0].indexOf(".") == "0" || geteilt[0].charAt(laenge-1) == ".") { ok = 0; }      }      if (ok == 0){          alert ("Keine gültige E-Mail-Adresse!");          document.Formular.email.focus();          return false;      }  }
