function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
		elm.addEventListener(evType, fn, useCapture);
		return true;
	} else if (elm.attachEvent) {
		var r = elm.attachEvent('on' + evType, fn);
		return r;
	} else {
		elm['on' + evType] = fn;
	}
}
function removeEvent( obj, type, fn )
{
   if (obj.removeEventListener) {
      obj.removeEventListener( type, fn, false );
   } else if (obj.detachEvent) {
      obj.detachEvent( "on"+type, obj[type+fn] );
      obj[type+fn] = null;
      obj["e"+type+fn] = null;
   }
}
function animNext() {
	if(pic_cur <= 1 || pic_cur > pic_count)
		pic_cur = 1;
	
	$('#content_bild').animate({opacity: 1.0}, 800, function() {
		$('#content_bild').animate({opacity: 1.0}, 3500, function() {
			$('#content_bild').animate({opacity: 0.0}, 800, "linear", function() {
				$('#content_bild').attr('src', pic_path + pic_cur + ".jpg");
				$('#content_bild').css('height', 'auto');
				$('#content_bild').css('width', 'auto');
				//alert(pic_cur);
				pic_cur++;
				
			});
			
		});
	});
}
