/*******************************************************************************************
*  YANA Component Framework
*
*  Author/Autor:   Thomas Meyer
*  Homepage:       www.All-Community.de/pub
*  Copyright:      (c) 2001-2006 Thomas Meyer, All rights reserved.
*  Licence/Lizenz: http://creativecommons.org/licenses/by-nc-sa/2.5/
*
*  Private Nutzung und Verteilung sind kostenfrei, zu den Bedingungen der oben genannten CC-Lizenz.
*  Kommerzielle Angebote und Firmen müssen sich vor der Nutzung registrieren lassen und erhalten
*  damit Zugriff auf ein anderes, weniger restriktives Lizenzmodell.
*
*  Private Usage is free by the terms of the CC-Licence mentioned above.
*  Commercial sites and Businesses need to register before usage and will be granted access to
*  another, less restrictive licence model.
*
*  Copyright Hinweise dürfen NICHT entfernen werden! / Copyright notices may NOT be removed!
*
*********************************************************************************************/

var img1 = new Image();
var img2 = new Image();
img1.src=src+"icon3.gif";
img2.src=src+"icon4.gif";
var mode = 0;

function change(id) {
         var myField = document.getElementById("field"+id);
         setPane(id,myField.style.visibility!="hidden");
};

function setPane(id,mode) {
         var myField = document.getElementById("field"+id);
         var myImg   = document.getElementById("img"+id);
         if (myField != null && myImg != null) {
            myImg.src = (mode) ? img2.src : img1.src;
            myField.style.visibility = (mode) ? "hidden" : "visible";
            myField.style.top = (mode) ? 0 : "";
            myField.style.left = (mode) ? 0 : "";
            myField.style.position = (mode) ? "absolute" : "";
         };
};

function modus() {
         if (mode==1) { // Expertenmodus
           setMode(1,false);
           setMode(2,false);
         } else {       // Anfängermodus
           setPane(3,true);
           setPane(4,true);
           setMode(1,true);
           setMode(2,true);
         }
         var myBtn = document.getElementById("btn");
         if (myBtn)  { myBtn.value = (mode==0) ? txt1 : txt0; };
         mode = (mode==0) ? 1 : 0;
};

function setMode(id,mode) {
         var exp_mode = document.getElementById("exp"+id);
         if (exp_mode) {
           exp_mode.style.visibility = (mode) ? "hidden" : "";
           exp_mode.style.position = (mode) ? "absolute" : "relative";
           exp_mode.style.top = (mode) ? 0 : "";
           exp_mode.style.left = (mode) ? 0 : "";
           exp_mode.style.width = (mode) ? 0 : "";
         }
};
