     /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     +                 Article JS v0.2 by Michael Loesler                   +
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     + Copyright (C) 2006 by Michael Loesler, http://www.derletztekick.de   +
     +                                                                      +
     +                                                                      +
     + This program is free software; you can redistribute it and/or modify +
     + it under the terms of the GNU General Public License as published by +
     + the Free Software Foundation; either version 2 of the License, or    +
     + (at your option) any later version.                                  +
     +                                                                      +
     + This program is distributed in the hope that it will be useful,      +
     + but WITHOUT ANY WARRANTY; without even the implied warranty of       +
     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        +
     + GNU General Public License for more details.                         +
     +                                                                      +
     + You should have received a copy of the GNU General Public License    +
     + along with this program; if not, write to the                        +
     + Free Software Foundation, Inc.,                                      +
     + 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.            +
     +                                                                      +
      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

		function getElementsByClassName(classname){
			var htmlObjs = document.getElementsByTagName("*");
			var Elements = new Array();
			for (var i=0; i<htmlObjs.length; i++){
				if (htmlObjs[i].className.indexOf(classname) != -1){
					var classes = htmlObjs[i].className.split(/\s/);
					for (var j=0; j<classes.length; j++){
						if (classes[j] == classname){
							Elements[Elements.length] = htmlObjs[i];
						}
					}
				} 
			}
			return (Elements.length>0?Elements:null);
		}
		
		function setVisible(choosedArticle){
			if (typeof(choosedArticle) == "undefined" || choosedArticle == null){
				return false;
			}
			var classes = choosedArticle.className.split(/\s/);
			var currentID = parseInt(classes[classes.length-1].replace(/description_/, ""));
			if (isNaN(currentID)){
				return false;
			}
			for (var i=0; i<article.length; i++){
				if (i!=currentID){
					article[i].style.display="none";
					description[i].getElementsByTagName("a")[description[i].getElementsByTagName("a").length-1].style.display = "inline";
				}
				else{
					article[currentID].style.display="";
					description[currentID].getElementsByTagName("a")[description[currentID].getElementsByTagName("a").length-1].style.display = "none";
				}

			}
			
			return true;
		}
		
		function article2URI(switcher){
			if (window.location.search.length > getParamName.length) {
				var GET_vars = (window.location.search.substring(1,window.location.search.length)).split("&");
				var uri = "?";
				for (var i=0; i<GET_vars.length; i++){
					if (GET_vars[i].indexOf(getParamName) == -1 && switcher == 1){
						uri += GET_vars[i] + "&";
					}
					else if (GET_vars[i].indexOf(getParamName) != -1 && switcher == 2){
						return (GET_vars[i].substring(getParamName.length, GET_vars[i].length));
					}
				}
				return (window.location.hostname + window.location.pathname + uri.substring(0,uri.length-1));
			}
			else if (switcher == 1){
				return window.location.href;
			}
			else if (switcher == 2){
				return -1
			}
			return null;
		}
		
		function initArticleJS() {
			var uri = article2URI(1);
			var openarticle = article2URI(2);
			var articlenumber = null;
			description = getElementsByClassName("article_description");
			article = getElementsByClassName("article");
			if (description == null || article == null){
				window.alert("Keinen Eintrag für die angegebene Style-Sheets-Klasse gefunden!");
				return false;
			}
			if (description.length != article.length){
				window.alert("Die Anzahl der Artikel und Beschreibungen müssen identisch sein!");
				return false;
			}
			for (var i=0; i<description.length; i++){
				var link2article = document.createElement("a");
				link2article.appendChild(document.createTextNode("mehr..."));
				link2article.href = (uri.indexOf("?")!=-1?uri + "&":uri + "?") + getParamName + (description.length-i);
				link2article.title = "Ganzen Artikel lesen...";
				link2article.onclick=function () { setVisible(this); return false; };
				link2article.className = link2article.className + " description_"+i;				
				article[i].className = article[i].className + " article_"+i;
				article[i].style.display = "none";
				description[i].appendChild(document.createTextNode(String.fromCharCode(160)));
				description[i].appendChild(link2article);
				
				if (openarticle == (description.length-i)){
					articlenumber = link2article;
				}
			}
			setVisible(articlenumber);
		}
		
		var getParamName = "article=";
		var description = null;
		var article = null;
		//window.onload = initArticleJS;