﻿
/*************** MenuBilder laden ***************/

// menu_0

menu0a = new Image(); 
menu0a.src = "gfx/menu_0a.gif";
menu0b = new Image(); 
menu0b.src = "gfx/menu_0b.gif";

// menu_1

menu1a = new Image(); 
menu1a.src = "gfx/menu_1a.gif";
menu1b = new Image(); 
menu1b.src = "gfx/menu_1b.gif";

// menu_2

menu2a = new Image(); 
menu2a.src = "gfx/menu_2a.gif";
menu2b = new Image(); 
menu2b.src = "gfx/menu_2b.gif";

// menu_3

menu3a = new Image(); 
menu3a.src = "gfx/menu_3a.gif";
menu3b = new Image(); 
menu3b.src = "gfx/menu_3b.gif";


// menu_4

menu4a = new Image(); 
menu4a.src = "gfx/menu_4a.gif";
menu4b = new Image(); 
menu4b.src = "gfx/menu_4b.gif";

// menu_4

menu5a = new Image(); 
menu5a.src = "gfx/menu_5a.gif";
menu5b = new Image(); 
menu5b.src = "gfx/menu_5b.gif";


// pagetop

page1 = new Image(); 
page1.src = "gfx/pagetop_1.gif";
page2 = new Image(); 
page2.src = "gfx/pagetop_2.gif";

// pageprint

print1 = new Image(); 
print1.src = "gfx/pageprint_1.gif";
print2 = new Image(); 
print2.src = "gfx/pageprint_2.gif";


var section=0;

/*************** Funktionen ***************/

function sectioncheck(x){

section=x;

for (i=0;i<5;i++){

	if (i!=x) document.images["menu"+String(i)].src = eval("menu"+String(i)+"a.src")

} // for 

}


/************* info() **************/


function info(ziel,bild,ziel2,bild2) {

document.images[ziel].src = eval(bild +".src")
document.images[ziel2].src = eval(bild2 +".src")

} // info

/************* flip() **************/

function flip(ziel,bild,text,x) {

if (x!=section) document.images[ziel].src = eval(bild +".src")

window.status = text;
return true;

} // flip


/************* print() **************/


function printme() {

y = parseInt((screen.height-500)/2);
x = parseInt((screen.width-790)/2);

url = parent.main.location.href; 

details = window.open(url,"Druckansicht","width=790,height=500,ubar=no,menubar=yes,scrollbars=yes,toolbar=no,dependent=yes,resizable=no,top="+y+",left="+x);
details.focus();
	    
} // make him print, baby


/************* pagetop() **************/


function pagetop() {

parent.main.scrollTo(0,0);

} // to be on top again


/************* anfahrt() **************/


function anfahrt() {

skizze = window.open("skizze.html","Anfahrt","width=445,height=398,ubar=no,menubar=no,scrollbars=no,toolbar=no,dependent=yes,resizable=no,top=100,left=200");
skizze.focus();
	    
} // anfahrt


/************* kfz() **************/


function kfz() {

rechner = window.open("kfz_vergleich.html","KFZRechner","width=680,height=780,ubar=no,menubar=no,location=no,scrollbars=yes,toolbar=no,dependent=yes,resizable=no,top=5,left=200");
rechner.focus();
	    
} // kfz Rechner


/************* checkform() **************/

function checkform() {

if (document.formular["nachname"].value=="") {
	alert("Bitte geben Sie einen Nachnamen ein");
	document.formular["nachname"].focus();
	return false;
} 

else if (document.formular["vorname"].value=="") {
	alert("Bitte geben Sie einen Vornamen ein");
	document.formular["vorname"].focus();
	return false;
} 

else if (document.formular["telefon"].value=="" && document.formular["email"].value=="") {
	alert("Bitte geben Sie entweder eine Telefonnummer oder Ihre EMail Adresse fuer evtl. Rueckfragen an");
    document.formular["email"].focus();	
	return false;
}  

else if (document.formular["nachricht"].value=="") {
	alert("Bitte verfassen Sie eine Nachricht");
	document.formular["nachricht"].focus();
	return false;
} 

else return true;


} // checkform


/************* go() **************/

function go(url) {

if (url!="") {

   document.location.href = url;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();

} 

} // go for it


// eof <-------------
