<!--

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



/**
 * Functions
 * @package CoMa
 * @subpackage inc
 * @author Birgit Kohl <bk@pixelwings.com>, Stefan Lingler <sl@pixelwings.com>
 * @copyright Pixelwings Medien GmbH
 */
/*
* Gallery START
*/
var gallery=function(c) {
	
	var g=this;
	this.c=c;
	this.t=document.getElementById(this.c.t);
	this.p=[];
	
	this.init=function() {
		if (this.t==undefined || this.c.i.length==0) return false;
		var a,b,c,d,e,z;
		
		this.i=document.createElement('img');
		this.i.setAttribute('id',this.t.id+'_i');
		
		z=document.createElement('div');
		if (this.c.c.images) z.className=this.c.c.images;
		z.appendChild(this.i);
		
		b=['next','prev'];
		d=document.createElement('div');
		for (a=0;a<b.length;a++) {
			c=document.createElement('div');
			if (this.c.c[b[a]]) c.className=this.c.c[b[a]]+' pngtrans';
			c.innerHTML=this.c.a[b[a]]!=undefined?this.c.a[b[a]]:b[a];
			c.g=this;
			c.onclick=this[b[a]];
			d.appendChild(c);
		}
		this.t.appendChild(z);
		this.t.appendChild(d);
		
		this.load('first');
	};
	this.prev=function() {
		this.g.load('prev');
	};
	this.next=function() {
		this.g.load('next');
	};
	this.load=function(e) {
		this.k=this.getK(e);
		document.getElementById(this.t.id+'_i').setAttribute('src',this.c.i[this.k]);
		if (e=='first' || e=='last') {
			this.preload(this.c.i[this.getK('next')]);
			this.preload(this.c.i[this.getK('prev')]);
		}
		else this.preload(this.c.i[this.getK(e)]);
	};
	this.getK=function(e) {
		var a=this.k;
		a=a!=undefined?a:0;
		switch (e) {
			case 'first':
				a=0;
			break;
			case 'last':
				a=(this.c.i.length-1);
			break;
			case 'prev':
				a=(a-1)<0?(this.c.i.length-1):(a-1);
			break;
			case 'next':
				a=(a+1)==this.c.i.length?0:(a+1);
			break;
		}
		return a;
	}
	this.preload=function(e) {
		if (!this.preloaded(e)) {
			MM_preloadImages(e);
			this.p.push(e);
		}
	}
	this.preloaded=function(e) {
		for (var a=0;a<this.p.length;a++) {
			if (e==this.p[a]) return true;
		}
		return false;
	}
	this.init();
	return this;
};
/*
* Gallery STOP
*/
function cc(e,c,s,t) {
	/*
	* e the document element or name of the document element or array of document element names
	* c new class name or suffix (see s) for example
	* s set s to true if c is a suffix to the existing class name.
	* t toggle previous and new class names
	*/
	var a;
	if (typeof(e)=='object') {
		for (a=0;a<e.length;a++) {
			cc(e[a],typeof(c)=='object'?c[a]:c,s,t);
		}
	}
	if (typeof(e)=='string') e=document.getElementById(e);
	if (e==undefined || (!c && e.cc_prev==undefined)) return false;
	e.className=e.className!=undefined?e.className:'';
	a=e.className;
	if (t) e.className=e.cc_prev!=undefined?e.cc_prev:c;
	else e.className=(s?e.className:'')+(c?c:e.cc_prev);
	e.cc_prev=a;
	return true;
}

/*
* HttpRequest START
*/

function HttpRequest(c) {
	if (window.XMLHttpRequest) var req=new XMLHttpRequest();
	else if (window.ActiveXObject) var req=new ActiveXObject("Microsoft.XMLHTTP");

	var res=null;
	
	var parameter='';
	
	if (c.parameter!=undefined) {
		for (var i in c.parameter) {
			var e=c.parameter[i];
			if (e!=null) {
				parameter+=i+'='+encodeURIComponent(e)+'&';
			}
		}
	}
	
	req.open((c.method?c.method:'GET'),c.url,true);
	req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	req.onreadystatechange=function () {
		if (req.readyState==4) {
			if (req.status==200) {
				res=eval("("+(req.responseText?req.responseText:"{status:'no data'}")+")");
			}
		}
		else if (req.readyState!=0) res=eval("({status:'loading...'})");
		
		if (typeof(window[c.callback])=='function') {
			window[c.callback](res,(c.args?c.args:false));
		}
	};
	req.send(parameter);
}
/*
* HttpRequest STOP
*/

-->