﻿// Bildwechsel Home
function BildhighH(welches){
window.document.images[welches].src = "../../images/nav_"+ welches +"_hi.gif";
}

function BildnormH(welches){
window.document.images[welches].src = "../../images/nav_"+ welches +".gif";
}

// Bildwechsel Unterseiten
function Bildhigh(welches){
window.document.images[welches].src = "../../images/nav_"+ welches +"_hi.gif";
}

function Bildnorm(welches){
window.document.images[welches].src = "../../images/nav_"+ welches +".gif";
}
// Bildwechsel Download-Center
function Bildhigh2(welches){
window.document.images[welches].src = "../images/nav_"+ welches +"_hi.gif";
}

function Bildnorm2(welches){
window.document.images[welches].src = "../images/nav_"+ welches +".gif";
}

// Popup 412x420
function popUp (url) {
zoom=window.open(url,"externesFenster",'width=412,height=420,scrollbars=no,menubar=no');
var x = (screen.width-416)/2;
zoom.moveTo(x,100);
zoom.focus();
}

// Popup 412x444
function popUp2 (url) {
zoom=window.open(url,"externesFenster",'width=412,height=422,scrollbars=auto,menubar=no');
var x = (screen.width-400)/2;
zoom.moveTo(x,200);
zoom.focus();
}

//external links
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";
 }
}

function senden() {
	document.uet.submit();
}

//formular-check
function check(){
                if (document.uet.vorname.value == ""){
                alert("Sie haben noch keinen Vornamen eingegeben.")
                document.uet.vorname.focus();
                return false;
        }

        else if (document.uet.nachname.value == ""){
                alert("Bitte geben Sie Ihren Nachnamen ein.")
                document.uet.nachname.focus();
                return false;
        }

        else if (document.uet.strasse.value == ""){
                alert("Bitte geben Sie Ihre Strasse ein.")
                document.uet.strasse.focus();
                return false;
        }

        else if (document.uet.plz.value == ""){
                alert("Bitte geben Sie Ihre Postleitzahl ein.")
                document.uet.plz.focus();
                return false;
        }

        else if (document.uet.ort.value == ""){
                alert("Bitte geben Sie Ihren Wohnort ein.")
                document.uet.ort.focus();
                return false;
        }
		
        else if (document.uet.email.value == ""){
                alert("Bitte geben Sie Ihre E-Mail-Adresse ein.")
                document.uet.email.focus();
                return false;
        }

        else if (document.uet.nachricht.value == ""){
                alert("Bitte geben Sie eine Nachricht ein.")
                document.uet.nachricht.focus();
                return false;
        }

        else if (document.uet.email.value.indexOf ('@',0) == -1 || document.uet.email.value.indexOf ('.',0) == -1){
                alert("Bitte geben Sie eine g?ltige E-Mail-Adresse ein.\n\nz.B.: vorname.nachname@domain.de")
                document.uet.email.select();
                document.uet.email.focus();
                return false;
        }
        else
		document.uet.submit();
        return true;
}

//formular-check english
function checken(){
                if (document.uet.vorname.value == ""){
                alert("Please enter your first name.")
                document.uet.vorname.focus();
                return false;
        }

        else if (document.uet.nachname.value == ""){
                alert("Please enter your surname.")
                document.uet.nachname.focus();
                return false;
        }

        else if (document.uet.strasse.value == ""){
                alert("Please enter your street name and number.")
                document.uet.strasse.focus();
                return false;
        }

        else if (document.uet.plz.value == ""){
                alert("Please enter your post code.")
                document.uet.plz.focus();
                return false;
        }

        else if (document.uet.ort.value == ""){
                alert("Please enter your location.")
                document.uet.ort.focus();
                return false;
        }
		
        else if (document.uet.email.value == ""){
                alert("Please enter your e-mail adress.")
                document.uet.email.focus();
                return false;
        }

        else if (document.uet.nachricht.value == ""){
                alert("Please enter your message to the recipient.")
                document.uet.nachricht.focus();
                return false;
        }

        else if (document.uet.email.value.indexOf ('@',0) == -1 || document.uet.email.value.indexOf ('.',0) == -1){
                alert("Please enter a valid e-mail adress.\n\ne.g.: firstname.surname@domain.com")
                document.uet.email.select();
                document.uet.email.focus();
                return false;
        }
        else
		document.uet.submit();
        return true;
}

window.onload = externalLinks;