// DropDown Menu
startList = function() {
   if (document.all&&document.getElementById) {
      navRoot = document.getElementById("nav");
      for (i=0; i<navRoot.childNodes.length; i++) {
         node = navRoot.childNodes[i];
         if (node.nodeName=="LI") {
            node.onmouseover=function() {
               this.className+=" over";
            }
            node.onmouseout=function() {
               this.className=this.className.replace(" over", "");
            }
         }
      }
   }
}
window.onload=startList;



// Roll-Over und Status-Text
//window.defaultStatus = "*";
function wechsel(was,modus,wtext) {
document.images[was].src = "http://www.guardinvestments.de/img/"+modus;
window.status = wtext;
return true;
}

// Kauf Verkauf Überprüfung
function wirklich() {
// abfrage nur, wenn stücke gekauft werden
var konto = "user_konto_neu[0][stueck]";
var a = document.wirklichform.elements[konto];

var future = "user_future_neu[0][stueck]";
var b = document.wirklichform.elements[future];

if(a.value != "" || b.value != "") {
    Check = confirm("Eingaben korrekt?\n\n");
    if(Check == false) {
      return false; } else { return true; }
} else {
      return true;
   }// if user...
}

// Verkauf check
function wirklichVerk() {
    Check = confirm("Eingaben korrekt?\n\n");
    if(Check == false) {
      return false; } else { return true; }
}

// Form-Check
function pruefen() {
   var fehler = "";
   var f = document.Mailformular
   if (f.kontakt_first_name.value == "") {
      fehler = "Der Name\n";
   }
   if (f.kontakt_last_name.value == "") {
      fehler += "Die Email-Adresse\n";
   }
   if (f.kontakt_email_address.value == "") {
      fehler += "Die Email-Adresse\n";
   }
   if (f.kontakt_nachricht.value == "") {
      fehler += "Die Nachricht\n";
   }

   if (fehler!="") {
   alert('Bitte füllen Sie alle Felder aus \n\nPlease fill out all fields');
   return false;
   } else {
   return true;
   }
}

// Pop-up Aufruf mit zentrieren -----------------------------------------------------------------------------------------
function popup(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll;
win = window.open(mypage, myname, winprops);
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

