<!--
dm = document.images;
if (dm) { over = new Image(); over.src = "imgs/pfeil_re.gif"; out = new Image(); out.src = "imgs/dott.gif"; }
function ov(n) { if (dm) {document[n].src = eval("over.src");}}
function ou(n) { if (dm) {document[n].src = eval("out.src");}}

dm2 = document.images;
if (dm2) { over2 = new Image(); over2.src = "imgs/square1_on.gif"; out2 = new Image(); out2.src = "imgs/square1_off.gif"; }
function ov2(n) { if (dm2) {document[n].src = eval("over2.src");}}
function ou2(n) { if (dm2) {document[n].src = eval("out2.src");}}

dm3 = document.images;
if (dm3) { over3 = new Image(); over3.src = "imgs/square2_on.gif"; out3 = new Image(); out3.src = "imgs/square1_off.gif"; }
function ov3(n) { if (dm3) {document[n].src = eval("over3.src");}}
function ou3(n) { if (dm3) {document[n].src = eval("out3.src");}}

function setfocus(target) {
if (target.value == '') {
	target.focus();
	target.select();
}
}

        function validate() {
                
                if (!check(document.eingabe.bga.value, "1234567890", 4,9)) {
                        alert("BGA Nummer ist unvollständig oder nicht vorhanden.!");
                        setfocus(document.eingabe.bga);
                        return false;
                }
                if (document.eingabe.aponame.value=="") {
                        alert("Apothekenname ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.aponame);
                        return false;
                }
                if (document.eingabe.vorname.value=="") { 
                        alert("Vorname ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.vorname);
                        return false;
                }
                if (document.eingabe.nachname.value=="") { 
                        alert("Nachname ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.nachname);
                        return false;
                }
                if (document.eingabe.vorname.value=="") {
                        alert("Vorname ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.vorname);
                        return false;
                }
                if (document.eingabe.strasse.value=="") { 
                        alert("Strasse ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.strasse);
                        return false;
                }
                if (!check(document.eingabe.plz.value,"1234567890", 5, 5)) {
                        alert(document.eingabe.plz.value + " ist keine gültige PLZ!");
                        setfocus(document.eingabe.plz);
                        return false;
                }
                if (document.eingabe.ort.value=="") {
                        alert("Ort ist ein Pflichtfeld, bitte ausfüllen!");
                        setfocus(document.eingabe.ort);
                        return false;
                }                       
                if (!check(document.eingabe.vorwahl.value,"1234567890",3, 6)) {
                        alert("Vorwahl ist fehlerhaft, bitte korrigieren Sie!");
                        setfocus(document.eingabe.vorwahl);
                        return false;
                }
                if (!check(document.eingabe.telefon.value,"1234567890",3, 15)) { 
                        alert("Telefonnummer ist fehlerhaft, bitte korrigieren Sie!");
                        setfocus(document.eingabe.telefon);
                        return false;
                }                       
                if (!checkmail(document.eingabe.email.value)) {
                        alert(document.eingabe.email.value + " ist keine gültige emailadresse!");
                        setfocus(document.eingabe.email);
                        return false;
                }
                if (!check(document.eingabe.passwort.value,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890",4,12)) {
                        alert(document.eingabe.passwort.value + " ist kein gültiges Passwort! (4 bis 12 Zeichen)");
                        setfocus(document.eingabe.passwort);
                        return false;

                if (!check(document.eingabe.woher.value,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ",2, 20)) {
                        alert(document.eingabe.woher.value + "Bitte teilen Sie uns kurz mit, wie Sie vom Shopsystem erfahren haben");
                        setfocus(document.eingabe.email);
                        return false;
                }
                }
        }

        function check(input, truevalues, minlength, maxlength) {
                var ok = true;

                if (input.length < minlength) ok = false;
                if (input.length > maxlength) ok = false;
                
                for (var i = 0; i < input.length && ok; i++) {
                        var chr = input.charAt(i);
                        if (truevalues.indexOf(chr) == -1) {
                                ok = false;
                        }
                }
                return ok;
        }
        
        function checkmail(input) {
                var ok = false;
                var reg= /.+@.+/;
                
                if (reg.test(input)) {
                        ok=true;
                }
                return ok;
        }

function dialog() {
alert("Auf dieser Seite befinden Sie sich gerade! Wählen Sie bitte etwas anderes aus.   ");
}

//  Scroller auf Homepage 
//  im Body-Tag muss der Aufruf OnLoad="scrollnews(0)" stehen 
// als Hintergrund wird ein Clearpixel benötigt.
var blank = "imgs/clearpixel.gif";

topedge = 360;       // Position vom oberen Rand des Browsers
leftedge = 693;      // Position vom linken Rand des Browsers
boxheight = 265;     // Höhe der Box
boxwidth = 130;      // Breite der Box
scrollheight = 1150;  // Höhe der durchzuscrollenden Gesamtinformatioen

function scrollnews(cliptop) {
if (document.layers) {
newsDiv = document.news;
newsDiv.clip.top = cliptop;
newsDiv.clip.bottom = cliptop + boxheight;
newsDiv.clip.left = 0;
newsDiv.clip.right = boxwidth + leftedge;
newsDiv.left = leftedge;
newsDiv.top = topedge - cliptop;
}
else {
newsDiv = news.style;
newsDiv.clip = "rect(" + cliptop + "px " + (boxwidth + leftedge) + "px " + (cliptop + boxheight) + "px 0px)";
newsDiv.pixelLeft = leftedge;
newsDiv.pixelTop = topedge - cliptop;
}
cliptop = (cliptop + 1) % (scrollheight + boxheight);
newsDiv.visibility='visible';
setTimeout("scrollnews(" + cliptop + ")", 40);
}

// Unterscheidet zwischen verschiedenen Browsern
// Zweck: Unterschiedliche Stylesheet Interpretation bei IE und Netscape
if (navigator.appName.indexOf("Netscape") != -1)
{
	document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"main1_netscape.css\">");
}
if (navigator.appName.indexOf("Explorer") != -1)
{
	document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"main1.css\">");
}
// hide ende -->