// JavaSkript bar latino cubana v1.0
// (c) 2004 m.c. machat | animaris

function preloadImg() {
         if (document.images) {
            if (!document.img)
               document.img = new Array(preloadImg.arguments.length/2);

            var i,j;
            for (i=0,j=1;j<preloadImg.arguments.length;i+=2,j+=2) {
                if (preloadImg.arguments[i].indexOf("#")!=0 && preloadImg.arguments[j].indexOf("#")!=0) {
                   a=preloadImg.arguments[i];
                   b=preloadImg.arguments[j];

                   document.img[a] = new Image();
                   document.img[a].src = b;
                }//end if
            }//end for
         }//end if
}

function switchImg(x,y) {  // bildname, to-do
         if (y) {
            window.document.images[x].src = document.img[x + "_m_over"].src;
         } else if (merker!=x) {
            window.document.images[x].src = "img/" + x + "_m_out.jpg";           
         }
}

function setImg(x) { // bildname
         if (merker!=x) {
            window.document.images["zig_" + merker].src = "img/zig_" + merker + ".jpg";
            window.document.images[merker].src = "img/" + merker + "_m_out.jpg";
         }
         window.document.images["zig_" + x].src = document.img["zig_" + x].src;
         merker=x;
}
