
    function SetClassById(el,ds) {
        if (document.getElementById) {
            var nodeObj = document.getElementById(el);
            nodeObj.className = ds;
        }
    }

     
    function LoadPage(page,main,sub) {
        location.href = "index.php?page=" + page + "&p=" + main + "&s=" + sub;
        //location.href = main + ".html";
    }

    function showpic(bild) {
        F1 = open(bild,"F1","toolbar=no");
	F1.focus();
    }

    function OpenEcard(album,bild,do_replace) {
        if(do_replace) {
            self.location.href = "/docs/ecard.php?mode=create&album=" + album + "&pic=" + bild;
            window.resizeTo(500,600);
        } else {
            F2 = open("/docs/ecard.php?mode=create&album=" + album + "&pic=" + bild,"F2","width=500,height=600");
	    F2.focus();
        }
    }
    
	function zeige_zeit () {
	   jetzt = new Date();
           var imageCompleteName = image_name.concat(ct_images).concat(image_extension);

           movepic('Bild',imageCompleteName);
           
	    if (first_run == 1)
	       first_run=0;
	    else
               ct_images++;

	    if (ct_images >= num_images)
	    {
		ct_images=0;
	    }

            Timer = setTimeout('zeige_zeit()' , delay_in_sec * 1000);
	}
        
        function movepic(img_name,img_src) {
        document.cookie = ct_images;
        document[img_name].src=img_src;
        }
        
        var ct_images = 0;
        
        if (document.cookie)
        {
      	   ct_images = document.cookie;
      	   if (isNaN(ct_images))
      	   {
      	      ct_images=0;	
      	      document.cookie=ct_images;
      	   }
        }
        else
     	document.cookie = ct_images;
     	
        var num_images = 4;
        var delay_in_sec = 5;
        
        var image_name="http://www.speedskater-hildesheim.de/manschaft_klein_neu";
        var image_extension=".jpg";
        
    var first_run = 1;
