[Mapbender-commits] r1676 - in tags: . 2.4.3_rc1 2.4.3_rc1/http 2.4.3_rc1/http/extensions 2.4.3_rc1/http/html 2.4.3_rc1/http/javascripts 2.4.3_rc1/http/php 2.4.3_rc1/resources/db/mysql 2.4.3_rc1/resources/db/mysql/iso 2.4.3_rc1/resources/db/mysql/utf8 2.4.3_rc1/resources/db/postgresql 2.4.3_rc1/resources/db/postgresql/iso 2.4.3_rc1/resources/db/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Sep 24 05:38:00 EDT 2007


Author: christoph
Date: 2007-09-24 05:37:58 -0400 (Mon, 24 Sep 2007)
New Revision: 1676

Added:
   tags/2.4.3_rc1/
Modified:
   tags/2.4.3_rc1/Changes.txt
   tags/2.4.3_rc1/http/extensions/jquery.js
   tags/2.4.3_rc1/http/extensions/json.js
   tags/2.4.3_rc1/http/extensions/wz_jsgraphics.js
   tags/2.4.3_rc1/http/html/mod_treefolder2.php
   tags/2.4.3_rc1/http/index.php
   tags/2.4.3_rc1/http/javascripts/geometry.js
   tags/2.4.3_rc1/http/javascripts/map.js
   tags/2.4.3_rc1/http/javascripts/map.php
   tags/2.4.3_rc1/http/javascripts/map_obj.js
   tags/2.4.3_rc1/http/javascripts/point.js
   tags/2.4.3_rc1/http/php/mb_listWMCs.php
   tags/2.4.3_rc1/http/php/mod_editGuiWms.php
   tags/2.4.3_rc1/http/php/mod_map1.php
   tags/2.4.3_rc1/http/php/mod_wfs_conf.php
   tags/2.4.3_rc1/http/php/mod_wfs_edit.php
   tags/2.4.3_rc1/resources/db/mysql/iso/mysql_data.sql
   tags/2.4.3_rc1/resources/db/mysql/mysql_schema.sql
   tags/2.4.3_rc1/resources/db/mysql/utf8/mysql_data.sql
   tags/2.4.3_rc1/resources/db/postgresql/iso/pgsql_data.sql
   tags/2.4.3_rc1/resources/db/postgresql/pgsql_schema.sql
   tags/2.4.3_rc1/resources/db/update/update_guis_iso.sql
   tags/2.4.3_rc1/resources/db/update/update_guis_utf8.sql
   tags/2.4.3_rc1/resources/db/update/update_mysql_db.sql
   tags/2.4.3_rc1/resources/db/update/update_postgresql_db.sql
Log:


Copied: tags/2.4.3_rc1 (from rev 1675, tags/2.4.2)

Modified: tags/2.4.3_rc1/Changes.txt
===================================================================
--- tags/2.4.2/Changes.txt	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/Changes.txt	2007-09-24 09:37:58 UTC (rev 1676)
@@ -4,6 +4,11 @@
 
 ------------------------
 
+Changelog 2.4.3
+
+see http://www.mapbender.org/index.php/Template:Changelog_2.4.3
+
+
 Changelog 2.4.2
 
   english

Modified: tags/2.4.3_rc1/http/extensions/jquery.js
===================================================================
--- tags/2.4.2/http/extensions/jquery.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/extensions/jquery.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,2245 +1,11 @@
-/* prevent execution of jQuery if included more than once */
-if(typeof window.jQuery == "undefined") {
 /*
- * jQuery 1.1.2 - New Wave Javascript
+ * jQuery 1.2.1 - New Wave Javascript
  *
  * Copyright (c) 2007 John Resig (jquery.com)
  * Dual licensed under the MIT (MIT-LICENSE.txt)
  * and GPL (GPL-LICENSE.txt) licenses.
  *
- * $Date: 2007-02-28 12:03:00 -0500 (Wed, 28 Feb 2007) $
- * $Rev: 1465 $
+ * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $
+ * $Rev: 3353 $
  */
-
-// Global undefined variable
-window.undefined = window.undefined;
-var jQuery = function(a,c) {
-	// If the context is global, return a new object
-	if ( window == this )
-		return new jQuery(a,c);
-
-	// Make sure that a selection was provided
-	a = a || document;
-	
-	// HANDLE: $(function)
-	// Shortcut for document ready
-	if ( jQuery.isFunction(a) )
-		return new jQuery(document)[ jQuery.fn.ready ? "ready" : "load" ]( a );
-	
-	// Handle HTML strings
-	if ( typeof a  == "string" ) {
-		// HANDLE: $(html) -> $(array)
-		var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);
-		if ( m )
-			a = jQuery.clean( [ m[1] ] );
-		
-		// HANDLE: $(expr)
-		else
-			return new jQuery( c ).find( a );
-	}
-	
-	return this.setArray(
-		// HANDLE: $(array)
-		a.constructor == Array && a ||
-
-		// HANDLE: $(arraylike)
-		// Watch for when an array-like object is passed as the selector
-		(a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||
-
-		// HANDLE: $(*)
-		[ a ] );
-};
-
-// Map over the $ in case of overwrite
-if ( typeof $ != "undefined" )
-	jQuery._$ = $;
-	
-// Map the jQuery namespace to the '$' one
-var $ = jQuery;
-
-jQuery.fn = jQuery.prototype = {
-	jquery: "1.1.2",
-
-	size: function() {
-		return this.length;
-	},
-	
-	length: 0,
-
-	get: function( num ) {
-		return num == undefined ?
-
-			// Return a 'clean' array
-			jQuery.makeArray( this ) :
-
-			// Return just the object
-			this[num];
-	},
-	pushStack: function( a ) {
-		var ret = jQuery(a);
-		ret.prevObject = this;
-		return ret;
-	},
-	setArray: function( a ) {
-		this.length = 0;
-		[].push.apply( this, a );
-		return this;
-	},
-	each: function( fn, args ) {
-		return jQuery.each( this, fn, args );
-	},
-	index: function( obj ) {
-		var pos = -1;
-		this.each(function(i){
-			if ( this == obj ) pos = i;
-		});
-		return pos;
-	},
-
-	attr: function( key, value, type ) {
-		var obj = key;
-		
-		// Look for the case where we're accessing a style value
-		if ( key.constructor == String )
-			if ( value == undefined )
-				return this.length && jQuery[ type || "attr" ]( this[0], key ) || undefined;
-			else {
-				obj = {};
-				obj[ key ] = value;
-			}
-		
-		// Check to see if we're setting style values
-		return this.each(function(index){
-			// Set all the styles
-			for ( var prop in obj )
-				jQuery.attr(
-					type ? this.style : this,
-					prop, jQuery.prop(this, obj[prop], type, index, prop)
-				);
-		});
-	},
-
-	css: function( key, value ) {
-		return this.attr( key, value, "curCSS" );
-	},
-
-	text: function(e) {
-		if ( typeof e == "string" )
-			return this.empty().append( document.createTextNode( e ) );
-
-		var t = "";
-		jQuery.each( e || this, function(){
-			jQuery.each( this.childNodes, function(){
-				if ( this.nodeType != 8 )
-					t += this.nodeType != 1 ?
-						this.nodeValue : jQuery.fn.text([ this ]);
-			});
-		});
-		return t;
-	},
-
-	wrap: function() {
-		// The elements to wrap the target around
-		var a = jQuery.clean(arguments);
-
-		// Wrap each of the matched elements individually
-		return this.each(function(){
-			// Clone the structure that we're using to wrap
-			var b = a[0].cloneNode(true);
-
-			// Insert it before the element to be wrapped
-			this.parentNode.insertBefore( b, this );
-
-			// Find the deepest point in the wrap structure
-			while ( b.firstChild )
-				b = b.firstChild;
-
-			// Move the matched element to within the wrap structure
-			b.appendChild( this );
-		});
-	},
-	append: function() {
-		return this.domManip(arguments, true, 1, function(a){
-			this.appendChild( a );
-		});
-	},
-	prepend: function() {
-		return this.domManip(arguments, true, -1, function(a){
-			this.insertBefore( a, this.firstChild );
-		});
-	},
-	before: function() {
-		return this.domManip(arguments, false, 1, function(a){
-			this.parentNode.insertBefore( a, this );
-		});
-	},
-	after: function() {
-		return this.domManip(arguments, false, -1, function(a){
-			this.parentNode.insertBefore( a, this.nextSibling );
-		});
-	},
-	end: function() {
-		return this.prevObject || jQuery([]);
-	},
-	find: function(t) {
-		return this.pushStack( jQuery.map( this, function(a){
-			return jQuery.find(t,a);
-		}), t );
-	},
-	clone: function(deep) {
-		return this.pushStack( jQuery.map( this, function(a){
-			var a = a.cloneNode( deep != undefined ? deep : true );
-			a.$events = null; // drop $events expando to avoid firing incorrect events
-			return a;
-		}) );
-	},
-
-	filter: function(t) {
-		return this.pushStack(
-			jQuery.isFunction( t ) &&
-			jQuery.grep(this, function(el, index){
-				return t.apply(el, [index])
-			}) ||
-
-			jQuery.multiFilter(t,this) );
-	},
-
-	not: function(t) {
-		return this.pushStack(
-			t.constructor == String &&
-			jQuery.multiFilter(t, this, true) ||
-
-			jQuery.grep(this, function(a) {
-				return ( t.constructor == Array || t.jquery )
-					? jQuery.inArray( a, t ) < 0
-					: a != t;
-			})
-		);
-	},
-
-	add: function(t) {
-		return this.pushStack( jQuery.merge(
-			this.get(),
-			t.constructor == String ?
-				jQuery(t).get() :
-				t.length != undefined && (!t.nodeName || t.nodeName == "FORM") ?
-					t : [t] )
-		);
-	},
-	is: function(expr) {
-		return expr ? jQuery.filter(expr,this).r.length > 0 : false;
-	},
-
-	val: function( val ) {
-		return val == undefined ?
-			( this.length ? this[0].value : null ) :
-			this.attr( "value", val );
-	},
-
-	html: function( val ) {
-		return val == undefined ?
-			( this.length ? this[0].innerHTML : null ) :
-			this.empty().append( val );
-	},
-	domManip: function(args, table, dir, fn){
-		var clone = this.length > 1; 
-		var a = jQuery.clean(args);
-		if ( dir < 0 )
-			a.reverse();
-
-		return this.each(function(){
-			var obj = this;
-
-			if ( table && jQuery.nodeName(this, "table") && jQuery.nodeName(a[0], "tr") )
-				obj = this.getElementsByTagName("tbody")[0] || this.appendChild(document.createElement("tbody"));
-
-			jQuery.each( a, function(){
-				fn.apply( obj, [ clone ? this.cloneNode(true) : this ] );
-			});
-
-		});
-	}
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
-	// copy reference to target object
-	var target = arguments[0],
-		a = 1;
-
-	// extend jQuery itself if only one argument is passed
-	if ( arguments.length == 1 ) {
-		target = this;
-		a = 0;
-	}
-	var prop;
-	while (prop = arguments[a++])
-		// Extend the base object
-		for ( var i in prop ) target[i] = prop[i];
-
-	// Return the modified object
-	return target;
-};
-
-jQuery.extend({
-	noConflict: function() {
-		if ( jQuery._$ )
-			$ = jQuery._$;
-		return jQuery;
-	},
-
-	// This may seem like some crazy code, but trust me when I say that this
-	// is the only cross-browser way to do this. --John
-	isFunction: function( fn ) {
-		return !!fn && typeof fn != "string" && !fn.nodeName && 
-			typeof fn[0] == "undefined" && /function/i.test( fn + "" );
-	},
-	
-	// check if an element is in a XML document
-	isXMLDoc: function(elem) {
-		return elem.tagName && elem.ownerDocument && !elem.ownerDocument.body;
-	},
-
-	nodeName: function( elem, name ) {
-		return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
-	},
-	// args is for internal usage only
-	each: function( obj, fn, args ) {
-		if ( obj.length == undefined )
-			for ( var i in obj )
-				fn.apply( obj[i], args || [i, obj[i]] );
-		else
-			for ( var i = 0, ol = obj.length; i < ol; i++ )
-				if ( fn.apply( obj[i], args || [i, obj[i]] ) === false ) break;
-		return obj;
-	},
-	
-	prop: function(elem, value, type, index, prop){
-			// Handle executable functions
-			if ( jQuery.isFunction( value ) )
-				value = value.call( elem, [index] );
-				
-			// exclude the following css properties to add px
-			var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
-
-			// Handle passing in a number to a CSS property
-			return value && value.constructor == Number && type == "curCSS" && !exclude.test(prop) ?
-				value + "px" :
-				value;
-	},
-
-	className: {
-		// internal only, use addClass("class")
-		add: function( elem, c ){
-			jQuery.each( c.split(/\s+/), function(i, cur){
-				if ( !jQuery.className.has( elem.className, cur ) )
-					elem.className += ( elem.className ? " " : "" ) + cur;
-			});
-		},
-
-		// internal only, use removeClass("class")
-		remove: function( elem, c ){
-			elem.className = c ?
-				jQuery.grep( elem.className.split(/\s+/), function(cur){
-					return !jQuery.className.has( c, cur );	
-				}).join(" ") : "";
-		},
-
-		// internal only, use is(".class")
-		has: function( t, c ) {
-			t = t.className || t;
-			// escape regex characters
-			c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
-			return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
-		}
-	},
-	swap: function(e,o,f) {
-		for ( var i in o ) {
-			e.style["old"+i] = e.style[i];
-			e.style[i] = o[i];
-		}
-		f.apply( e, [] );
-		for ( var i in o )
-			e.style[i] = e.style["old"+i];
-	},
-
-	css: function(e,p) {
-		if ( p == "height" || p == "width" ) {
-			var old = {}, oHeight, oWidth, d = ["Top","Bottom","Right","Left"];
-
-			jQuery.each( d, function(){
-				old["padding" + this] = 0;
-				old["border" + this + "Width"] = 0;
-			});
-
-			jQuery.swap( e, old, function() {
-				if (jQuery.css(e,"display") != "none") {
-					oHeight = e.offsetHeight;
-					oWidth = e.offsetWidth;
-				} else {
-					e = jQuery(e.cloneNode(true))
-						.find(":radio").removeAttr("checked").end()
-						.css({
-							visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
-						}).appendTo(e.parentNode)[0];
-
-					var parPos = jQuery.css(e.parentNode,"position");
-					if ( parPos == "" || parPos == "static" )
-						e.parentNode.style.position = "relative";
-
-					oHeight = e.clientHeight;
-					oWidth = e.clientWidth;
-
-					if ( parPos == "" || parPos == "static" )
-						e.parentNode.style.position = "static";
-
-					e.parentNode.removeChild(e);
-				}
-			});
-
-			return p == "height" ? oHeight : oWidth;
-		}
-
-		return jQuery.curCSS( e, p );
-	},
-
-	curCSS: function(elem, prop, force) {
-		var ret;
-		
-		if (prop == "opacity" && jQuery.browser.msie)
-			return jQuery.attr(elem.style, "opacity");
-			
-		if (prop == "float" || prop == "cssFloat")
-		    prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";
-
-		if (!force && elem.style[prop])
-			ret = elem.style[prop];
-
-		else if (document.defaultView && document.defaultView.getComputedStyle) {
-
-			if (prop == "cssFloat" || prop == "styleFloat")
-				prop = "float";
-
-			prop = prop.replace(/([A-Z])/g,"-$1").toLowerCase();
-			var cur = document.defaultView.getComputedStyle(elem, null);
-
-			if ( cur )
-				ret = cur.getPropertyValue(prop);
-			else if ( prop == "display" )
-				ret = "none";
-			else
-				jQuery.swap(elem, { display: "block" }, function() {
-				    var c = document.defaultView.getComputedStyle(this, "");
-				    ret = c && c.getPropertyValue(prop) || "";
-				});
-
-		} else if (elem.currentStyle) {
-
-			var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
-			ret = elem.currentStyle[prop] || elem.currentStyle[newProp];
-			
-		}
-
-		return ret;
-	},
-	
-	clean: function(a) {
-		var r = [];
-
-		jQuery.each( a, function(i,arg){
-			if ( !arg ) return;
-
-			if ( arg.constructor == Number )
-				arg = arg.toString();
-			
-			 // Convert html string into DOM nodes
-			if ( typeof arg == "string" ) {
-				// Trim whitespace, otherwise indexOf won't work as expected
-				var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];
-
-				var wrap =
-					 // option or optgroup
-					!s.indexOf("<opt") &&
-					[1, "<select>", "</select>"] ||
-					
-					(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
-					[1, "<table>", "</table>"] ||
-					
-					!s.indexOf("<tr") &&
-					[2, "<table><tbody>", "</tbody></table>"] ||
-					
-				 	// <thead> matched above
-					(!s.indexOf("<td") || !s.indexOf("<th")) &&
-					[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
-					
-					[0,"",""];
-
-				// Go to html and back, then peel off extra wrappers
-				div.innerHTML = wrap[1] + s + wrap[2];
-				
-				// Move to the right depth
-				while ( wrap[0]-- )
-					div = div.firstChild;
-				
-				// Remove IE's autoinserted <tbody> from table fragments
-				if ( jQuery.browser.msie ) {
-					
-					// String was a <table>, *may* have spurious <tbody>
-					if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 ) 
-						tb = div.firstChild && div.firstChild.childNodes;
-						
-					// String was a bare <thead> or <tfoot>
-					else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
-						tb = div.childNodes;
-
-					for ( var n = tb.length-1; n >= 0 ; --n )
-						if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
-							tb[n].parentNode.removeChild(tb[n]);
-					
-				}
-				
-				arg = [];
-				for (var i=0, l=div.childNodes.length; i<l; i++)
-					arg.push(div.childNodes[i]);
-			}
-
-			if ( arg.length === 0 && !jQuery.nodeName(arg, "form") )
-				return;
-			
-			if ( arg[0] == undefined || jQuery.nodeName(arg, "form") )
-				r.push( arg );
-			else
-				r = jQuery.merge( r, arg );
-
-		});
-
-		return r;
-	},
-	
-	attr: function(elem, name, value){
-		var fix = jQuery.isXMLDoc(elem) ? {} : {
-			"for": "htmlFor",
-			"class": "className",
-			"float": jQuery.browser.msie ? "styleFloat" : "cssFloat",
-			cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-			innerHTML: "innerHTML",
-			className: "className",
-			value: "value",
-			disabled: "disabled",
-			checked: "checked",
-			readonly: "readOnly",
-			selected: "selected"
-		};
-		
-		// IE actually uses filters for opacity ... elem is actually elem.style
-		if ( name == "opacity" && jQuery.browser.msie && value != undefined ) {
-			// IE has trouble with opacity if it does not have layout
-			// Force it by setting the zoom level
-			elem.zoom = 1; 
-
-			// Set the alpha filter to set the opacity
-			return elem.filter = elem.filter.replace(/alpha\([^\)]*\)/gi,"") +
-				( value == 1 ? "" : "alpha(opacity=" + value * 100 + ")" );
-
-		} else if ( name == "opacity" && jQuery.browser.msie )
-			return elem.filter ? 
-				parseFloat( elem.filter.match(/alpha\(opacity=(.*)\)/)[1] ) / 100 : 1;
-		
-		// Mozilla doesn't play well with opacity 1
-		if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
-			value = 0.9999;
-			
-
-		// Certain attributes only work when accessed via the old DOM 0 way
-		if ( fix[name] ) {
-			if ( value != undefined ) elem[fix[name]] = value;
-			return elem[fix[name]];
-
-		} else if ( value == undefined && jQuery.browser.msie && jQuery.nodeName(elem, "form") && (name == "action" || name == "method") )
-			return elem.getAttributeNode(name).nodeValue;
-
-		// IE elem.getAttribute passes even for style
-		else if ( elem.tagName ) {
-			if ( value != undefined ) elem.setAttribute( name, value );
-			if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) ) 
-				return elem.getAttribute( name, 2 );
-			return elem.getAttribute( name );
-
-		// elem is actually elem.style ... set the style
-		} else {
-			name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
-			if ( value != undefined ) elem[name] = value;
-			return elem[name];
-		}
-	},
-	trim: function(t){
-		return t.replace(/^\s+|\s+$/g, "");
-	},
-
-	makeArray: function( a ) {
-		var r = [];
-
-		if ( a.constructor != Array )
-			for ( var i = 0, al = a.length; i < al; i++ )
-				r.push( a[i] );
-		else
-			r = a.slice( 0 );
-
-		return r;
-	},
-
-	inArray: function( b, a ) {
-		for ( var i = 0, al = a.length; i < al; i++ )
-			if ( a[i] == b )
-				return i;
-		return -1;
-	},
-	merge: function(first, second) {
-		var r = [].slice.call( first, 0 );
-
-		// Now check for duplicates between the two arrays
-		// and only add the unique items
-		for ( var i = 0, sl = second.length; i < sl; i++ )
-			// Check for duplicates
-			if ( jQuery.inArray( second[i], r ) == -1 )
-				// The item is unique, add it
-				first.push( second[i] );
-
-		return first;
-	},
-	grep: function(elems, fn, inv) {
-		// If a string is passed in for the function, make a function
-		// for it (a handy shortcut)
-		if ( typeof fn == "string" )
-			fn = new Function("a","i","return " + fn);
-
-		var result = [];
-
-		// Go through the array, only saving the items
-		// that pass the validator function
-		for ( var i = 0, el = elems.length; i < el; i++ )
-			if ( !inv && fn(elems[i],i) || inv && !fn(elems[i],i) )
-				result.push( elems[i] );
-
-		return result;
-	},
-	map: function(elems, fn) {
-		// If a string is passed in for the function, make a function
-		// for it (a handy shortcut)
-		if ( typeof fn == "string" )
-			fn = new Function("a","return " + fn);
-
-		var result = [], r = [];
-
-		// Go through the array, translating each of the items to their
-		// new value (or values).
-		for ( var i = 0, el = elems.length; i < el; i++ ) {
-			var val = fn(elems[i],i);
-
-			if ( val !== null && val != undefined ) {
-				if ( val.constructor != Array ) val = [val];
-				result = result.concat( val );
-			}
-		}
-
-		var r = result.length ? [ result[0] ] : [];
-
-		check: for ( var i = 1, rl = result.length; i < rl; i++ ) {
-			for ( var j = 0; j < i; j++ )
-				if ( result[i] == r[j] )
-					continue check;
-
-			r.push( result[i] );
-		}
-
-		return r;
-	}
-});
- 
-/*
- * Whether the W3C compliant box model is being used.
- *
- * @property
- * @name $.boxModel
- * @type Boolean
- * @cat JavaScript
- */
-new function() {
-	var b = navigator.userAgent.toLowerCase();
-
-	// Figure out what browser is being used
-	jQuery.browser = {
-		safari: /webkit/.test(b),
-		opera: /opera/.test(b),
-		msie: /msie/.test(b) && !/opera/.test(b),
-		mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
-	};
-
-	// Check to see if the W3C box model is being used
-	jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
-};
-
-jQuery.each({
-	parent: "a.parentNode",
-	parents: "jQuery.parents(a)",
-	next: "jQuery.nth(a,2,'nextSibling')",
-	prev: "jQuery.nth(a,2,'previousSibling')",
-	siblings: "jQuery.sibling(a.parentNode.firstChild,a)",
-	children: "jQuery.sibling(a.firstChild)"
-}, function(i,n){
-	jQuery.fn[ i ] = function(a) {
-		var ret = jQuery.map(this,n);
-		if ( a && typeof a == "string" )
-			ret = jQuery.multiFilter(a,ret);
-		return this.pushStack( ret );
-	};
-});
-
-jQuery.each({
-	appendTo: "append",
-	prependTo: "prepend",
-	insertBefore: "before",
-	insertAfter: "after"
-}, function(i,n){
-	jQuery.fn[ i ] = function(){
-		var a = arguments;
-		return this.each(function(){
-			for ( var j = 0, al = a.length; j < al; j++ )
-				jQuery(a[j])[n]( this );
-		});
-	};
-});
-
-jQuery.each( {
-	removeAttr: function( key ) {
-		jQuery.attr( this, key, "" );
-		this.removeAttribute( key );
-	},
-	addClass: function(c){
-		jQuery.className.add(this,c);
-	},
-	removeClass: function(c){
-		jQuery.className.remove(this,c);
-	},
-	toggleClass: function( c ){
-		jQuery.className[ jQuery.className.has(this,c) ? "remove" : "add" ](this, c);
-	},
-	remove: function(a){
-		if ( !a || jQuery.filter( a, [this] ).r.length )
-			this.parentNode.removeChild( this );
-	},
-	empty: function() {
-		while ( this.firstChild )
-			this.removeChild( this.firstChild );
-	}
-}, function(i,n){
-	jQuery.fn[ i ] = function() {
-		return this.each( n, arguments );
-	};
-});
-
-jQuery.each( [ "eq", "lt", "gt", "contains" ], function(i,n){
-	jQuery.fn[ n ] = function(num,fn) {
-		return this.filter( ":" + n + "(" + num + ")", fn );
-	};
-});
-
-jQuery.each( [ "height", "width" ], function(i,n){
-	jQuery.fn[ n ] = function(h) {
-		return h == undefined ?
-			( this.length ? jQuery.css( this[0], n ) : null ) :
-			this.css( n, h.constructor == String ? h : h + "px" );
-	};
-});
-jQuery.extend({
-	expr: {
-		"": "m[2]=='*'||jQuery.nodeName(a,m[2])",
-		"#": "a.getAttribute('id')==m[2]",
-		":": {
-			// Position Checks
-			lt: "i<m[3]-0",
-			gt: "i>m[3]-0",
-			nth: "m[3]-0==i",
-			eq: "m[3]-0==i",
-			first: "i==0",
-			last: "i==r.length-1",
-			even: "i%2==0",
-			odd: "i%2",
-
-			// Child Checks
-			"nth-child": "jQuery.nth(a.parentNode.firstChild,m[3],'nextSibling',a)==a",
-			"first-child": "jQuery.nth(a.parentNode.firstChild,1,'nextSibling')==a",
-			"last-child": "jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a",
-			"only-child": "jQuery.sibling(a.parentNode.firstChild).length==1",
-
-			// Parent Checks
-			parent: "a.firstChild",
-			empty: "!a.firstChild",
-
-			// Text Check
-			contains: "jQuery.fn.text.apply([a]).indexOf(m[3])>=0",
-
-			// Visibility
-			visible: 'a.type!="hidden"&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',
-			hidden: 'a.type=="hidden"||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',
-
-			// Form attributes
-			enabled: "!a.disabled",
-			disabled: "a.disabled",
-			checked: "a.checked",
-			selected: "a.selected||jQuery.attr(a,'selected')",
-
-			// Form elements
-			text: "a.type=='text'",
-			radio: "a.type=='radio'",
-			checkbox: "a.type=='checkbox'",
-			file: "a.type=='file'",
-			password: "a.type=='password'",
-			submit: "a.type=='submit'",
-			image: "a.type=='image'",
-			reset: "a.type=='reset'",
-			button: 'a.type=="button"||jQuery.nodeName(a,"button")',
-			input: "/input|select|textarea|button/i.test(a.nodeName)"
-		},
-		".": "jQuery.className.has(a,m[2])",
-		"@": {
-			"=": "z==m[4]",
-			"!=": "z!=m[4]",
-			"^=": "z&&!z.indexOf(m[4])",
-			"$=": "z&&z.substr(z.length - m[4].length,m[4].length)==m[4]",
-			"*=": "z&&z.indexOf(m[4])>=0",
-			"": "z",
-			_resort: function(m){
-				return ["", m[1], m[3], m[2], m[5]];
-			},
-			_prefix: "z=a[m[3]];if(!z||/href|src/.test(m[3]))z=jQuery.attr(a,m[3]);"
-		},
-		"[": "jQuery.find(m[2],a).length"
-	},
-	
-	// The regular expressions that power the parsing engine
-	parse: [
-		// Match: [@value='test'], [@foo]
-		/^\[ *(@)([a-z0-9_-]*) *([!*$^=]*) *('?"?)(.*?)\4 *\]/i,
-
-		// Match: [div], [div p]
-		/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,
-
-		// Match: :contains('foo')
-		/^(:)([a-z0-9_-]*)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/i,
-
-		// Match: :even, :last-chlid
-		/^([:.#]*)([a-z0-9_*-]*)/i
-	],
-
-	token: [
-		/^(\/?\.\.)/, "a.parentNode",
-		/^(>|\/)/, "jQuery.sibling(a.firstChild)",
-		/^(\+)/, "jQuery.nth(a,2,'nextSibling')",
-		/^(~)/, function(a){
-			var s = jQuery.sibling(a.parentNode.firstChild);
-			return s.slice(jQuery.inArray(a,s) + 1);
-		}
-	],
-
-	multiFilter: function( expr, elems, not ) {
-		var old, cur = [];
-
-		while ( expr && expr != old ) {
-			old = expr;
-			var f = jQuery.filter( expr, elems, not );
-			expr = f.t.replace(/^\s*,\s*/, "" );
-			cur = not ? elems = f.r : jQuery.merge( cur, f.r );
-		}
-
-		return cur;
-	},
-	find: function( t, context ) {
-		// Quickly handle non-string expressions
-		if ( typeof t != "string" )
-			return [ t ];
-
-		// Make sure that the context is a DOM Element
-		if ( context && !context.nodeType )
-			context = null;
-
-		// Set the correct context (if none is provided)
-		context = context || document;
-
-		// Handle the common XPath // expression
-		if ( !t.indexOf("//") ) {
-			context = context.documentElement;
-			t = t.substr(2,t.length);
-
-		// And the / root expression
-		} else if ( !t.indexOf("/") ) {
-			context = context.documentElement;
-			t = t.substr(1,t.length);
-			if ( t.indexOf("/") >= 1 )
-				t = t.substr(t.indexOf("/"),t.length);
-		}
-
-		// Initialize the search
-		var ret = [context], done = [], last = null;
-
-		// Continue while a selector expression exists, and while
-		// we're no longer looping upon ourselves
-		while ( t && last != t ) {
-			var r = [];
-			last = t;
-
-			t = jQuery.trim(t).replace( /^\/\//i, "" );
-
-			var foundToken = false;
-
-			// An attempt at speeding up child selectors that
-			// point to a specific element tag
-			var re = /^[\/>]\s*([a-z0-9*-]+)/i;
-			var m = re.exec(t);
-
-			if ( m ) {
-				// Perform our own iteration and filter
-				jQuery.each( ret, function(){
-					for ( var c = this.firstChild; c; c = c.nextSibling )
-						if ( c.nodeType == 1 && ( jQuery.nodeName(c, m[1]) || m[1] == "*" ) )
-							r.push( c );
-				});
-
-				ret = r;
-				t = t.replace( re, "" );
-				if ( t.indexOf(" ") == 0 ) continue;
-				foundToken = true;
-			} else {
-				// Look for pre-defined expression tokens
-				for ( var i = 0; i < jQuery.token.length; i += 2 ) {
-					// Attempt to match each, individual, token in
-					// the specified order
-					var re = jQuery.token[i];
-					var m = re.exec(t);
-
-					// If the token match was found
-					if ( m ) {
-						// Map it against the token's handler
-						r = ret = jQuery.map( ret, jQuery.isFunction( jQuery.token[i+1] ) ?
-							jQuery.token[i+1] :
-							function(a){ return eval(jQuery.token[i+1]); });
-
-						// And remove the token
-						t = jQuery.trim( t.replace( re, "" ) );
-						foundToken = true;
-						break;
-					}
-				}
-			}
-
-			// See if there's still an expression, and that we haven't already
-			// matched a token
-			if ( t && !foundToken ) {
-				// Handle multiple expressions
-				if ( !t.indexOf(",") ) {
-					// Clean the result set
-					if ( ret[0] == context ) ret.shift();
-
-					// Merge the result sets
-					jQuery.merge( done, ret );
-
-					// Reset the context
-					r = ret = [context];
-
-					// Touch up the selector string
-					t = " " + t.substr(1,t.length);
-
-				} else {
-					// Optomize for the case nodeName#idName
-					var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;
-					var m = re2.exec(t);
-					
-					// Re-organize the results, so that they're consistent
-					if ( m ) {
-					   m = [ 0, m[2], m[3], m[1] ];
-
-					} else {
-						// Otherwise, do a traditional filter check for
-						// ID, class, and element selectors
-						re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
-						m = re2.exec(t);
-					}
-
-					// Try to do a global search by ID, where we can
-					if ( m[1] == "#" && ret[ret.length-1].getElementById ) {
-						// Optimization for HTML document case
-						var oid = ret[ret.length-1].getElementById(m[2]);
-						
-						// Do a quick check for the existence of the actual ID attribute
-						// to avoid selecting by the name attribute in IE
-						if ( jQuery.browser.msie && oid && oid.id != m[2] )
-							oid = jQuery('[@id="'+m[2]+'"]', ret[ret.length-1])[0];
-
-						// Do a quick check for node name (where applicable) so
-						// that div#foo searches will be really fast
-						ret = r = oid && (!m[3] || jQuery.nodeName(oid, m[3])) ? [oid] : [];
-
-					} else {
-						// Pre-compile a regular expression to handle class searches
-						if ( m[1] == "." )
-							var rec = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
-
-						// We need to find all descendant elements, it is more
-						// efficient to use getAll() when we are already further down
-						// the tree - we try to recognize that here
-						jQuery.each( ret, function(){
-							// Grab the tag name being searched for
-							var tag = m[1] != "" || m[0] == "" ? "*" : m[2];
-
-							// Handle IE7 being really dumb about <object>s
-							if ( jQuery.nodeName(this, "object") && tag == "*" )
-								tag = "param";
-
-							jQuery.merge( r,
-								m[1] != "" && ret.length != 1 ?
-									jQuery.getAll( this, [], m[1], m[2], rec ) :
-									this.getElementsByTagName( tag )
-							);
-						});
-
-						// It's faster to filter by class and be done with it
-						if ( m[1] == "." && ret.length == 1 )
-							r = jQuery.grep( r, function(e) {
-								return rec.test(e.className);
-							});
-
-						// Same with ID filtering
-						if ( m[1] == "#" && ret.length == 1 ) {
-							// Remember, then wipe out, the result set
-							var tmp = r;
-							r = [];
-
-							// Then try to find the element with the ID
-							jQuery.each( tmp, function(){
-								if ( this.getAttribute("id") == m[2] ) {
-									r = [ this ];
-									return false;
-								}
-							});
-						}
-
-						ret = r;
-					}
-
-					t = t.replace( re2, "" );
-				}
-
-			}
-
-			// If a selector string still exists
-			if ( t ) {
-				// Attempt to filter it
-				var val = jQuery.filter(t,r);
-				ret = r = val.r;
-				t = jQuery.trim(val.t);
-			}
-		}
-
-		// Remove the root context
-		if ( ret && ret[0] == context ) ret.shift();
-
-		// And combine the results
-		jQuery.merge( done, ret );
-
-		return done;
-	},
-
-	filter: function(t,r,not) {
-		// Look for common filter expressions
-		while ( t && /^[a-z[({<*:.#]/i.test(t) ) {
-
-			var p = jQuery.parse, m;
-
-			jQuery.each( p, function(i,re){
-		
-				// Look for, and replace, string-like sequences
-				// and finally build a regexp out of it
-				m = re.exec( t );
-
-				if ( m ) {
-					// Remove what we just matched
-					t = t.substring( m[0].length );
-
-					// Re-organize the first match
-					if ( jQuery.expr[ m[1] ]._resort )
-						m = jQuery.expr[ m[1] ]._resort( m );
-
-					return false;
-				}
-			});
-
-			// :not() is a special case that can be optimized by
-			// keeping it out of the expression list
-			if ( m[1] == ":" && m[2] == "not" )
-				r = jQuery.filter(m[3], r, true).r;
-
-			// Handle classes as a special case (this will help to
-			// improve the speed, as the regexp will only be compiled once)
-			else if ( m[1] == "." ) {
-
-				var re = new RegExp("(^|\\s)" + m[2] + "(\\s|$)");
-				r = jQuery.grep( r, function(e){
-					return re.test(e.className || "");
-				}, not);
-
-			// Otherwise, find the expression to execute
-			} else {
-				var f = jQuery.expr[m[1]];
-				if ( typeof f != "string" )
-					f = jQuery.expr[m[1]][m[2]];
-
-				// Build a custom macro to enclose it
-				eval("f = function(a,i){" +
-					( jQuery.expr[ m[1] ]._prefix || "" ) +
-					"return " + f + "}");
-
-				// Execute it against the current filter
-				r = jQuery.grep( r, f, not );
-			}
-		}
-
-		// Return an array of filtered elements (r)
-		// and the modified expression string (t)
-		return { r: r, t: t };
-	},
-	
-	getAll: function( o, r, token, name, re ) {
-		for ( var s = o.firstChild; s; s = s.nextSibling )
-			if ( s.nodeType == 1 ) {
-				var add = true;
-
-				if ( token == "." )
-					add = s.className && re.test(s.className);
-				else if ( token == "#" )
-					add = s.getAttribute("id") == name;
-	
-				if ( add )
-					r.push( s );
-
-				if ( token == "#" && r.length ) break;
-
-				if ( s.firstChild )
-					jQuery.getAll( s, r, token, name, re );
-			}
-
-		return r;
-	},
-	parents: function( elem ){
-		var matched = [];
-		var cur = elem.parentNode;
-		while ( cur && cur != document ) {
-			matched.push( cur );
-			cur = cur.parentNode;
-		}
-		return matched;
-	},
-	nth: function(cur,result,dir,elem){
-		result = result || 1;
-		var num = 0;
-		for ( ; cur; cur = cur[dir] ) {
-			if ( cur.nodeType == 1 ) num++;
-			if ( num == result || result == "even" && num % 2 == 0 && num > 1 && cur == elem ||
-				result == "odd" && num % 2 == 1 && cur == elem ) return cur;
-		}
-	},
-	sibling: function( n, elem ) {
-		var r = [];
-
-		for ( ; n; n = n.nextSibling ) {
-			if ( n.nodeType == 1 && (!elem || n != elem) )
-				r.push( n );
-		}
-
-		return r;
-	}
-});
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from 
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
-
-	// Bind an event to an element
-	// Original by Dean Edwards
-	add: function(element, type, handler, data) {
-		// For whatever reason, IE has trouble passing the window object
-		// around, causing it to be cloned in the process
-		if ( jQuery.browser.msie && element.setInterval != undefined )
-			element = window;
-
-		// if data is passed, bind to handler
-		if( data ) 
-			handler.data = data;
-
-		// Make sure that the function being executed has a unique ID
-		if ( !handler.guid )
-			handler.guid = this.guid++;
-
-		// Init the element's event structure
-		if (!element.$events)
-			element.$events = {};
-
-		// Get the current list of functions bound to this event
-		var handlers = element.$events[type];
-
-		// If it hasn't been initialized yet
-		if (!handlers) {
-			// Init the event handler queue
-			handlers = element.$events[type] = {};
-
-			// Remember an existing handler, if it's already there
-			if (element["on" + type])
-				handlers[0] = element["on" + type];
-		}
-
-		// Add the function to the element's handler list
-		handlers[handler.guid] = handler;
-
-		// And bind the global event handler to the element
-		element["on" + type] = this.handle;
-
-		// Remember the function in a global list (for triggering)
-		if (!this.global[type])
-			this.global[type] = [];
-		this.global[type].push( element );
-	},
-
-	guid: 1,
-	global: {},
-
-	// Detach an event or set of events from an element
-	remove: function(element, type, handler) {
-		if (element.$events) {
-			var i,j,k;
-			if ( type && type.type ) { // type is actually an event object here
-				handler = type.handler;
-				type    = type.type;
-			}
-			
-			if (type && element.$events[type])
-				// remove the given handler for the given type
-				if ( handler )
-					delete element.$events[type][handler.guid];
-					
-				// remove all handlers for the given type
-				else
-					for ( i in element.$events[type] )
-						delete element.$events[type][i];
-						
-			// remove all handlers		
-			else
-				for ( j in element.$events )
-					this.remove( element, j );
-			
-			// remove event handler if no more handlers exist
-			for ( k in element.$events[type] )
-				if (k) {
-					k = true;
-					break;
-				}
-			if (!k) element["on" + type] = null;
-		}
-	},
-
-	trigger: function(type, data, element) {
-		// Clone the incoming data, if any
-		data = jQuery.makeArray(data || []);
-
-		// Handle a global trigger
-		if ( !element )
-			jQuery.each( this.global[type] || [], function(){
-				jQuery.event.trigger( type, data, this );
-			});
-
-		// Handle triggering a single element
-		else {
-			var handler = element["on" + type ], val,
-				fn = jQuery.isFunction( element[ type ] );
-
-			if ( handler ) {
-				// Pass along a fake event
-				data.unshift( this.fix({ type: type, target: element }) );
-	
-				// Trigger the event
-				if ( (val = handler.apply( element, data )) !== false )
-					this.triggered = true;
-			}
-
-			if ( fn && val !== false )
-				element[ type ]();
-
-			this.triggered = false;
-		}
-	},
-
-	handle: function(event) {
-		// Handle the second event of a trigger and when
-		// an event is called after a page has unloaded
-		if ( typeof jQuery == "undefined" || jQuery.event.triggered ) return;
-
-		// Empty object is for triggered events with no data
-		event = jQuery.event.fix( event || window.event || {} ); 
-
-		// returned undefined or false
-		var returnValue;
-
-		var c = this.$events[event.type];
-
-		var args = [].slice.call( arguments, 1 );
-		args.unshift( event );
-
-		for ( var j in c ) {
-			// Pass in a reference to the handler function itself
-			// So that we can later remove it
-			args[0].handler = c[j];
-			args[0].data = c[j].data;
-
-			if ( c[j].apply( this, args ) === false ) {
-				event.preventDefault();
-				event.stopPropagation();
-				returnValue = false;
-			}
-		}
-
-		// Clean up added properties in IE to prevent memory leak
-		if (jQuery.browser.msie) event.target = event.preventDefault = event.stopPropagation = event.handler = event.data = null;
-
-		return returnValue;
-	},
-
-	fix: function(event) {
-		// Fix target property, if necessary
-		if ( !event.target && event.srcElement )
-			event.target = event.srcElement;
-
-		// Calculate pageX/Y if missing and clientX/Y available
-		if ( event.pageX == undefined && event.clientX != undefined ) {
-			var e = document.documentElement, b = document.body;
-			event.pageX = event.clientX + (e.scrollLeft || b.scrollLeft);
-			event.pageY = event.clientY + (e.scrollTop || b.scrollTop);
-		}
-				
-		// check if target is a textnode (safari)
-		if (jQuery.browser.safari && event.target.nodeType == 3) {
-			// store a copy of the original event object 
-			// and clone because target is read only
-			var originalEvent = event;
-			event = jQuery.extend({}, originalEvent);
-			
-			// get parentnode from textnode
-			event.target = originalEvent.target.parentNode;
-			
-			// add preventDefault and stopPropagation since 
-			// they will not work on the clone
-			event.preventDefault = function() {
-				return originalEvent.preventDefault();
-			};
-			event.stopPropagation = function() {
-				return originalEvent.stopPropagation();
-			};
-		}
-		
-		// fix preventDefault and stopPropagation
-		if (!event.preventDefault)
-			event.preventDefault = function() {
-				this.returnValue = false;
-			};
-			
-		if (!event.stopPropagation)
-			event.stopPropagation = function() {
-				this.cancelBubble = true;
-			};
-			
-		return event;
-	}
-};
-
-jQuery.fn.extend({
-	bind: function( type, data, fn ) {
-		return this.each(function(){
-			jQuery.event.add( this, type, fn || data, data );
-		});
-	},
-	one: function( type, data, fn ) {
-		return this.each(function(){
-			jQuery.event.add( this, type, function(event) {
-				jQuery(this).unbind(event);
-				return (fn || data).apply( this, arguments);
-			}, data);
-		});
-	},
-	unbind: function( type, fn ) {
-		return this.each(function(){
-			jQuery.event.remove( this, type, fn );
-		});
-	},
-	trigger: function( type, data ) {
-		return this.each(function(){
-			jQuery.event.trigger( type, data, this );
-		});
-	},
-	toggle: function() {
-		// Save reference to arguments for access in closure
-		var a = arguments;
-
-		return this.click(function(e) {
-			// Figure out which function to execute
-			this.lastToggle = this.lastToggle == 0 ? 1 : 0;
-			
-			// Make sure that clicks stop
-			e.preventDefault();
-			
-			// and execute the function
-			return a[this.lastToggle].apply( this, [e] ) || false;
-		});
-	},
-	hover: function(f,g) {
-		
-		// A private function for handling mouse 'hovering'
-		function handleHover(e) {
-			// Check if mouse(over|out) are still within the same parent element
-			var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
-	
-			// Traverse up the tree
-			while ( p && p != this ) try { p = p.parentNode } catch(e) { p = this; };
-			
-			// If we actually just moused on to a sub-element, ignore it
-			if ( p == this ) return false;
-			
-			// Execute the right function
-			return (e.type == "mouseover" ? f : g).apply(this, [e]);
-		}
-		
-		// Bind the function to the two event listeners
-		return this.mouseover(handleHover).mouseout(handleHover);
-	},
-	ready: function(f) {
-		// If the DOM is already ready
-		if ( jQuery.isReady )
-			// Execute the function immediately
-			f.apply( document, [jQuery] );
-			
-		// Otherwise, remember the function for later
-		else {
-			// Add the function to the wait list
-			jQuery.readyList.push( function() { return f.apply(this, [jQuery]) } );
-		}
-	
-		return this;
-	}
-});
-
-jQuery.extend({
-	/*
-	 * All the code that makes DOM Ready work nicely.
-	 */
-	isReady: false,
-	readyList: [],
-	
-	// Handle when the DOM is ready
-	ready: function() {
-		// Make sure that the DOM is not already loaded
-		if ( !jQuery.isReady ) {
-			// Remember that the DOM is ready
-			jQuery.isReady = true;
-			
-			// If there are functions bound, to execute
-			if ( jQuery.readyList ) {
-				// Execute all of them
-				jQuery.each( jQuery.readyList, function(){
-					this.apply( document );
-				});
-				
-				// Reset the list of functions
-				jQuery.readyList = null;
-			}
-			// Remove event lisenter to avoid memory leak
-			if ( jQuery.browser.mozilla || jQuery.browser.opera )
-				document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
-		}
-	}
-});
-
-new function(){
-
-	jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
-		"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," + 
-		"submit,keydown,keypress,keyup,error").split(","), function(i,o){
-		
-		// Handle event binding
-		jQuery.fn[o] = function(f){
-			return f ? this.bind(o, f) : this.trigger(o);
-		};
-			
-	});
-	
-	// If Mozilla is used
-	if ( jQuery.browser.mozilla || jQuery.browser.opera )
-		// Use the handy event callback
-		document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
-	
-	// If IE is used, use the excellent hack by Matthias Miller
-	// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
-	else if ( jQuery.browser.msie ) {
-	
-		// Only works if you document.write() it
-		document.write("<scr" + "ipt id=__ie_init defer=true " + 
-			"src=//:><\/script>");
-	
-		// Use the defer script hack
-		var script = document.getElementById("__ie_init");
-		
-		// script does not exist if jQuery is loaded dynamically
-		if ( script ) 
-			script.onreadystatechange = function() {
-				if ( this.readyState != "complete" ) return;
-				this.parentNode.removeChild( this );
-				jQuery.ready();
-			};
-	
-		// Clear from memory
-		script = null;
-	
-	// If Safari  is used
-	} else if ( jQuery.browser.safari )
-		// Continually check to see if the document.readyState is valid
-		jQuery.safariTimer = setInterval(function(){
-			// loaded and complete are both valid states
-			if ( document.readyState == "loaded" || 
-				document.readyState == "complete" ) {
-	
-				// If either one are found, remove the timer
-				clearInterval( jQuery.safariTimer );
-				jQuery.safariTimer = null;
-	
-				// and execute any waiting functions
-				jQuery.ready();
-			}
-		}, 10); 
-
-	// A fallback to window.onload, that will always work
-	jQuery.event.add( window, "load", jQuery.ready );
-	
-};
-
-// Clean up after IE to avoid memory leaks
-if (jQuery.browser.msie)
-	jQuery(window).one("unload", function() {
-		var global = jQuery.event.global;
-		for ( var type in global ) {
-			var els = global[type], i = els.length;
-			if ( i && type != 'unload' )
-				do
-					jQuery.event.remove(els[i-1], type);
-				while (--i);
-		}
-	});
-jQuery.fn.extend({
-	loadIfModified: function( url, params, callback ) {
-		this.load( url, params, callback, 1 );
-	},
-	load: function( url, params, callback, ifModified ) {
-		if ( jQuery.isFunction( url ) )
-			return this.bind("load", url);
-
-		callback = callback || function(){};
-
-		// Default to a GET request
-		var type = "GET";
-
-		// If the second parameter was provided
-		if ( params )
-			// If it's a function
-			if ( jQuery.isFunction( params ) ) {
-				// We assume that it's the callback
-				callback = params;
-				params = null;
-
-			// Otherwise, build a param string
-			} else {
-				params = jQuery.param( params );
-				type = "POST";
-			}
-
-		var self = this;
-
-		// Request the remote document
-		jQuery.ajax({
-			url: url,
-			type: type,
-			data: params,
-			ifModified: ifModified,
-			complete: function(res, status){
-				if ( status == "success" || !ifModified && status == "notmodified" )
-					// Inject the HTML into all the matched elements
-					self.attr("innerHTML", res.responseText)
-					  // Execute all the scripts inside of the newly-injected HTML
-					  .evalScripts()
-					  // Execute callback
-					  .each( callback, [res.responseText, status, res] );
-				else
-					callback.apply( self, [res.responseText, status, res] );
-			}
-		});
-		return this;
-	},
-	serialize: function() {
-		return jQuery.param( this );
-	},
-	evalScripts: function() {
-		return this.find("script").each(function(){
-			if ( this.src )
-				jQuery.getScript( this.src );
-			else
-				jQuery.globalEval( this.text || this.textContent || this.innerHTML || "" );
-		}).end();
-	}
-
-});
-
-// If IE is used, create a wrapper for the XMLHttpRequest object
-if ( !window.XMLHttpRequest )
-	XMLHttpRequest = function(){
-		return new ActiveXObject("Microsoft.XMLHTTP");
-	};
-
-// Attach a bunch of functions for handling common AJAX events
-
-jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
-	jQuery.fn[o] = function(f){
-		return this.bind(o, f);
-	};
-});
-
-jQuery.extend({
-	get: function( url, data, callback, type, ifModified ) {
-		// shift arguments if data argument was ommited
-		if ( jQuery.isFunction( data ) ) {
-			callback = data;
-			data = null;
-		}
-		
-		return jQuery.ajax({
-			url: url,
-			data: data,
-			success: callback,
-			dataType: type,
-			ifModified: ifModified
-		});
-	},
-	getIfModified: function( url, data, callback, type ) {
-		return jQuery.get(url, data, callback, type, 1);
-	},
-	getScript: function( url, callback ) {
-		return jQuery.get(url, null, callback, "script");
-	},
-	getJSON: function( url, data, callback ) {
-		return jQuery.get(url, data, callback, "json");
-	},
-	post: function( url, data, callback, type ) {
-		if ( jQuery.isFunction( data ) ) {
-			callback = data;
-			data = {};
-		}
-
-		return jQuery.ajax({
-			type: "POST",
-			url: url,
-			data: data,
-			success: callback,
-			dataType: type
-		});
-	},
-
-	// timeout (ms)
-	//timeout: 0,
-	ajaxTimeout: function( timeout ) {
-		jQuery.ajaxSettings.timeout = timeout;
-	},
-	ajaxSetup: function( settings ) {
-		jQuery.extend( jQuery.ajaxSettings, settings );
-	},
-
-	ajaxSettings: {
-		global: true,
-		type: "GET",
-		timeout: 0,
-		contentType: "application/x-www-form-urlencoded",
-		processData: true,
-		async: true,
-		data: null
-	},
-	
-	// Last-Modified header cache for next request
-	lastModified: {},
-	ajax: function( s ) {
-		// TODO introduce global settings, allowing the client to modify them for all requests, not only timeout
-		s = jQuery.extend({}, jQuery.ajaxSettings, s);
-
-		// if data available
-		if ( s.data ) {
-			// convert data if not already a string
-			if (s.processData && typeof s.data != "string")
-    			s.data = jQuery.param(s.data);
-			// append data to url for get requests
-			if( s.type.toLowerCase() == "get" ) {
-				// "?" + data or "&" + data (in case there are already params)
-				s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;
-				// IE likes to send both get and post data, prevent this
-				s.data = null;
-			}
-		}
-
-		// Watch for a new set of requests
-		if ( s.global && ! jQuery.active++ )
-			jQuery.event.trigger( "ajaxStart" );
-
-		var requestDone = false;
-
-		// Create the request object
-		var xml = new XMLHttpRequest();
-
-		// Open the socket
-		xml.open(s.type, s.url, s.async);
-
-		// Set the correct header, if data is being sent
-		if ( s.data )
-			xml.setRequestHeader("Content-Type", s.contentType);
-
-		// Set the If-Modified-Since header, if ifModified mode.
-		if ( s.ifModified )
-			xml.setRequestHeader("If-Modified-Since",
-				jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
-
-		// Set header so the called script knows that it's an XMLHttpRequest
-		xml.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
-		// Make sure the browser sends the right content length
-		if ( xml.overrideMimeType )
-			xml.setRequestHeader("Connection", "close");
-			
-		// Allow custom headers/mimetypes
-		if( s.beforeSend )
-			s.beforeSend(xml);
-			
-		if ( s.global )
-		    jQuery.event.trigger("ajaxSend", [xml, s]);
-
-		// Wait for a response to come back
-		var onreadystatechange = function(isTimeout){
-			// The transfer is complete and the data is available, or the request timed out
-			if ( xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
-				requestDone = true;
-				
-				// clear poll interval
-				if (ival) {
-					clearInterval(ival);
-					ival = null;
-				}
-				
-				var status;
-				try {
-					status = jQuery.httpSuccess( xml ) && isTimeout != "timeout" ?
-						s.ifModified && jQuery.httpNotModified( xml, s.url ) ? "notmodified" : "success" : "error";
-					// Make sure that the request was successful or notmodified
-					if ( status != "error" ) {
-						// Cache Last-Modified header, if ifModified mode.
-						var modRes;
-						try {
-							modRes = xml.getResponseHeader("Last-Modified");
-						} catch(e) {} // swallow exception thrown by FF if header is not available
-	
-						if ( s.ifModified && modRes )
-							jQuery.lastModified[s.url] = modRes;
-	
-						// process the data (runs the xml through httpData regardless of callback)
-						var data = jQuery.httpData( xml, s.dataType );
-	
-						// If a local callback was specified, fire it and pass it the data
-						if ( s.success )
-							s.success( data, status );
-	
-						// Fire the global callback
-						if( s.global )
-							jQuery.event.trigger( "ajaxSuccess", [xml, s] );
-					} else
-						jQuery.handleError(s, xml, status);
-				} catch(e) {
-					status = "error";
-					jQuery.handleError(s, xml, status, e);
-				}
-
-				// The request was completed
-				if( s.global )
-					jQuery.event.trigger( "ajaxComplete", [xml, s] );
-
-				// Handle the global AJAX counter
-				if ( s.global && ! --jQuery.active )
-					jQuery.event.trigger( "ajaxStop" );
-
-				// Process result
-				if ( s.complete )
-					s.complete(xml, status);
-
-				// Stop memory leaks
-				if(s.async)
-					xml = null;
-			}
-		};
-		
-		// don't attach the handler to the request, just poll it instead
-		var ival = setInterval(onreadystatechange, 13); 
-
-		// Timeout checker
-		if ( s.timeout > 0 )
-			setTimeout(function(){
-				// Check to see if the request is still happening
-				if ( xml ) {
-					// Cancel the request
-					xml.abort();
-
-					if( !requestDone )
-						onreadystatechange( "timeout" );
-				}
-			}, s.timeout);
-			
-		// Send the data
-		try {
-			xml.send(s.data);
-		} catch(e) {
-			jQuery.handleError(s, xml, null, e);
-		}
-		
-		// firefox 1.5 doesn't fire statechange for sync requests
-		if ( !s.async )
-			onreadystatechange();
-		
-		// return XMLHttpRequest to allow aborting the request etc.
-		return xml;
-	},
-
-	handleError: function( s, xml, status, e ) {
-		// If a local callback was specified, fire it
-		if ( s.error ) s.error( xml, status, e );
-
-		// Fire the global callback
-		if ( s.global )
-			jQuery.event.trigger( "ajaxError", [xml, s, e] );
-	},
-
-	// Counter for holding the number of active queries
-	active: 0,
-
-	// Determines if an XMLHttpRequest was successful or not
-	httpSuccess: function( r ) {
-		try {
-			return !r.status && location.protocol == "file:" ||
-				( r.status >= 200 && r.status < 300 ) || r.status == 304 ||
-				jQuery.browser.safari && r.status == undefined;
-		} catch(e){}
-		return false;
-	},
-
-	// Determines if an XMLHttpRequest returns NotModified
-	httpNotModified: function( xml, url ) {
-		try {
-			var xmlRes = xml.getResponseHeader("Last-Modified");
-
-			// Firefox always returns 200. check Last-Modified date
-			return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
-				jQuery.browser.safari && xml.status == undefined;
-		} catch(e){}
-		return false;
-	},
-
-	/* Get the data out of an XMLHttpRequest.
-	 * Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
-	 * otherwise return plain text.
-	 * (String) data - The type of data that you're expecting back,
-	 * (e.g. "xml", "html", "script")
-	 */
-	httpData: function( r, type ) {
-		var ct = r.getResponseHeader("content-type");
-		var data = !type && ct && ct.indexOf("xml") >= 0;
-		data = type == "xml" || data ? r.responseXML : r.responseText;
-
-		// If the type is "script", eval it in global context
-		if ( type == "script" )
-			jQuery.globalEval( data );
-
-		// Get the JavaScript object, if JSON is used.
-		if ( type == "json" )
-			eval( "data = " + data );
-
-		// evaluate scripts within html
-		if ( type == "html" )
-			jQuery("<div>").html(data).evalScripts();
-
-		return data;
-	},
-
-	// Serialize an array of form elements or a set of
-	// key/values into a query string
-	param: function( a ) {
-		var s = [];
-
-		// If an array was passed in, assume that it is an array
-		// of form elements
-		if ( a.constructor == Array || a.jquery )
-			// Serialize the form elements
-			jQuery.each( a, function(){
-				s.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( this.value ) );
-			});
-
-		// Otherwise, assume that it's an object of key/value pairs
-		else
-			// Serialize the key/values
-			for ( var j in a )
-				// If the value is an array then the key names need to be repeated
-				if ( a[j] && a[j].constructor == Array )
-					jQuery.each( a[j], function(){
-						s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
-					});
-				else
-					s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );
-
-		// Return the resulting serialization
-		return s.join("&");
-	},
-	
-	// evalulates a script in global context
-	// not reliable for safari
-	globalEval: function( data ) {
-		if ( window.execScript )
-			window.execScript( data );
-		else if ( jQuery.browser.safari )
-			// safari doesn't provide a synchronous global eval
-			window.setTimeout( data, 0 );
-		else
-			eval.call( window, data );
-	}
-
-});
-jQuery.fn.extend({
-
-	show: function(speed,callback){
-		var hidden = this.filter(":hidden");
-		speed ?
-			hidden.animate({
-				height: "show", width: "show", opacity: "show"
-			}, speed, callback) :
-			
-			hidden.each(function(){
-				this.style.display = this.oldblock ? this.oldblock : "";
-				if ( jQuery.css(this,"display") == "none" )
-					this.style.display = "block";
-			});
-		return this;
-	},
-
-	hide: function(speed,callback){
-		var visible = this.filter(":visible");
-		speed ?
-			visible.animate({
-				height: "hide", width: "hide", opacity: "hide"
-			}, speed, callback) :
-			
-			visible.each(function(){
-				this.oldblock = this.oldblock || jQuery.css(this,"display");
-				if ( this.oldblock == "none" )
-					this.oldblock = "block";
-				this.style.display = "none";
-			});
-		return this;
-	},
-
-	// Save the old toggle function
-	_toggle: jQuery.fn.toggle,
-	toggle: function( fn, fn2 ){
-		var args = arguments;
-		return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
-			this._toggle( fn, fn2 ) :
-			this.each(function(){
-				jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]
-					.apply( jQuery(this), args );
-			});
-	},
-	slideDown: function(speed,callback){
-		return this.animate({height: "show"}, speed, callback);
-	},
-	slideUp: function(speed,callback){
-		return this.animate({height: "hide"}, speed, callback);
-	},
-	slideToggle: function(speed, callback){
-		return this.each(function(){
-			var state = jQuery(this).is(":hidden") ? "show" : "hide";
-			jQuery(this).animate({height: state}, speed, callback);
-		});
-	},
-	fadeIn: function(speed, callback){
-		return this.animate({opacity: "show"}, speed, callback);
-	},
-	fadeOut: function(speed, callback){
-		return this.animate({opacity: "hide"}, speed, callback);
-	},
-	fadeTo: function(speed,to,callback){
-		return this.animate({opacity: to}, speed, callback);
-	},
-	animate: function( prop, speed, easing, callback ) {
-		return this.queue(function(){
-		
-			this.curAnim = jQuery.extend({}, prop);
-			var opt = jQuery.speed(speed, easing, callback);
-			
-			for ( var p in prop ) {
-				var e = new jQuery.fx( this, opt, p );
-				if ( prop[p].constructor == Number )
-					e.custom( e.cur(), prop[p] );
-				else
-					e[ prop[p] ]( prop );
-			}
-			
-		});
-	},
-	queue: function(type,fn){
-		if ( !fn ) {
-			fn = type;
-			type = "fx";
-		}
-	
-		return this.each(function(){
-			if ( !this.queue )
-				this.queue = {};
-	
-			if ( !this.queue[type] )
-				this.queue[type] = [];
-	
-			this.queue[type].push( fn );
-		
-			if ( this.queue[type].length == 1 )
-				fn.apply(this);
-		});
-	}
-
-});
-
-jQuery.extend({
-	
-	speed: function(speed, easing, fn) {
-		var opt = speed && speed.constructor == Object ? speed : {
-			complete: fn || !fn && easing || 
-				jQuery.isFunction( speed ) && speed,
-			duration: speed,
-			easing: fn && easing || easing && easing.constructor != Function && easing
-		};
-
-		opt.duration = (opt.duration && opt.duration.constructor == Number ? 
-			opt.duration : 
-			{ slow: 600, fast: 200 }[opt.duration]) || 400;
-	
-		// Queueing
-		opt.old = opt.complete;
-		opt.complete = function(){
-			jQuery.dequeue(this, "fx");
-			if ( jQuery.isFunction( opt.old ) )
-				opt.old.apply( this );
-		};
-	
-		return opt;
-	},
-	
-	easing: {},
-	
-	queue: {},
-	
-	dequeue: function(elem,type){
-		type = type || "fx";
-	
-		if ( elem.queue && elem.queue[type] ) {
-			// Remove self
-			elem.queue[type].shift();
-	
-			// Get next function
-			var f = elem.queue[type][0];
-		
-			if ( f ) f.apply( elem );
-		}
-	},
-
-	/*
-	 * I originally wrote fx() as a clone of moo.fx and in the process
-	 * of making it small in size the code became illegible to sane
-	 * people. You've been warned.
-	 */
-	
-	fx: function( elem, options, prop ){
-
-		var z = this;
-
-		// The styles
-		var y = elem.style;
-		
-		// Store display property
-		var oldDisplay = jQuery.css(elem, "display");
-
-		// Make sure that nothing sneaks out
-		y.overflow = "hidden";
-
-		// Simple function for setting a style value
-		z.a = function(){
-			if ( options.step )
-				options.step.apply( elem, [ z.now ] );
-
-			if ( prop == "opacity" )
-				jQuery.attr(y, "opacity", z.now); // Let attr handle opacity
-			else if ( parseInt(z.now) ) // My hate for IE will never die
-				y[prop] = parseInt(z.now) + "px";
-			
-			y.display = "block"; // Set display property to block for animation
-		};
-
-		// Figure out the maximum number to run to
-		z.max = function(){
-			return parseFloat( jQuery.css(elem,prop) );
-		};
-
-		// Get the current size
-		z.cur = function(){
-			var r = parseFloat( jQuery.curCSS(elem, prop) );
-			return r && r > -10000 ? r : z.max();
-		};
-
-		// Start an animation from one number to another
-		z.custom = function(from,to){
-			z.startTime = (new Date()).getTime();
-			z.now = from;
-			z.a();
-
-			z.timer = setInterval(function(){
-				z.step(from, to);
-			}, 13);
-		};
-
-		// Simple 'show' function
-		z.show = function(){
-			if ( !elem.orig ) elem.orig = {};
-
-			// Remember where we started, so that we can go back to it later
-			elem.orig[prop] = this.cur();
-
-			options.show = true;
-
-			// Begin the animation
-			z.custom(0, elem.orig[prop]);
-
-			// Stupid IE, look what you made me do
-			if ( prop != "opacity" )
-				y[prop] = "1px";
-		};
-
-		// Simple 'hide' function
-		z.hide = function(){
-			if ( !elem.orig ) elem.orig = {};
-
-			// Remember where we started, so that we can go back to it later
-			elem.orig[prop] = this.cur();
-
-			options.hide = true;
-
-			// Begin the animation
-			z.custom(elem.orig[prop], 0);
-		};
-		
-		//Simple 'toggle' function
-		z.toggle = function() {
-			if ( !elem.orig ) elem.orig = {};
-
-			// Remember where we started, so that we can go back to it later
-			elem.orig[prop] = this.cur();
-
-			if(oldDisplay == "none")  {
-				options.show = true;
-				
-				// Stupid IE, look what you made me do
-				if ( prop != "opacity" )
-					y[prop] = "1px";
-
-				// Begin the animation
-				z.custom(0, elem.orig[prop]);	
-			} else {
-				options.hide = true;
-
-				// Begin the animation
-				z.custom(elem.orig[prop], 0);
-			}		
-		};
-
-		// Each step of an animation
-		z.step = function(firstNum, lastNum){
-			var t = (new Date()).getTime();
-
-			if (t > options.duration + z.startTime) {
-				// Stop the timer
-				clearInterval(z.timer);
-				z.timer = null;
-
-				z.now = lastNum;
-				z.a();
-
-				if (elem.curAnim) elem.curAnim[ prop ] = true;
-
-				var done = true;
-				for ( var i in elem.curAnim )
-					if ( elem.curAnim[i] !== true )
-						done = false;
-
-				if ( done ) {
-					// Reset the overflow
-					y.overflow = "";
-					
-					// Reset the display
-					y.display = oldDisplay;
-					if (jQuery.css(elem, "display") == "none")
-						y.display = "block";
-
-					// Hide the element if the "hide" operation was done
-					if ( options.hide ) 
-						y.display = "none";
-
-					// Reset the properties, if the item has been hidden or shown
-					if ( options.hide || options.show )
-						for ( var p in elem.curAnim )
-							if (p == "opacity")
-								jQuery.attr(y, p, elem.orig[p]);
-							else
-								y[p] = "";
-				}
-
-				// If a callback was provided, execute it
-				if ( done && jQuery.isFunction( options.complete ) )
-					// Execute the complete function
-					options.complete.apply( elem );
-			} else {
-				var n = t - this.startTime;
-				// Figure out where in the animation we are and set the number
-				var p = n / options.duration;
-				
-				// If the easing function exists, then use it 
-				z.now = options.easing && jQuery.easing[options.easing] ?
-					jQuery.easing[options.easing](p, n,  firstNum, (lastNum-firstNum), options.duration) :
-					// else use default linear easing
-					((-Math.cos(p*Math.PI)/2) + 0.5) * (lastNum-firstNum) + firstNum;
-
-				// Perform the next step of the animation
-				z.a();
-			}
-		};
-	
-	}
-});
-}
+eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+"></"+b+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>","</24>"]||!s.1g("<9w")&&[1,"<6T>","</6T>"]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>","</1I>"]||!s.1g("<4m")&&[2,"<1I><1K>","</1K></1I>"]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>","</4m></1K></1I>"]||!s.1g("<6Y")&&[2,"<1I><1K></1K><6L>","</6L></1I>"]||E.V.1h&&[1,"1s<1s>","</1s>"]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"i<m[3]-0",7Z:"i>m[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i<a.K;i++)9(a[i].T==6)a.6I(i--,1)}).5n()}});H A=G(b,c,a){9(!b)I;H q=E.M(b,c+"3L");9(!q||a)q=E.M(b,c+"3L",a?E.2h(a):[]);I q};E.1b.5n=G(a){a=a||"2j";I 6.N(G(){H q=A(6,a);q.44();9(q.K)q[0].16(6)})};E.1k({6D:G(b,a,c){H d=b&&b.1c==8Z?b:{1l:c||!c&&a||E.1n(b)&&b,2e:b,3J:c&&a||a&&a.1c!=8Y&&a};d.2e=(d.2e&&d.2e.1c==4W?d.2e:{8X:8W,8V:6N}[d.2e])||8T;d.3r=d.1l;d.1l=G(){E(6).5n();9(E.1n(d.3r))d.3r.16(6)};I d},3J:{6B:G(p,n,b,a){I b+a*p},5q:G(p,n,b,a){I((-38.9s(p*38.8R)/2)+0.5)*a+b}},32:[],2j:G(b,c,a){6.Y=c;6.T=b;6.1e=a;9(!c.3P)c.3P={}}});E.2j.3A={4r:G(){9(6.Y.2F)6.Y.2F.16(6.T,[6.2v,6]);(E.2j.2F[6.1e]||E.2j.2F.6z)(6);9(6.1e=="1H"||6.1e=="2N")6.T.R.19="2Z"},2b:G(a){9(6.T[6.1e]!=S&&6.T.R[6.1e]==S)I 6.T[6.1e];H r=3I(E.3C(6.T,6.1e,a));I r&&r>-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i<a.K;i++)9(!a[i]())a.6I(i--,1);9(!a.K)4A(d)},13)}},1A:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1A=Q;6.3N(0,6.2b());9(6.1e=="2N"||6.1e=="1H")6.T.R[6.1e]="8N";E(6.T).1A()},1z:G(){6.Y.3P[6.1e]=E.1x(6.T.R,6.1e);6.Y.1z=Q;6.3N(6.2b(),0)},2F:G(){H t=(1u 3D()).3B();9(t>6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{}))
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/extensions/json.js
===================================================================
--- tags/2.4.2/http/extensions/json.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/extensions/json.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,193 +1,23 @@
-/*
-    json.js
-    2007-01-10
-
-    This file adds these methods to JavaScript:
-
-        array.toJSONString()
-        boolean.toJSONString()
-        date.toJSONString()
-        number.toJSONString()
-        object.toJSONString()
-        string.toJSONString()
-            These methods produce a JSON text from a JavaScript value.
-            It must not contain any cyclical references. Illegal values
-            will be excluded.
-
-            The default conversion for dates is to an ISO string. You can
-            add a toJSONString method to any date object to get a different
-            representation.
-
-        string.parseJSON(filter)
-            This method parses a JSON text to produce an object or
-            array. It can throw a SyntaxError exception.
-
-            The optional filter parameter is a function which can filter and
-            transform the results. It receives each of the keys and values, and
-            its return value is used instead of the original value. If it
-            returns what it received, then structure is not modified. If it
-            returns undefined then the member is deleted.
-
-            Example:
-
-            // Parse the text. If a key contains the string 'date' then
-            // convert the value to a date.
-
-            myData = text.parseJSON(function (key, value) {
-                return key.indexOf('date') >= 0 ? new Date(value) : value;
-            });
-
-    It is expected that these methods will formally become part of the
-    JavaScript Programming Language in the Fourth Edition of the
-    ECMAScript standard in 2007.
-*/
-if (!Object.prototype.toJSONString) {
-    Array.prototype.toJSONString = function () {
-        var a = ['['], b, i, l = this.length, v;
-
-        function p(s) {
-            if (b) {
-                a.push(',');
-            }
-            a.push(s);
-            b = true;
-        }
-
-        for (i = 0; i < l; i += 1) {
-            v = this[i];
-            switch (typeof v) {
-            case 'undefined':
-            case 'function':
-            case 'unknown':
-                break;
-            case 'object':
-                if (v) {
-                    if (typeof v.toJSONString === 'function') {
-                        p(v.toJSONString());
-                    }
-                } else {
-                    p("null");
-                }
-                break;
-            default:
-                p(v.toJSONString());
-            }
-        }
-        a.push(']');
-        return a.join('');
-    };
-
-    Boolean.prototype.toJSONString = function () {
-        return String(this);
-    };
-
-    Date.prototype.toJSONString = function () {
-
-        function f(n) {
-            return n < 10 ? '0' + n : n;
-        }
-
-        return '"' + this.getFullYear() + '-' +
-                f(this.getMonth() + 1) + '-' +
-                f(this.getDate()) + 'T' +
-                f(this.getHours()) + ':' +
-                f(this.getMinutes()) + ':' +
-                f(this.getSeconds()) + '"';
-    };
-
-    Number.prototype.toJSONString = function () {
-        return isFinite(this) ? String(this) : "null";
-    };
-
-    Object.prototype.toJSONString = function () {
-	
-        var a = ['{'], b, i, v;
-
-        function p(s) {
-            if (b) {
-                a.push(',');
-            }
-            a.push(i.toJSONString(), ':', s);
-            b = true;
-        }
-
-        for (i in this) {
-            if (this.hasOwnProperty(i)) {
-                v = this[i];
-                switch (typeof v) {
-                case 'undefined':
-                case 'function':
-                case 'unknown':
-                    break;
-                case 'object':
-                    if (v) {
-                        if (typeof v.toJSONString === 'function') {
-                            p(v.toJSONString());
-                        }
-                    } else {
-                        p("null");
-                    }
-                    break;
-                default:
-                    p(v.toJSONString());
-                }
-            }
-        }
-        a.push('}');
-        return a.join('');
-    };
-
-
-    (function (s) {
-        var m = {
-            '\b': '\\b',
-            '\t': '\\t',
-            '\n': '\\n',
-            '\f': '\\f',
-            '\r': '\\r',
-            '"' : '\\"',
-            '\\': '\\\\'
-        };
-
-        s.parseJSON = function (filter) {
-            try {
-                if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.
-                        test(this)) {
-                    var j = eval('(' + this + ')');
-                    if (typeof filter === 'function') {
-                        function walk(k, v) {
-                            if (v && typeof v === 'object') {
-                                for (var i in v) {
-                                    if (v.hasOwnProperty(i)) {
-                                        v[i] = walk(i, v[i]);
-                                    }
-                                }
-                            }
-                            return filter(k, v);
-                        }
-                        return walk('', j);
-                    }
-                    return j;
-                }
-            } catch (e) {
-            }
-            throw new SyntaxError("parseJSON");
-        };
-
-        s.toJSONString = function () {
-            if (/["\\\x00-\x1f]/.test(this)) {
-                return '"' + this.replace(/([\x00-\x1f\\"])/g, function(a, b) {
-                    var c = m[b];
-                    if (c) {
-                        return c;
-                    }
-                    c = b.charCodeAt();
-                    return '\\u00' +
-                        Math.floor(c / 16).toString(16) +
-                        (c % 16).toString(16);
-                }) + '"';
-            }
-            return '"' + this + '"';
-        };
-    })(String.prototype);
-}
\ No newline at end of file
+if(!Object.prototype.toJSONString){Array.prototype.toJSONString=function(){var a=['['],b,i,l=this.length,v;function p(s){if(b){a.push(',');}
+a.push(s);b=true;}
+for(i=0;i<l;i+=1){v=this[i];switch(typeof v){case'undefined':case'function':case'unknown':break;case'object':if(v){if(typeof v.toJSONString==='function'){p(v.toJSONString());}}else{p("null");}
+break;default:p(v.toJSONString());}}
+a.push(']');return a.join('');};Boolean.prototype.toJSONString=function(){return String(this);};Date.prototype.toJSONString=function(){function f(n){return n<10?'0'+n:n;}
+return'"'+this.getFullYear()+'-'+
+f(this.getMonth()+1)+'-'+
+f(this.getDate())+'T'+
+f(this.getHours())+':'+
+f(this.getMinutes())+':'+
+f(this.getSeconds())+'"';};Number.prototype.toJSONString=function(){return isFinite(this)?String(this):"null";};Object.prototype.toJSONString=function(){var a=['{'],b,i,v;function p(s){if(b){a.push(',');}
+a.push(i.toJSONString(),':',s);b=true;}
+for(i in this){if(this.hasOwnProperty(i)){v=this[i];switch(typeof v){case'undefined':case'function':case'unknown':break;case'object':if(v){if(typeof v.toJSONString==='function'){p(v.toJSONString());}}else{p("null");}
+break;default:p(v.toJSONString());}}}
+a.push('}');return a.join('');};(function(s){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};s.parseJSON=function(filter){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)){var j=eval('('+this+')');if(typeof filter==='function'){function walk(k,v){if(v&&typeof v==='object'){for(var i in v){if(v.hasOwnProperty(i)){v[i]=walk(i,v[i]);}}}
+return filter(k,v);}
+return walk('',j);}
+return j;}}catch(e){}
+throw new SyntaxError("parseJSON");};s.toJSONString=function(){if(/["\\\x00-\x1f]/.test(this)){return'"'+this.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}
+c=b.charCodeAt();return'\\u00'+
+Math.floor(c/16).toString(16)+
+(c%16).toString(16);})+'"';}
+return'"'+this+'"';};})(String.prototype);}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/extensions/wz_jsgraphics.js
===================================================================
--- tags/2.4.2/http/extensions/wz_jsgraphics.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/extensions/wz_jsgraphics.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,934 +1,211 @@
-/* This notice must be untouched at all times.
-
-wz_jsgraphics.js    v. 2.3
-The latest version is available at
-http://www.walterzorn.com
-or http://www.devira.com
-or http://www.walterzorn.de
-
-Copyright (c) 2002-2004 Walter Zorn. All rights reserved.
-Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
-Last modified: 29. 9. 2004
-
-Performance optimizations for Internet Explorer
-by Thomas Frank and John Holdsworth.
-fillPolygon method implemented by Matthieu Haller.
-
-High Performance JavaScript Graphics Library.
-Provides methods
-- to draw lines, rectangles, ellipses, polygons
-  with specifiable line thickness,
-- to fill rectangles and ellipses
-- to draw text.
-NOTE: Operations, functions and branching have rather been optimized
-to efficiency and speed than to shortness of source code.
-
-LICENSE: LGPL
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License (LGPL) as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library 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
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,
-or see http://www.gnu.org/copyleft/lesser.html
-*/
-
-
-var jg_ihtm, jg_ie, jg_fast, jg_dom, jg_moz,
-jg_n4 = (document.layers && typeof document.classes != "undefined");
-
-
-function chkDHTM(x, i)
-{
-        x = document.body || null;
-        jg_ie = x && typeof x.insertAdjacentHTML != "undefined";
-        jg_dom = (x && !jg_ie &&
-                typeof x.appendChild != "undefined" &&
-                typeof document.createRange != "undefined" &&
-                typeof (i = document.createRange()).setStartBefore != "undefined" &&
-                typeof i.createContextualFragment != "undefined");
-        jg_ihtm = !jg_ie && !jg_dom && x && typeof x.innerHTML != "undefined";
-        jg_fast = jg_ie && document.all && !window.opera;
-        jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
-}
-
-
+var jg_ihtm,jg_ie,jg_fast,jg_dom,jg_moz,jg_n4=(document.layers&&typeof document.classes!="undefined");function chkDHTM(x,i)
+{x=document.body||null;jg_ie=x&&typeof x.insertAdjacentHTML!="undefined";jg_dom=(x&&!jg_ie&&typeof x.appendChild!="undefined"&&typeof document.createRange!="undefined"&&typeof(i=document.createRange()).setStartBefore!="undefined"&&typeof i.createContextualFragment!="undefined");jg_ihtm=!jg_ie&&!jg_dom&&x&&typeof x.innerHTML!="undefined";jg_fast=jg_ie&&document.all&&!window.opera;jg_moz=jg_dom&&typeof x.style.MozOpacity!="undefined";}
 function pntDoc()
-{
-        this.wnd.document.write(jg_fast? this.htmRpc() : this.htm);
-        this.htm = '';
-}
-
-
+{this.wnd.document.write(jg_fast?this.htmRpc():this.htm);this.htm='';}
 function pntCnvDom()
-{
-        var x = document.createRange();
-        x.setStartBefore(this.cnv);
-        x = x.createContextualFragment(jg_fast? this.htmRpc() : this.htm);
-        this.cnv.appendChild(x);
-        this.htm = '';
-}
-
-
+{var x=document.createRange();x.setStartBefore(this.cnv);x=x.createContextualFragment(jg_fast?this.htmRpc():this.htm);this.cnv.appendChild(x);this.htm='';}
 function pntCnvIe()
-{
-        this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this.htmRpc() : this.htm);
-        this.htm = '';
-}
-
-
+{this.cnv.insertAdjacentHTML("BeforeEnd",jg_fast?this.htmRpc():this.htm);this.htm='';}
 function pntCnvIhtm()
-{
-        this.cnv.innerHTML += this.htm;
-        this.htm = '';
-}
-
-
+{this.cnv.innerHTML+=this.htm;this.htm='';}
 function pntCnv()
-{
-        this.htm = '';
-}
-
-
-function mkDiv(x, y, w, h)
-{
-        this.htm += '<div style="position:absolute;'+
-                'left:' + x + 'px;'+
-                'top:' + y + 'px;'+
-                'width:' + w + 'px;'+
-                'height:' + h + 'px;';
-        if (ie) {
-        		this.htm += '-opacity:' + cw_opacity + ';' + 
-                '-khtml-opacity:' + cw_opacity + ';'+
-                'filter: alpha(opacity=' + (cw_opacity * 100) + ');';
-        }
-
-//'-moz-opacity:' + window.cw_opacity + ';'+
-        this.htm += 
-                'clip:rect(0,'+w+'px,'+h+'px,0);'+
-                'background-color:' + this.color +
-                (!jg_moz? ';overflow:hidden' : '')+
-                ';"><\/div>';
-}
-
-
-function mkDivIe(x, y, w, h)
-{
-        this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
-}
-
-
-function mkDivPrt(x, y, w, h)
-{
-        this.htm += '<div style="position:absolute;'+
-                'border-left:' + w + 'px solid ' + this.color + ';'+
-                'left:' + x + 'px;'+
-                'top:' + y + 'px;'+
-                'width:0px;'+
-                'height:' + h + 'px;'+
-                'clip:rect(0,'+w+'px,'+h+'px,0);'+
-                'background-color:' + this.color +
-                (!jg_moz? ';overflow:hidden' : '')+
-                ';"><\/div>';
-}
-
-
-function mkLyr(x, y, w, h)
-{
-        this.htm += '<layer '+
-                'left="' + x + '" '+
-                'top="' + y + '" '+
-                'width="' + w + '" '+
-                'height="' + h + '" '+
-                'bgcolor="' + this.color + '"><\/layer>\n';
-}
-
-
-var regex =  /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
-function htmRpc()
-{
-        return this.htm.replace(
-                regex,
-                '<div style="overflow:hidden;position:absolute;background-color:'+
-                '$1;left:$2;top:$3;width:$4;height:$5"></div>\n');
-}
-
-
+{this.htm='';}
+function mkDiv(x,y,w,h)
+{this.htm+='<div style="position:absolute;'+'left:'+x+'px;'+'top:'+y+'px;'+'width:'+w+'px;'+'height:'+h+'px;';if(ie){this.htm+='-opacity:'+cw_opacity+';'+'-khtml-opacity:'+cw_opacity+';'+'filter: alpha(opacity='+(cw_opacity*100)+');';}
+this.htm+='clip:rect(0,'+w+'px,'+h+'px,0);'+'background-color:'+this.color+
+(!jg_moz?';overflow:hidden':'')+';"><\/div>';}
+function mkDivIe(x,y,w,h)
+{this.htm+='%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';}
+function mkDivPrt(x,y,w,h)
+{this.htm+='<div style="position:absolute;'+'border-left:'+w+'px solid '+this.color+';'+'left:'+x+'px;'+'top:'+y+'px;'+'width:0px;'+'height:'+h+'px;'+'clip:rect(0,'+w+'px,'+h+'px,0);'+'background-color:'+this.color+
+(!jg_moz?';overflow:hidden':'')+';"><\/div>';}
+function mkLyr(x,y,w,h)
+{this.htm+='<layer '+'left="'+x+'" '+'top="'+y+'" '+'width="'+w+'" '+'height="'+h+'" '+'bgcolor="'+this.color+'"><\/layer>\n';}
+var regex=/%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;function htmRpc()
+{return this.htm.replace(regex,'<div style="overflow:hidden;position:absolute;background-color:'+'$1;left:$2;top:$3;width:$4;height:$5"></div>\n');}
 function htmPrtRpc()
-{
-        return this.htm.replace(
-                regex,
-                '<div style="overflow:hidden;position:absolute;background-color:'+
-                '$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');
-}
-
-
-function mkLin(x1, y1, x2, y2)
-{
-        if (x1 > x2)
-        {
-                var _x2 = x2;
-                var _y2 = y2;
-                x2 = x1;
-                y2 = y1;
-                x1 = _x2;
-                y1 = _y2;
-        }
-        var dx = x2-x1, dy = Math.abs(y2-y1),
-        x = x1, y = y1,
-        yIncr = (y1 > y2)? -1 : 1;
-
-        if (dx >= dy)
-        {
-                var pr = dy<<1,
-                pru = pr - (dx<<1),
-                p = pr-dx,
-                ox = x;
-                while ((dx--) > 0)
-                {
-                        ++x;
-                        if (p > 0)
-                        {
-                                this.mkDiv(ox, y, x-ox, 1);
-                                y += yIncr;
-                                p += pru;
-                                ox = x;
-                        }
-                        else p += pr;
-                }
-                this.mkDiv(ox, y, x2-ox+1, 1);
-        }
-
-        else
-        {
-                var pr = dx<<1,
-                pru = pr - (dy<<1),
-                p = pr-dy,
-                oy = y;
-                if (y2 <= y1)
-                {
-                        while ((dy--) > 0)
-                        {
-                                if (p > 0)
-                                {
-                                        this.mkDiv(x++, y, 1, oy-y+1);
-                                        y += yIncr;
-                                        p += pru;
-                                        oy = y;
-                                }
-                                else
-                                {
-                                        y += yIncr;
-                                        p += pr;
-                                }
-                        }
-                        this.mkDiv(x2, y2, 1, oy-y2+1);
-                }
-                else
-                {
-                        while ((dy--) > 0)
-                        {
-                                y += yIncr;
-                                if (p > 0)
-                                {
-                                        this.mkDiv(x++, oy, 1, y-oy);
-                                        p += pru;
-                                        oy = y;
-                                }
-                                else p += pr;
-                        }
-                        this.mkDiv(x2, oy, 1, y2-oy+1);
-                }
-        }
-}
-
-
-function mkLin2D(x1, y1, x2, y2)
-{
-        if (x1 > x2)
-        {
-                var _x2 = x2;
-                var _y2 = y2;
-                x2 = x1;
-                y2 = y1;
-                x1 = _x2;
-                y1 = _y2;
-        }
-        var dx = x2-x1, dy = Math.abs(y2-y1),
-        x = x1, y = y1,
-        yIncr = (y1 > y2)? -1 : 1;
-
-        var s = this.stroke;
-        if (dx >= dy)
-        {
-                if (s-3 > 0)
-                {
-                        var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
-                        _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
-                }
-                else var _s = s;
-                var ad = Math.ceil(s/2);
-
-                var pr = dy<<1,
-                pru = pr - (dx<<1),
-                p = pr-dx,
-                ox = x;
-                while ((dx--) > 0)
-                {
-                        ++x;
-                        if (p > 0)
-                        {
-                                this.mkDiv(ox, y, x-ox+ad, _s);
-                                y += yIncr;
-                                p += pru;
-                                ox = x;
-                        }
-                        else p += pr;
-                }
-                this.mkDiv(ox, y, x2-ox+ad+1, _s);
-        }
-
-        else
-        {
-                if (s-3 > 0)
-                {
-                        var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
-                        _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
-                }
-                else var _s = s;
-                var ad = Math.round(s/2);
-
-                var pr = dx<<1,
-                pru = pr - (dy<<1),
-                p = pr-dy,
-                oy = y;
-                if (y2 <= y1)
-                {
-                        ++ad;
-                        while ((dy--) > 0)
-                        {
-                                if (p > 0)
-                                {
-                                        this.mkDiv(x++, y, _s, oy-y+ad);
-                                        y += yIncr;
-                                        p += pru;
-                                        oy = y;
-                                }
-                                else
-                                {
-                                        y += yIncr;
-                                        p += pr;
-                                }
-                        }
-                        this.mkDiv(x2, y2, _s, oy-y2+ad);
-                }
-                else
-                {
-                        while ((dy--) > 0)
-                        {
-                                y += yIncr;
-                                if (p > 0)
-                                {
-                                        this.mkDiv(x++, oy, _s, y-oy+ad);
-                                        p += pru;
-                                        oy = y;
-                                }
-                                else p += pr;
-                        }
-                        this.mkDiv(x2, oy, _s, y2-oy+ad+1);
-                }
-        }
-}
-
-
-function mkLinDott(x1, y1, x2, y2)
-{
-        if (x1 > x2)
-        {
-                var _x2 = x2;
-                var _y2 = y2;
-                x2 = x1;
-                y2 = y1;
-                x1 = _x2;
-                y1 = _y2;
-        }
-        var dx = x2-x1, dy = Math.abs(y2-y1),
-        x = x1, y = y1,
-        yIncr = (y1 > y2)? -1 : 1,
-        drw = true;
-        if (dx >= dy)
-        {
-                var pr = dy<<1,
-                pru = pr - (dx<<1),
-                p = pr-dx;
-                while ((dx--) > 0)
-                {
-                        if (drw) this.mkDiv(x, y, 1, 1);
-                        drw = !drw;
-                        if (p > 0)
-                        {
-                                y += yIncr;
-                                p += pru;
-                        }
-                        else p += pr;
-                        ++x;
-                }
-                if (drw) this.mkDiv(x, y, 1, 1);
-        }
-
-        else
-        {
-                var pr = dx<<1,
-                pru = pr - (dy<<1),
-                p = pr-dy;
-                while ((dy--) > 0)
-                {
-                        if (drw) this.mkDiv(x, y, 1, 1);
-                        drw = !drw;
-                        y += yIncr;
-                        if (p > 0)
-                        {
-                                ++x;
-                                p += pru;
-                        }
-                        else p += pr;
-                }
-                if (drw) this.mkDiv(x, y, 1, 1);
-        }
-}
-
-
-function mkOv(left, top, width, height)
-{
-        var a = width>>1, b = height>>1,
-        wod = width&1, hod = (height&1)+1,
-        cx = left+a, cy = top+b,
-        x = 0, y = b,
-        ox = 0, oy = b,
-        aa = (a*a)<<1, bb = (b*b)<<1,
-        st = (aa>>1)*(1-(b<<1)) + bb,
-        tt = (bb>>1) - aa*((b<<1)-1),
-        w, h;
-        while (y > 0)
-        {
-                if (st < 0)
-                {
-                        st += bb*((x<<1)+3);
-                        tt += (bb<<1)*(++x);
-                }
-                else if (tt < 0)
-                {
-                        st += bb*((x<<1)+3) - (aa<<1)*(y-1);
-                        tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
-                        w = x-ox;
-                        h = oy-y;
-                        if (w&2 && h&2)
-                        {
-                                this.mkOvQds(cx, cy, -x+2, ox+wod, -oy, oy-1+hod, 1, 1);
-                                this.mkOvQds(cx, cy, -x+1, x-1+wod, -y-1, y+hod, 1, 1);
-                        }
-                        else this.mkOvQds(cx, cy, -x+1, ox+wod, -oy, oy-h+hod, w, h);
-                        ox = x;
-                        oy = y;
-                }
-                else
-                {
-                        tt -= aa*((y<<1)-3);
-                        st -= (aa<<1)*(--y);
-                }
-        }
-        this.mkDiv(cx-a, cy-oy, a-ox+1, (oy<<1)+hod);
-        this.mkDiv(cx+ox+wod, cy-oy, a-ox+1, (oy<<1)+hod);
-}
-
-
-function mkOv2D(left, top, width, height)
-{
-        var s = this.stroke;
-        width += s-1;
-        height += s-1;
-        var a = width>>1, b = height>>1,
-        wod = width&1, hod = (height&1)+1,
-        cx = left+a, cy = top+b,
-        x = 0, y = b,
-        aa = (a*a)<<1, bb = (b*b)<<1,
-        st = (aa>>1)*(1-(b<<1)) + bb,
-        tt = (bb>>1) - aa*((b<<1)-1);
-
-        if (s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
-        {
-                var ox = 0, oy = b,
-                w, h,
-                pxl, pxr, pxt, pxb, pxw;
-                while (y > 0)
-                {
-                        if (st < 0)
-                        {
-                                st += bb*((x<<1)+3);
-                                tt += (bb<<1)*(++x);
-                        }
-                        else if (tt < 0)
-                        {
-                                st += bb*((x<<1)+3) - (aa<<1)*(y-1);
-                                tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
-                                w = x-ox;
-                                h = oy-y;
-
-                                if (w-1)
-                                {
-                                        pxw = w+1+(s&1);
-                                        h = s;
-                                }
-                                else if (h-1)
-                                {
-                                        pxw = s;
-                                        h += 1+(s&1);
-                                }
-                                else pxw = h = s;
-                                this.mkOvQds(cx, cy, -x+1, ox-pxw+w+wod, -oy, -h+oy+hod, pxw, h);
-                                ox = x;
-                                oy = y;
-                        }
-                        else
-                        {
-                                tt -= aa*((y<<1)-3);
-                                st -= (aa<<1)*(--y);
-                        }
-                }
-                this.mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
-                this.mkDiv(cx+a+wod-s+1, cy-oy, s, (oy<<1)+hod);
-        }
-
-        else
-        {
-                var _a = (width-((s-1)<<1))>>1,
-                _b = (height-((s-1)<<1))>>1,
-                _x = 0, _y = _b,
-                _aa = (_a*_a)<<1, _bb = (_b*_b)<<1,
-                _st = (_aa>>1)*(1-(_b<<1)) + _bb,
-                _tt = (_bb>>1) - _aa*((_b<<1)-1),
-
-                pxl = new Array(),
-                pxt = new Array(),
-                _pxb = new Array();
-                pxl[0] = 0;
-                pxt[0] = b;
-                _pxb[0] = _b-1;
-                while (y > 0)
-                {
-                        if (st < 0)
-                        {
-                                st += bb*((x<<1)+3);
-                                tt += (bb<<1)*(++x);
-                                pxl[pxl.length] = x;
-                                pxt[pxt.length] = y;
-                        }
-                        else if (tt < 0)
-                        {
-                                st += bb*((x<<1)+3) - (aa<<1)*(y-1);
-                                tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
-                                pxl[pxl.length] = x;
-                                pxt[pxt.length] = y;
-                        }
-                        else
-                        {
-                                tt -= aa*((y<<1)-3);
-                                st -= (aa<<1)*(--y);
-                        }
-
-                        if (_y > 0)
-                        {
-                                if (_st < 0)
-                                {
-                                        _st += _bb*((_x<<1)+3);
-                                        _tt += (_bb<<1)*(++_x);
-                                        _pxb[_pxb.length] = _y-1;
-                                }
-                                else if (_tt < 0)
-                                {
-                                        _st += _bb*((_x<<1)+3) - (_aa<<1)*(_y-1);
-                                        _tt += (_bb<<1)*(++_x) - _aa*(((_y--)<<1)-3);
-                                        _pxb[_pxb.length] = _y-1;
-                                }
-                                else
-                                {
-                                        _tt -= _aa*((_y<<1)-3);
-                                        _st -= (_aa<<1)*(--_y);
-                                        _pxb[_pxb.length-1]--;
-                                }
-                        }
-                }
-
-                var ox = 0, oy = b,
-                _oy = _pxb[0],
-                l = pxl.length,
-                w, h;
-                for (var i = 0; i < l; i++)
-                {
-                        if (typeof _pxb[i] != "undefined")
-                        {
-                                if (_pxb[i] < _oy || pxt[i] < oy)
-                                {
-                                        x = pxl[i];
-                                        this.mkOvQds(cx, cy, -x+1, ox+wod, -oy, _oy+hod, x-ox, oy-_oy);
-                                        ox = x;
-                                        oy = pxt[i];
-                                        _oy = _pxb[i];
-                                }
-                        }
-                        else
-                        {
-                                x = pxl[i];
-                                this.mkDiv(cx-x+1, cy-oy, 1, (oy<<1)+hod);
-                                this.mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
-                                ox = x;
-                                oy = pxt[i];
-                        }
-                }
-                this.mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
-                this.mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
-        }
-}
-
-
-function mkOvDott(left, top, width, height)
-{
-        var a = width>>1, b = height>>1,
-        wod = width&1, hod = height&1,
-        cx = left+a, cy = top+b,
-        x = 0, y = b,
-        aa2 = (a*a)<<1, aa4 = aa2<<1, bb = (b*b)<<1,
-        st = (aa2>>1)*(1-(b<<1)) + bb,
-        tt = (bb>>1) - aa2*((b<<1)-1),
-        drw = true;
-        while (y > 0)
-        {
-                if (st < 0)
-                {
-                        st += bb*((x<<1)+3);
-                        tt += (bb<<1)*(++x);
-                }
-                else if (tt < 0)
-                {
-                        st += bb*((x<<1)+3) - aa4*(y-1);
-                        tt += (bb<<1)*(++x) - aa2*(((y--)<<1)-3);
-                }
-                else
-                {
-                        tt -= aa2*((y<<1)-3);
-                        st -= aa4*(--y);
-                }
-                if (drw) this.mkOvQds(cx, cy, -x, x+wod, -y, y+hod, 1, 1);
-                drw = !drw;
-        }
-}
-
-
-function mkRect(x, y, w, h)
-{
-        var s = this.stroke;
-        this.mkDiv(x, y, w, s);
-        this.mkDiv(x+w, y, s, h);
-        this.mkDiv(x, y+h, w+s, s);
-        this.mkDiv(x, y+s, s, h-s);
-}
-
-
-function mkRectDott(x, y, w, h)
-{
-        this.drawLine(x, y, x+w, y);
-        this.drawLine(x+w, y, x+w, y+h);
-        this.drawLine(x, y+h, x+w, y+h);
-        this.drawLine(x, y, x, y+h);
-}
-
-
+{return this.htm.replace(regex,'<div style="overflow:hidden;position:absolute;background-color:'+'$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');}
+function mkLin(x1,y1,x2,y2)
+{if(x1>x2)
+{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;if(dx>=dy)
+{var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;while((dx--)>0)
+{++x;if(p>0)
+{this.mkDiv(ox,y,x-ox,1);y+=yIncr;p+=pru;ox=x;}
+else p+=pr;}
+this.mkDiv(ox,y,x2-ox+1,1);}
+else
+{var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;if(y2<=y1)
+{while((dy--)>0)
+{if(p>0)
+{this.mkDiv(x++,y,1,oy-y+1);y+=yIncr;p+=pru;oy=y;}
+else
+{y+=yIncr;p+=pr;}}
+this.mkDiv(x2,y2,1,oy-y2+1);}
+else
+{while((dy--)>0)
+{y+=yIncr;if(p>0)
+{this.mkDiv(x++,oy,1,y-oy);p+=pru;oy=y;}
+else p+=pr;}
+this.mkDiv(x2,oy,1,y2-oy+1);}}}
+function mkLin2D(x1,y1,x2,y2)
+{if(x1>x2)
+{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1;var s=this.stroke;if(dx>=dy)
+{if(s-3>0)
+{var _s=(s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy)/dx;_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;}
+else var _s=s;var ad=Math.ceil(s/2);var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx,ox=x;while((dx--)>0)
+{++x;if(p>0)
+{this.mkDiv(ox,y,x-ox+ad,_s);y+=yIncr;p+=pru;ox=x;}
+else p+=pr;}
+this.mkDiv(ox,y,x2-ox+ad+1,_s);}
+else
+{if(s-3>0)
+{var _s=(s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy)/dy;_s=(!(s-4)?Math.ceil(_s):Math.round(_s))+1;}
+else var _s=s;var ad=Math.round(s/2);var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy,oy=y;if(y2<=y1)
+{++ad;while((dy--)>0)
+{if(p>0)
+{this.mkDiv(x++,y,_s,oy-y+ad);y+=yIncr;p+=pru;oy=y;}
+else
+{y+=yIncr;p+=pr;}}
+this.mkDiv(x2,y2,_s,oy-y2+ad);}
+else
+{while((dy--)>0)
+{y+=yIncr;if(p>0)
+{this.mkDiv(x++,oy,_s,y-oy+ad);p+=pru;oy=y;}
+else p+=pr;}
+this.mkDiv(x2,oy,_s,y2-oy+ad+1);}}}
+function mkLinDott(x1,y1,x2,y2)
+{if(x1>x2)
+{var _x2=x2;var _y2=y2;x2=x1;y2=y1;x1=_x2;y1=_y2;}
+var dx=x2-x1,dy=Math.abs(y2-y1),x=x1,y=y1,yIncr=(y1>y2)?-1:1,drw=true;if(dx>=dy)
+{var pr=dy<<1,pru=pr-(dx<<1),p=pr-dx;while((dx--)>0)
+{if(drw)this.mkDiv(x,y,1,1);drw=!drw;if(p>0)
+{y+=yIncr;p+=pru;}
+else p+=pr;++x;}
+if(drw)this.mkDiv(x,y,1,1);}
+else
+{var pr=dx<<1,pru=pr-(dy<<1),p=pr-dy;while((dy--)>0)
+{if(drw)this.mkDiv(x,y,1,1);drw=!drw;y+=yIncr;if(p>0)
+{++x;p+=pru;}
+else p+=pr;}
+if(drw)this.mkDiv(x,y,1,1);}}
+function mkOv(left,top,width,height)
+{var a=width>>1,b=height>>1,wod=width&1,hod=(height&1)+1,cx=left+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa=(a*a)<<1,bb=(b*b)<<1,st=(aa>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa*((b<<1)-1),w,h;while(y>0)
+{if(st<0)
+{st+=bb*((x<<1)+3);tt+=(bb<<1)*(++x);}
+else if(tt<0)
+{st+=bb*((x<<1)+3)-(aa<<1)*(y-1);tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);w=x-ox;h=oy-y;if(w&2&&h&2)
+{this.mkOvQds(cx,cy,-x+2,ox+wod,-oy,oy-1+hod,1,1);this.mkOvQds(cx,cy,-x+1,x-1+wod,-y-1,y+hod,1,1);}
+else this.mkOvQds(cx,cy,-x+1,ox+wod,-oy,oy-h+hod,w,h);ox=x;oy=y;}
+else
+{tt-=aa*((y<<1)-3);st-=(aa<<1)*(--y);}}
+this.mkDiv(cx-a,cy-oy,a-ox+1,(oy<<1)+hod);this.mkDiv(cx+ox+wod,cy-oy,a-ox+1,(oy<<1)+hod);}
+function mkOv2D(left,top,width,height)
+{var s=this.stroke;width+=s-1;height+=s-1;var a=width>>1,b=height>>1,wod=width&1,hod=(height&1)+1,cx=left+a,cy=top+b,x=0,y=b,aa=(a*a)<<1,bb=(b*b)<<1,st=(aa>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa*((b<<1)-1);if(s-4<0&&(!(s-2)||width-51>0&&height-51>0))
+{var ox=0,oy=b,w,h,pxl,pxr,pxt,pxb,pxw;while(y>0)
+{if(st<0)
+{st+=bb*((x<<1)+3);tt+=(bb<<1)*(++x);}
+else if(tt<0)
+{st+=bb*((x<<1)+3)-(aa<<1)*(y-1);tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);w=x-ox;h=oy-y;if(w-1)
+{pxw=w+1+(s&1);h=s;}
+else if(h-1)
+{pxw=s;h+=1+(s&1);}
+else pxw=h=s;this.mkOvQds(cx,cy,-x+1,ox-pxw+w+wod,-oy,-h+oy+hod,pxw,h);ox=x;oy=y;}
+else
+{tt-=aa*((y<<1)-3);st-=(aa<<1)*(--y);}}
+this.mkDiv(cx-a,cy-oy,s,(oy<<1)+hod);this.mkDiv(cx+a+wod-s+1,cy-oy,s,(oy<<1)+hod);}
+else
+{var _a=(width-((s-1)<<1))>>1,_b=(height-((s-1)<<1))>>1,_x=0,_y=_b,_aa=(_a*_a)<<1,_bb=(_b*_b)<<1,_st=(_aa>>1)*(1-(_b<<1))+_bb,_tt=(_bb>>1)-_aa*((_b<<1)-1),pxl=new Array(),pxt=new Array(),_pxb=new Array();pxl[0]=0;pxt[0]=b;_pxb[0]=_b-1;while(y>0)
+{if(st<0)
+{st+=bb*((x<<1)+3);tt+=(bb<<1)*(++x);pxl[pxl.length]=x;pxt[pxt.length]=y;}
+else if(tt<0)
+{st+=bb*((x<<1)+3)-(aa<<1)*(y-1);tt+=(bb<<1)*(++x)-aa*(((y--)<<1)-3);pxl[pxl.length]=x;pxt[pxt.length]=y;}
+else
+{tt-=aa*((y<<1)-3);st-=(aa<<1)*(--y);}
+if(_y>0)
+{if(_st<0)
+{_st+=_bb*((_x<<1)+3);_tt+=(_bb<<1)*(++_x);_pxb[_pxb.length]=_y-1;}
+else if(_tt<0)
+{_st+=_bb*((_x<<1)+3)-(_aa<<1)*(_y-1);_tt+=(_bb<<1)*(++_x)-_aa*(((_y--)<<1)-3);_pxb[_pxb.length]=_y-1;}
+else
+{_tt-=_aa*((_y<<1)-3);_st-=(_aa<<1)*(--_y);_pxb[_pxb.length-1]--;}}}
+var ox=0,oy=b,_oy=_pxb[0],l=pxl.length,w,h;for(var i=0;i<l;i++)
+{if(typeof _pxb[i]!="undefined")
+{if(_pxb[i]<_oy||pxt[i]<oy)
+{x=pxl[i];this.mkOvQds(cx,cy,-x+1,ox+wod,-oy,_oy+hod,x-ox,oy-_oy);ox=x;oy=pxt[i];_oy=_pxb[i];}}
+else
+{x=pxl[i];this.mkDiv(cx-x+1,cy-oy,1,(oy<<1)+hod);this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);ox=x;oy=pxt[i];}}
+this.mkDiv(cx-a,cy-oy,1,(oy<<1)+hod);this.mkDiv(cx+ox+wod,cy-oy,1,(oy<<1)+hod);}}
+function mkOvDott(left,top,width,height)
+{var a=width>>1,b=height>>1,wod=width&1,hod=height&1,cx=left+a,cy=top+b,x=0,y=b,aa2=(a*a)<<1,aa4=aa2<<1,bb=(b*b)<<1,st=(aa2>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa2*((b<<1)-1),drw=true;while(y>0)
+{if(st<0)
+{st+=bb*((x<<1)+3);tt+=(bb<<1)*(++x);}
+else if(tt<0)
+{st+=bb*((x<<1)+3)-aa4*(y-1);tt+=(bb<<1)*(++x)-aa2*(((y--)<<1)-3);}
+else
+{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}
+if(drw)this.mkOvQds(cx,cy,-x,x+wod,-y,y+hod,1,1);drw=!drw;}}
+function mkRect(x,y,w,h)
+{var s=this.stroke;this.mkDiv(x,y,w,s);this.mkDiv(x+w,y,s,h);this.mkDiv(x,y+h,w+s,s);this.mkDiv(x,y+s,s,h-s);}
+function mkRectDott(x,y,w,h)
+{this.drawLine(x,y,x+w,y);this.drawLine(x+w,y,x+w,y+h);this.drawLine(x,y+h,x+w,y+h);this.drawLine(x,y,x,y+h);}
 function jsgFont()
-{
-        this.PLAIN = 'font-weight:normal;';
-        this.BOLD = 'font-weight:bold;';
-        this.ITALIC = 'font-style:italic;';
-        this.ITALIC_BOLD = this.ITALIC + this.BOLD;
-        this.BOLD_ITALIC = this.ITALIC_BOLD;
-}
-var Font = new jsgFont();
-
-
-function jsgStroke()
-{
-        this.DOTTED = -1;
-}
-var Stroke = new jsgStroke();
-
-
-function jsGraphics(id, wnd)
-{
-        this.setColor = new Function('arg', 'this.color = arg.toLowerCase();');
-
-        this.setStroke = function(x)
-        {
-                this.stroke = x;
-                if (!(x+1))
-                {
-                        this.drawLine = mkLinDott;
-                        this.mkOv = mkOvDott;
-                        this.drawRect = mkRectDott;
-                }
-                else if (x-1 > 0)
-                {
-                        this.drawLine = mkLin2D;
-                        this.mkOv = mkOv2D;
-                        this.drawRect = mkRect;
-                }
-                else
-                {
-                        this.drawLine = mkLin;
-                        this.mkOv = mkOv;
-                        this.drawRect = mkRect;
-                }
-        };
-
-
-        this.setPrintable = function(arg)
-        {
-                this.printable = arg;
-                if (jg_fast)
-                {
-                        this.mkDiv = mkDivIe;
-                        this.htmRpc = arg? htmPrtRpc : htmRpc;
-                }
-                else this.mkDiv = jg_n4? mkLyr : arg? mkDivPrt : mkDiv;
-        };
-
-
-        this.setFont = function(fam, sz, sty)
-        {
-                this.ftFam = fam;
-                this.ftSz = sz;
-                this.ftSty = sty || Font.PLAIN;
-        };
-
-
-        this.drawPolyline = this.drawPolyLine = function(x, y, s)
-        {
-                for (var i=0 ; i<x.length-1 ; i++ )
-                        this.drawLine(x[i], y[i], x[i+1], y[i+1]);
-        };
-
-
-        this.fillRect = function(x, y, w, h)
-        {
-                this.mkDiv(x, y, w, h);
-        };
-
-
-        this.drawPolygon = function(x, y)
-        {
-                this.drawPolyline(x, y);
-                this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
-        };
-
-
-        this.drawEllipse = this.drawOval = function(x, y, w, h)
-        {
-                this.mkOv(x, y, w, h);
-        };
-
-
-        this.fillEllipse = this.fillOval = function(left, top, w, h)
-        {
-                var a = (w -= 1)>>1, b = (h -= 1)>>1,
-                wod = (w&1)+1, hod = (h&1)+1,
-                cx = left+a, cy = top+b,
-                x = 0, y = b,
-                ox = 0, oy = b,
-                aa2 = (a*a)<<1, aa4 = aa2<<1, bb = (b*b)<<1,
-                st = (aa2>>1)*(1-(b<<1)) + bb,
-                tt = (bb>>1) - aa2*((b<<1)-1),
-                pxl, dw, dh;
-                if (w+1) while (y > 0)
-                {
-                        if (st < 0)
-                        {
-                                st += bb*((x<<1)+3);
-                                tt += (bb<<1)*(++x);
-                        }
-                        else if (tt < 0)
-                        {
-                                st += bb*((x<<1)+3) - aa4*(y-1);
-                                pxl = cx-x;
-                                dw = (x<<1)+wod;
-                                tt += (bb<<1)*(++x) - aa2*(((y--)<<1)-3);
-                                dh = oy-y;
-                                this.mkDiv(pxl, cy-oy, dw, dh);
-                                this.mkDiv(pxl, cy+oy-dh+hod, dw, dh);
-                                ox = x;
-                                oy = y;
-                        }
-                        else
-                        {
-                                tt -= aa2*((y<<1)-3);
-                                st -= aa4*(--y);
-                        }
-                }
-                this.mkDiv(cx-a, cy-oy, w+1, (oy<<1)+hod);
-        };
-
-
-
-/* fillPolygon method, implemented by Matthieu Haller.
-This javascript function is an adaptation of the gdImageFilledPolygon for Walter Zorn lib.
-C source of GD 1.8.4 found at http://www.boutell.com/gd/
-
-THANKS to Kirsten Schulz for the polygon fixes!
-
-The intersection finding technique of this code could be improved
-by remembering the previous intertersection, and by using the slope.
-That could help to adjust intersections to produce a nice
-interior_extrema. */
-        this.fillPolygon = function(array_x, array_y)
-        {
-                var i;
-                var y;
-                var miny, maxy;
-                var x1, y1;
-                var x2, y2;
-                var ind1, ind2;
-                var ints;
-
-                var n = array_x.length;
-
-                if (!n) return;
-
-
-                miny = array_y[0];
-                maxy = array_y[0];
-                for (i = 1; i < n; i++)
-                {
-                        if (array_y[i] < miny)
-                                miny = array_y[i];
-
-                        if (array_y[i] > maxy)
-                                maxy = array_y[i];
-                }
-                for (y = miny; y <= maxy; y++)
-                {
-                        var polyInts = new Array();
-                        ints = 0;
-                        for (i = 0; i < n; i++)
-                        {
-                                if (!i)
-                                {
-                                        ind1 = n-1;
-                                        ind2 = 0;
-                                }
-                                else
-                                {
-                                        ind1 = i-1;
-                                        ind2 = i;
-                                }
-                                y1 = array_y[ind1];
-                                y2 = array_y[ind2];
-                                if (y1 < y2)
-                                {
-                                        x1 = array_x[ind1];
-                                        x2 = array_x[ind2];
-                                }
-                                else if (y1 > y2)
-                                {
-                                        y2 = array_y[ind1];
-                                        y1 = array_y[ind2];
-                                        x2 = array_x[ind1];
-                                        x1 = array_x[ind2];
-                                }
-                                else continue;
-
-                                 // modified 11. 2. 2004 Walter Zorn
-                                if ((y >= y1) && (y < y2))
-                                        polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
-
-                                else if ((y == maxy) && (y > y1) && (y <= y2))
-                                        polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
-                        }
-                        polyInts.sort(integer_compare);
-                        for (i = 0; i < ints; i+=2)
-                                this.mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
-                }
-        };
-
-
-        this.drawString = function(txt, x, y)
-        {
-                this.htm += '<div style="position:absolute;white-space:nowrap;'+
-                        'left:' + x + 'px;'+
-                        'top:' + y + 'px;'+
-                        'font-family:' +  this.ftFam + ';'+
-                        'font-size:' + this.ftSz + ';'+
-                        'color:' + this.color + ';' + this.ftSty + '">'+
-                        txt +
-                        '<\/div>';
-        }
-
-
-        this.drawImage = function(imgSrc, x, y, w, h)
-        {
-                this.htm += '<div style="position:absolute;'+
-                        'left:' + x + 'px;'+
-                        'top:' + y + 'px;'+
-                        'width:' +  w + ';'+
-                        'height:' + h + ';">'+
-                        '<img src="' + imgSrc + '" width="' + w + '" height="' + h + '">'+
-                        '<\/div>';
-        }
-
-
-        this.clear = function()
-        {
-                this.htm = "";
-                if (this.cnv) this.cnv.innerHTML = this.defhtm;
-        };
-
-
-        this.mkOvQds = function(cx, cy, xl, xr, yt, yb, w, h)
-        {
-                this.mkDiv(xr+cx, yt+cy, w, h);
-                this.mkDiv(xr+cx, yb+cy, w, h);
-                this.mkDiv(xl+cx, yb+cy, w, h);
-                this.mkDiv(xl+cx, yt+cy, w, h);
-        };
-
-        this.setStroke(1);
-        this.setFont('verdana,geneva,helvetica,sans-serif', String.fromCharCode(0x31, 0x32, 0x70, 0x78), Font.PLAIN);
-        this.color = '#000000';
-        this.htm = '';
-        this.wnd = wnd || window;
-
-        if (!(jg_ie || jg_dom || jg_ihtm)) chkDHTM();
-        if (typeof id != 'string' || !id) this.paint = pntDoc;
-        else
-        {
-                this.cnv = document.all? (this.wnd.document.all[id] || null)
-                        : document.getElementById? (this.wnd.document.getElementById(id) || null)
-                        : null;
-                this.defhtm = (this.cnv && this.cnv.innerHTML)? this.cnv.innerHTML : '';
-                this.paint = jg_dom? pntCnvDom : jg_ie? pntCnvIe : jg_ihtm? pntCnvIhtm : pntCnv;
-        }
-
-        this.setPrintable(false);
-}
-
-
-
+{this.PLAIN='font-weight:normal;';this.BOLD='font-weight:bold;';this.ITALIC='font-style:italic;';this.ITALIC_BOLD=this.ITALIC+this.BOLD;this.BOLD_ITALIC=this.ITALIC_BOLD;}
+var Font=new jsgFont();function jsgStroke()
+{this.DOTTED=-1;}
+var Stroke=new jsgStroke();function jsGraphics(id,wnd)
+{this.setColor=new Function('arg','this.color = arg.toLowerCase();');this.setStroke=function(x)
+{this.stroke=x;if(!(x+1))
+{this.drawLine=mkLinDott;this.mkOv=mkOvDott;this.drawRect=mkRectDott;}
+else if(x-1>0)
+{this.drawLine=mkLin2D;this.mkOv=mkOv2D;this.drawRect=mkRect;}
+else
+{this.drawLine=mkLin;this.mkOv=mkOv;this.drawRect=mkRect;}};this.setPrintable=function(arg)
+{this.printable=arg;if(jg_fast)
+{this.mkDiv=mkDivIe;this.htmRpc=arg?htmPrtRpc:htmRpc;}
+else this.mkDiv=jg_n4?mkLyr:arg?mkDivPrt:mkDiv;};this.setFont=function(fam,sz,sty)
+{this.ftFam=fam;this.ftSz=sz;this.ftSty=sty||Font.PLAIN;};this.drawPolyline=this.drawPolyLine=function(x,y,s)
+{for(var i=0;i<x.length-1;i++)
+this.drawLine(x[i],y[i],x[i+1],y[i+1]);};this.fillRect=function(x,y,w,h)
+{this.mkDiv(x,y,w,h);};this.drawPolygon=function(x,y)
+{this.drawPolyline(x,y);this.drawLine(x[x.length-1],y[x.length-1],x[0],y[0]);};this.drawEllipse=this.drawOval=function(x,y,w,h)
+{this.mkOv(x,y,w,h);};this.fillEllipse=this.fillOval=function(left,top,w,h)
+{var a=(w-=1)>>1,b=(h-=1)>>1,wod=(w&1)+1,hod=(h&1)+1,cx=left+a,cy=top+b,x=0,y=b,ox=0,oy=b,aa2=(a*a)<<1,aa4=aa2<<1,bb=(b*b)<<1,st=(aa2>>1)*(1-(b<<1))+bb,tt=(bb>>1)-aa2*((b<<1)-1),pxl,dw,dh;if(w+1)while(y>0)
+{if(st<0)
+{st+=bb*((x<<1)+3);tt+=(bb<<1)*(++x);}
+else if(tt<0)
+{st+=bb*((x<<1)+3)-aa4*(y-1);pxl=cx-x;dw=(x<<1)+wod;tt+=(bb<<1)*(++x)-aa2*(((y--)<<1)-3);dh=oy-y;this.mkDiv(pxl,cy-oy,dw,dh);this.mkDiv(pxl,cy+oy-dh+hod,dw,dh);ox=x;oy=y;}
+else
+{tt-=aa2*((y<<1)-3);st-=aa4*(--y);}}
+this.mkDiv(cx-a,cy-oy,w+1,(oy<<1)+hod);};this.fillPolygon=function(array_x,array_y)
+{var i;var y;var miny,maxy;var x1,y1;var x2,y2;var ind1,ind2;var ints;var n=array_x.length;if(!n)return;miny=array_y[0];maxy=array_y[0];for(i=1;i<n;i++)
+{if(array_y[i]<miny)
+miny=array_y[i];if(array_y[i]>maxy)
+maxy=array_y[i];}
+for(y=miny;y<=maxy;y++)
+{var polyInts=new Array();ints=0;for(i=0;i<n;i++)
+{if(!i)
+{ind1=n-1;ind2=0;}
+else
+{ind1=i-1;ind2=i;}
+y1=array_y[ind1];y2=array_y[ind2];if(y1<y2)
+{x1=array_x[ind1];x2=array_x[ind2];}
+else if(y1>y2)
+{y2=array_y[ind1];y1=array_y[ind2];x2=array_x[ind1];x1=array_x[ind2];}
+else continue;if((y>=y1)&&(y<y2))
+polyInts[ints++]=Math.round((y-y1)*(x2-x1)/(y2-y1)+x1);else if((y==maxy)&&(y>y1)&&(y<=y2))
+polyInts[ints++]=Math.round((y-y1)*(x2-x1)/(y2-y1)+x1);}
+polyInts.sort(integer_compare);for(i=0;i<ints;i+=2)
+this.mkDiv(polyInts[i],y,polyInts[i+1]-polyInts[i]+1,1);}};this.drawString=function(txt,x,y)
+{this.htm+='<div style="position:absolute;white-space:nowrap;'+'left:'+x+'px;'+'top:'+y+'px;'+'font-family:'+this.ftFam+';'+'font-size:'+this.ftSz+';'+'color:'+this.color+';'+this.ftSty+'">'+
+txt+'<\/div>';}
+this.drawImage=function(imgSrc,x,y,w,h)
+{this.htm+='<div style="position:absolute;'+'left:'+x+'px;'+'top:'+y+'px;'+'width:'+w+';'+'height:'+h+';">'+'<img src="'+imgSrc+'" width="'+w+'" height="'+h+'">'+'<\/div>';}
+this.clear=function()
+{this.htm="";if(this.cnv)this.cnv.innerHTML=this.defhtm;};this.mkOvQds=function(cx,cy,xl,xr,yt,yb,w,h)
+{this.mkDiv(xr+cx,yt+cy,w,h);this.mkDiv(xr+cx,yb+cy,w,h);this.mkDiv(xl+cx,yb+cy,w,h);this.mkDiv(xl+cx,yt+cy,w,h);};this.setStroke(1);this.setFont('verdana,geneva,helvetica,sans-serif',String.fromCharCode(0x31,0x32,0x70,0x78),Font.PLAIN);this.color='#000000';this.htm='';this.wnd=wnd||window;if(!(jg_ie||jg_dom||jg_ihtm))chkDHTM();if(typeof id!='string'||!id)this.paint=pntDoc;else
+{this.cnv=document.all?(this.wnd.document.all[id]||null):document.getElementById?(this.wnd.document.getElementById(id)||null):null;this.defhtm=(this.cnv&&this.cnv.innerHTML)?this.cnv.innerHTML:'';this.paint=jg_dom?pntCnvDom:jg_ie?pntCnvIe:jg_ihtm?pntCnvIhtm:pntCnv;}
+this.setPrintable(false);}
 function integer_compare(x,y)
-{
-        return (x < y) ? -1 : ((x > y)*1);
-}
-
+{return(x<y)?-1:((x>y)*1);}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/html/mod_treefolder2.php
===================================================================
--- tags/2.4.2/http/html/mod_treefolder2.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/html/mod_treefolder2.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -326,7 +326,7 @@
 	if (parent.mb_mapObj[mapObj_id].wms[wms_id].gui_wms_visible > 0) {
 		var divId = 'div_'+wms_id;
 		wmsImage = parent.mapframe1.document.getElementById(divId);
-		if (wmsImage != null) {
+		if (wmsImage != null && !isNaN(opacity) && opacity != 100) {
 			wmsImage.style.opacity = (opacity / 100);
 			wmsImage.style.MozOpacity = (opacity / 100);
 			wmsImage.style.KhtmlOpacity = (opacity / 100);

Modified: tags/2.4.3_rc1/http/index.php
===================================================================
--- tags/2.4.2/http/index.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/index.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -109,7 +109,7 @@
 		
 			<div class="mapbender_welcome">Welcome to <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font></div>
 		
-		<font color="#ff0000">Mapbender Version 2.4.2 (2007-07-30)</font>
+		<font color="#ff0000">Mapbender Version 2.4.3 rc1 (2007-09-21)</font>
 		</td></tr>
 	</table>
 <br>

Modified: tags/2.4.3_rc1/http/javascripts/geometry.js
===================================================================
--- tags/2.4.2/http/javascripts/geometry.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/javascripts/geometry.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,1208 +1,98 @@
-/* 
-* $Id$
-* COPYRIGHT: (C) 2001 by ccgis. This program is free software under the GNU General Public
-* License (>=v2). Read the file gpl.txt that comes with Mapbender for details. 
-*/
-// http://www.mapbender.org/index.php/GeometryArray.js
-
-
-var nameGeometryArray = "GeometryArray";
-var nameMultiGeometry = "MultiGeometry";
-var nameGeometry = "Geometry";
-
-
-/**
- * @class A class representing geometry types "polygon", "line" and "point".
- *
- * @constructor
- */
-function GeomType(){
-	/**
-	 * An identifier for polygons. If you want to check if a {@link MultiGeometry}
-	 * or {@link Geometry} is a polygon, write
-	 * if (someGeometry.geomType == geomType.polygon
-	 * 
-	 * @type String
-	 */
-	this.polygon = "polygon";
-
-	/**
-	 * An identifier for polygons. If you want to check if a {@link MultiGeometry}
-	 * or {@link Geometry} is a line, write
-	 * if (someGeometry.geomType == geomType.line
-	 * 
-	 * @type String
-	 */
-	this.line = "line";
-
-	/**
-	 * An identifier for polygons. If you want to check if a {@link MultiGeometry}
-	 * or {@link Geometry} is a point, write
-	 * if (someGeometry.geomType == geomType.point
-	 * 
-	 * @type String
-	 */
-	this.point = "point";
-}
-var geomType = new GeomType();
-
-
-/**
- * @class a {@link GeometryArray} is a {@link List} of {@link MultiGeometry} objects
- *
- * @ extends List
- * @ requires MultiGeometry 
- * @ requires Geometry
- * @ requires Point
- * @ constructor
- */
-function GeometryArray(){
-
-	/*
-	 * creates a new, empty Multigeometry and adds it to this GeometryArray
-	 *
-	 * @param {String} geomType a {@link GeomType}
-	 */
-	this.addMember = function(geomType){
-		this.add(new MultiGeometry(geomType));
-	};
-	
-	/**
-	 * @ignore
-	 */
-	this.name = nameGeometryArray;
-	
-	/**
-	 * A {@link List} of {@link MultiGeometry} objects.
-	 * 
-	 * @type List
-	 */
-	this.list = [];
-}
-
-GeometryArray.prototype = new List();
-	
-/**
- * gets the j-th {@link Geometry} object of the i-th {@link MultiGeometry} object
- *
- * @param {Integer} i index of the MultiGeometry
- * @param {Integer} j index of the Geometry
- * @type Geometry 
- */
-GeometryArray.prototype.getGeometry = function(i,j){
-	return this.get(i).get(j);
-};
-
-/**
- * gets the k-th Point of the j-th {@link Geometry} object of the i-th {@link MultiGeometry} object
- *
- * @param {Integer} i index of the MultiGeometry
- * @param {Integer} j index of the Geometry
- * @param {Integer} k index of the Point
- * @type Point
- * @returns the Point object at the given indices
- */
-GeometryArray.prototype.getPoint = function(i,j,k){
-	return this.get(i).get(j).get(k);
-};
-
-/**
- * gets an Array of indices; the {@link MultiGeometry} objects at these indices are equal to geom
- *
- * @type Integer[]
- * @param {MultiGeometry} geom 
- * @returns an Array of indices
- */
-GeometryArray.prototype.findMultiGeometry = function(geom) {
-	var a = [];
-	for (var i=0; i < this.count(); i++) {
-		if (this.get(i).equals(geom)) {a.push(i);}
-	}
-	return a;
-};
-	
-/**
- * deletes the j-th {@link Geometry} object of the i-th {@link MultiGeometry} object
- *
- * @param {Integer} i index of the MultiGeometry
- * @param {Integer} j index of the Geometry
- */
-GeometryArray.prototype.delGeometry = function(i,j){
-	if (this.get(i).del(j) === false) {this.del(i);}
-};
-	
-/**
- * deletes the k-th {@link Point} of the j-th {@link Geometry} object of the i-th {@link MultiGeometry} object
- *
- * @param {Integer} i index of the MultiGeometry
- * @param {Integer} j index of the Geometry
- * @param {Integer} k index of the Point
- */
-GeometryArray.prototype.delPoint = function (i,j,k){
-	var res = this.get(i).delPoint(j,k);
-	if (res === false) {this.del(i);}
-};
-	
-/**
- * closes the current {@link MultiGeometry}. Calls method close of the {@link Geometry} class.
- *
- */
-GeometryArray.prototype.close = function(){
-	if (!this.get(-1).get(-1).close()) {
-		this.delGeometry(-1, -1);
-	}
-	else {
-		if (this.get(-1).get(-1).count() === 0) {this.get(-1).del(-1);}
-		if (this.get(-1).count() === 0) {this.del(-1);}
-	}
-	
-};
-
-/**
- * deletes all {@link Point} objects of this {@link GeometryArray} that equal point
- *
- * @param {Point} point
- */
-GeometryArray.prototype.delAllPointsLike = function(point){
-	var finished = false;
-	while (finished === false){
-		finished = true;
-		for (var i = 0 ; finished === true && i < this.count() ; i++){
-			for (var j = 0 ; finished === true && j < this.get(i).count() ; j++){
-				for (var k = 0 ; finished === true && k < this.get(i).get(j).count() ; k++){
-					if (this.getPoint(i,j,k).equals(point)){
-						this.delPoint(i,j,k);
-						finished = false;
-					}
-				}
-			} 
-		}
-	}
-};
-	
-/**
- * updates all {@link Point} objects of this {@link GeometryArray} that equal oldP to newP
- *
- * @param {Point} oldP
- * @param {Point} newP
- */
-GeometryArray.prototype.updateAllPointsLike = function(oldP, newP){
-	for (var i = 0; i < this.count(); i++){
-		this.get(i).updateAllPointsLike(oldP, newP);
-	}
-};
-	
-/**
- * @class a MultiGeometry is a List of Geometry objects
- *
- * @ extends List
- * @ requires Geometry
- * @ requires Point
- * @ constructor
- * @ param {String} geomType a geomType
- */
-function MultiGeometry(geomType){
-
-	/*
-	 * creates a new, empty {@link Geometry} object and adds it to this {@link MultiGeometry}
-	 *
-	 */
-	this.addGeometry = function(){
-		this.add(new Geometry(this.geomType));
-	};
-	
-	/**
-	 * deletes the {@link Geometry} object at index i; -1 refers to the last {@link Geometry object in the list
-	 * overwrites the del function of {@link List}.
-	 *
-	 * @param {Integer} i index
-	 */
-	this.del = function(i){
-		i = this.getIndex(i);
-		if (i !== false){
-			var tmpLength = this.count() - 1;
-			for (var z = i; z < tmpLength ; z ++){
-				this.list[z] = this.list[z+1];
-				e[z] = e[z+1];
-			}
-			this.list.length -= 1;
-			if (this.list.length === 0) {return false;}
-		}
-		return true;
-	};
-
-	this.list = [];
-	this.e = new Wfs_element();
-	this.geomType = geomType;
-	this.name = nameMultiGeometry;
-}
-
-MultiGeometry.prototype = new List();
-
-/**
- * updates all {@link Point} objects of this {@link MultiGeometry} that equal oldP to newP
- *
- * @param {Point} oldP
- * @param {Point} newP
- */
-MultiGeometry.prototype.updateAllPointsLike = function(oldP, newP){
-	for (var i = 0; i < this.count(); i++) {
-		this.get(i).updateAllPointsLike(oldP, newP);
-	}
-};
-
-/**
- * gets the bounding box of this {@link MultiGeometry}
- *
- * @return the bounding box
- * @type Array of two Point objects
- */
-MultiGeometry.prototype.getBBox = function(){
-	var q = this.get(0).get(0);
-	var min = cloneObject(q);
-	var max = cloneObject(q);
-	for(var i=0; i<this.count();i++){
-		var pos = this.get(i).getBBox();
-		if (pos[0].x < min.x) {min.x = pos[0].x;}
-		if (pos[1].x > max.x) {max.x = pos[1].x;}
-		if (pos[1].y > max.y) {max.y = pos[1].y;}
-		if (pos[0].y < min.y) {min.y = pos[0].y;}
-	}
-	return [min, max];
-};
-/**
- * gets the center of the bounding box of this {@link MultiGeometry}.
- *
- * @return the center of the bounding box
- * @type Point
- */
-MultiGeometry.prototype.getCenter = function(){
-	var tmp = this.getBBox();
-	var x = parseFloat(tmp[0].x) + parseFloat((tmp[1].x - tmp[0].x)/2);
-	var y = parseFloat(tmp[0].y) + parseFloat((tmp[1].y - tmp[0].y)/2);
-	return new Point(x,y);
-};
-
-/**
- * gets the total number of {@link Point} objects of this {@link MultiGeometry}.
- *
- * @return number of points
- * @type Integer
- */
-MultiGeometry.prototype.getTotalPointCount = function(){ 
-	var c = 0;
-	for (var i = 0 ; i < this.count(); i++)	{
-		c += this.get(i).count();
-	}
-	return c;
-};
-
-/**
- * gets the total number of {@link Point} objects of this {@link MultiGeometry}.
- *
- * @return number of points
- * @type Integer
- */
-MultiGeometry.prototype.getPoint = function(j,k){
-	return this.get(j).get(k);
-};
-
-/**
- * compares this {@link MultiGeometry} object with the {@link MultiGeometry} object multigeom.
- *
- * @param {MultiGeometry} multigeom another multigeometry
- * @return true if he multigeometries match; else false 
- * @type Boolean
- */
-MultiGeometry.prototype.equals = function(multigeom) {
-	if (this.geomType != multigeom.geomType) {return false;}
-	if (this.count() != multigeom.count()) {return false;}
-	if (this.getTotalPointCount() != multigeom.getTotalPointCount()) {return false;}
-	for (var i=0; i<this.count(); i++) {
-		if (!this.get(i).equals(multigeom.get(i))) {return false;}
-	}
-	return true;
-};
-
-/**
- * deletes the j-th {@link Point} object of the i-th {@link Geometry} object of this {@link MultiGeometry} object.
- *
- * @param {Integer} i geometry index
- * @param {Integer} j point index
- * @return true if the deletion succeded; else false.
- * @type Boolean
- */
-MultiGeometry.prototype.delPoint = function(i,j){
-	var res = this.get(i).del(j);
-	if (res === false) {return this.del(i);}
-	return true;
-};
-
-
-/**
- * @class a Geometry is a List of Point objects. If it is a polygon, the last point has 
- * to equal the first point.
- *
- * @extends List
- * @requires Point
- * @constructor
- * @param {String} a string representing a geometry type, see @see GeomType.
- */
-function Geometry(aGeomtype){
-
-	/**
-	 * deletes the {@link Point} object at index i; -1 refers to the last 
-	 * {@link Point} object in the list. Overwrites the del function of 
-	 * {@link List}.
-	 *
-	 * @param {Integer} i index
-	 * @return false if deletion is not yet finished. It is cascaded to 
-	 *         {@link MultiGeometry}. True if the deletion is finished.
-	 */
-	this.del = function(i){
-		i = this.getIndex(i);
-		if (i !== false) {
-			var tmpLength = this.count()-1;
-			
-			for (var z = i; z < tmpLength ; z ++){
-				this.list[z] = this.list[z+1];
-			}
-			this.list.length -= 1;
-		
-			if (this.geomType == geomType.polygon){
-				if (i == tmpLength) {this.list[0] = this.list[tmpLength-1];}
-				else if (i === 0) {this.list[tmpLength-1] = this.list[0];}
-				if (this.list.length == 1){return false;}
-			}
-			updateDist();
-			if(this.list.length === 0) {return false;}
-			return true;
-		}
-		return false;
-	};
-
-	/**
-	 * adds a {@link Point} object to this {@link Geometry} object.
-	 *
-	 * @param {Float} x x value of the point
-	 * @param {Float} y y value of the point
-	 */	
-	this.addPointByCoordinates = function(x,y){
-		this.add(new Point(x,y));
-		updateDist();
-	};
-
-	/**
-	 * adds a {@link Point} object to this {@link Geometry} object.
-	 *
-	 * @param {Point} aPoint another point
-	 */	
-	this.addPoint = function(aPoint){
-		this.add(new Point(aPoint.x, aPoint.y));
-		updateDist();
-	};
-
-	/**
-	 * inserts a {@link Point} object at index i of this {@link Geometry} object.
-	 *
-	 * @param {Point} p another point
-	 * @param {Integer} i index
-	 */	
-	this.addPointAtIndex = function(p,i){
-		i = this.getIndex(i);
-		if (i !== false){
-			for(var z = this.count(); z > i; z--){
-				this.list[z] = this.list[z-1];
-			}
-			this.list[i] = new Point(p.x, p.y);
-			updateDist();
-		}
-	};
-	
-	/**
-	 * Overwrites the {@link Point) object at index i with the {@link Point} object p.
-	 *
-	 * @private
-	 * @param {Point} p another point
-	 * @param {Integer} i index
-	 */	
-	this.updatePointAtIndex = function(p, i){
-		i = this.getIndex(i);
-		if ((i === 0 || i == this.count()-1) && this.geomType == geomType.polygon){
-			this.list[0] = p;
-			this.list[this.count()-1] = p;
-		}
-		else {this.list[i] = p;}
-		updateDist();
-	};
-	
-	/**
-	 * Updates the {@link Geometry#dist} and {@link Geometry#totaldist}
-	 *
-	 * @private
-	 */	
-	var updateDist = function(){
-		dist[0] = 0;		
-		totaldist[0] = 0;		
-		for (var i = 1 ; i < that.count(); i++){
-			dist[i] = that.get(i-1).dist(that.get(i));
-			totaldist[i] = totaldist[i-1] + dist[i];
-		}
-	};
-	/**
-	 * gets the distance between the last and last but one point of this {@link Geometry}.
-	 *
-	 * @param {Integer} numberOfDigitis round to numberOfDigits (optional)
-	 * @return the distance
-	 * @type Float
-	 */	
-	this.getCurrentDist = function(numberOfDigits) {
-		if (typeof(numberOfDigits) == "number") {
-			return roundToDigits(dist[this.count()-1], numberOfDigits);
-		}
-		return dist[this.count()-1];
-		
-	};
-	/**
-	 * gets the length of the outer rim of this {@link Geometry}.
-	 *
-	 * @param {Integer} numberOfDigitis round to numberOfDigits (optional)
-	 * @return the distance
-	 * @type Float
-	 */	
-	this.getTotalDist = function(numberOfDigits) {
-		if (typeof(numberOfDigits) == "number") {
-			return roundToDigits(totaldist[this.count()-1], numberOfDigits);
-		}
-		return totaldist[this.count()-1];
-	};
-	/**
-	 * closes this {@link Geometry}. 
-	 *
-	 * @return true if the geometry could be closed; otherwise false
-	 * @type Boolean
-	 */	
-	this.close = function(){
-		complete = true;
-		if (this.geomType == geomType.polygon){
-			if (this.count() > 2){
-				if (!this.get(0).equals(this.get(-1))) {
-					this.addPoint(this.get(0));
-				}
-			}
-			else {return false;}
-		}
-		if (this.geomType == geomType.line){
-			if (this.count() < 2){return false;}
-		}
-		return true;
-	};
-	/**
-	 * checks if this {@link Geometry} has been closed. 
-	 *
-	 * @return true if the geometry is closed; otherwise false
-	 * @type Boolean
-	 */	
-	this.isComplete = function() { 
-		return complete;
-	};
-	
-	this.list = [];
-	var dist = [];
-	var totaldist = [];
-	var complete = false;
-
-	var that = this;
-
-	this.geomType = aGeomtype;
-	this.name = nameGeometry;
-}
-
-Geometry.prototype = new List();
-
-/**
- * gets the bounding box of this {@link Geometry}
- *
- * @return the bounding box (array of two Point objects)
- * @type Point[]
- */
-Geometry.prototype.getBBox = function(){
-	var q = this.get(0);
-	var min = cloneObject(q);
-	var max = cloneObject(q);
-	
-	for (var j=0; j<this.count(); j++){
-		var pos = this.get(j);
-		if (pos.x < min.x) {min.x = pos.x;}
-		else if (pos.x > max.x) {max.x = pos.x;}
-		if (pos.y < min.y) {min.y = pos.y;}
-		else if (pos.y > max.y) {max.y = pos.y;}
-	}
-	return [min, max];
-};
-
-/**
- * updates all {@link Point} objects of this {@link Geometry} that equal oldP to newP
- *
- * @param {Point} oldP
- * @param {Point} newP
- */
-Geometry.prototype.updateAllPointsLike = function(oldP, newP){
-	var len = this.count();
-	for (var i = 0; i < len ; i++){
-		if (oldP.equals(this.get(i))){
-			if (i>0 && newP.equals(this.get(i-1))){
-				this.del(i);
-				len--;
-				i--;
-			}
-			else {this.updatePointAtIndex(newP, i);}
-		}
-	}
-};
-
-/**
- * compares this {@link Geometry} object with the {@link Geometry} object geom point by point.
- *
- * @param {Geometry} geom another geometry
- * @return true if he geometries match; else false 
- * @type Boolean
- */
-Geometry.prototype.equals = function(geom) {
-	if (this.geomType != geom.geomType) {return false;}
-	if (this.count() != geom.count()) {return false;}
-	for (var i=0; i < this.count(); i++) {
-		if (!this.get(i).equals(geom.get(i))) {return false;}
-	}
-	return true;
-};
-
-
-/**
- * @class an array of elements, each consisting of a name/value pair
- *
- * @ constructor
- */
-function Wfs_element(){
-
-	/**
-	 * returns the number of elements of this {@link Wfs_element} object.
-	 *
-	 * @return the number of elements
-	 * @type Integer
-	 */
-	this.count = function(){
-		return name.length;
-	};
-
-	/**
-	 * returns the name of the element at index i.
-	 *
-	 * @param {Integer} i index
-	 * @return the name
-	 * @type String
-	 */
-	this.getName = function(i){ 
-		if (isValidElementIndex(i)) {return name[i];}
-		return false;
-	};
-	
-	/**
-	 * returns the value of the element at index i.
-	 *
-	 * @param {Integer} i index
-	 * @return the value
-	 */
-	this.getValue = function(i){ 
-		if (isValidElementIndex(i)) {return value[i];}
-		return false;
-	};
-
-	/**
-	 * appends a new element with a given name. If an element with this name exists, it is overwritten.
-	 *
-	 * @param {String} aName the name of the new element
-	 * @param {String} aValue the value of the new element
-	 */
-	this.setElement = function(aName, aValue){ 
-		var i = this.getElementIndexByName(aName);
-		if (i === false) {i = this.count();}
-		name[i] = aName;
-		value[i] = aValue;
-	};
-
-	/**
-	 * checks if an index is valid
-	 *
-	 * @private
-	 * @param {Integer} i an index
-	 * @return true if the index is valid; otherwise false
-	 * @type Boolean
-	 */
-	var isValidElementIndex = function(i){ 
-		if (i>=0 && i<name.length) {return true;}
-		var e = new Mb_exception("class Wfs_element: function isValidElementIndex: illegal element index");
-		return false;
-	};
-	
-	var name  = [];
-	var value = [];
-}
-
-/**
- * gets the index of the element with a given name.
- *
- * @param {String} elementName a name
- * @return the index of the element; if no element with this name exists, false
- * @type Integer, Boolean
- */
-Wfs_element.prototype.getElementIndexByName = function(elementName){
-	for (var j = 0 ; j < this.count() ; j++){
-		if (this.getName(j) == elementName) {return j;}
-	}
-	return false;
-};
-
-/**
- * gets the value of the element with a given name.
- *
- * @param {String} elementName a name
- * @return the value of the element; if no element with this name exists, false
- * @type String, Boolean
- */
-Wfs_element.prototype.getElementValueByName = function(elementName){
-	var i = this.getElementIndexByName(elementName);
-	if (i === false) {return false;}
-	return this.getValue(i);
-};
-
-
-/**
- * @class a {@link Canvas} contains a {@link DivTag} that holds graphics rendered by {@link jsGraphics}
- *
- * @constructor
- * @requires DivTag
- * @requires jsGraphics
- * @requires GeometryArray
- * @requires MultiGeometry
- * @requires Geometry
- * @param {String} aMapFrame name of the target mapframe
- * @param {String} aTagName name of the target div tag
- * @param {String} aStyle style of the div tag
- * @param {Integer} aLineWidth the line width of the jsGraphics output
- */
-function Canvas(aMapframe, aTagName, aStyle, aLineWidth) {
-	
-	/**
-	 * draws the geometry of the canvas
-	 *
-	 * @param {String} t geometry type (@see GeomType)
-	 * @param {MultiGeometry} g a MultiGeometry object
-	 * @param {String} col a color
-	 * @private
-	 */
- 	this.drawGeometry = function(t,g,col){ 
-		var mapObjInd = getMapObjIndexByName(mapframe);
-		width = mb_mapObj[mapObjInd].width;
-		height = mb_mapObj[mapObjInd].height;
-		for(var i=0; i < g.count(); i++){
-			if(t==geomType.point) {
-				var p = realToMap(mapframe,g.get(i).get(0));
-				if (p.x + diameter < mb_mapObj[mapObjInd].width && p.x - diameter > 0 &&
-					p.y + diameter < mb_mapObj[mapObjInd].height && p.y - diameter > 0) {
-					drawCircle(p.x-1, p.y-1, diameter,col);
-				}
-			}
-			else if(t==geomType.line || t==geomType.polygon) {
-				for (var j=0; j<g.get(i).count()-1; j++) {
-					var pq = calculateVisibleDash(realToMap(mapframe,g.get(i).get(j)), realToMap(mapframe,g.get(i).get(j+1)), width, height);
-					if (pq) {
-						drawLine([pq[0].x-1, pq[1].x-1], [pq[0].y-1, pq[1].y-1], col);
-					}
-				}
-			}
-			else {
-				var e = new Mb_exception("class Canvas: function drawGeometry: unknown geomType " + t);
-			}
-		}
-	};
-	
-	/**
-	 * checks if the MultiGeometry's bounding box width and height is smaller than minWidth
-	 *
-	 * @private
-	 * @param {MultiGeometry} g a MultiGeometry object
-	 */
-	this.isTooSmall = function(g){
-		var tmp = g.getBBox();
-		var min = realToMap(mapframe,tmp[0]);
-		var max = realToMap(mapframe,tmp[1]);
-		if((Math.abs(max.x - min.x) < minWidth) && (Math.abs(max.y - min.y) < minWidth)) {
-			return true;
-		}
-		return false;
-	};
-	
-	/**
-	 * gets the jsGraphics.
-	 *
-	 * @private
-	 * @return the jsGraphics
-	 * @type jsGraphics
-	 */
-	this.getCanvas = function(){
-		return canvas;
-	};
-	
-	/**
-	 * draws a circle with {@link jsGraphics}.
-	 *
-	 * @private
-	 * @param {Float} x x value of the center
-	 * @param {Float} y y value of the center
-	 * @param {Float} diameter diameter of the circle
-	 * @param {String} color the color of the circle in hex format
-	 */
-	var drawCircle = function(x, y, diameter, color) {
-		canvas.setColor(color);
-		canvas.drawEllipse(x-diameter/2,y-diameter/2,diameter,diameter);
-	};
-
-	/**
-	 * draws a polyline with {@link jsGraphics}.
-	 *
-	 * @private
-	 * @param {Array} x_array array of x values
-	 * @param {Array} y_array array of y values
-	 * @param {String} color the color of the polyline in hex format
-	 */
-	var drawLine = function(x_array, y_array, color) {
-		canvas.setColor(color);
-		canvas.drawPolyline(x_array, y_array);
-	};
-
-	/**
-	 * This is the {@link DivTag} that contains the output by {@link jsGraphics}.
-	 * 
-	 * @type DivTag
-	 */
-	this.canvasDivTag = new DivTag(aTagName, aMapframe, aStyle);
-
-	var that = this;
-
-	var diameter = 8;
-	var minWidth = 8;
-	var lineWidth = aLineWidth;
-	var mapframe = aMapframe;
-	var style = aStyle;
-	var canvas = new jsGraphics(aTagName, window.frames[mapframe]);
-	canvas.setStroke(lineWidth);
-	mb_registerPanSubElement(aTagName);
-}
-
-/**
- * cleans the canvas by emptying the canvas {@link DivTag}.
- */
-Canvas.prototype.clean = function () {
-	this.canvasDivTag.clean();
-};
-
-/**
- * paints all geometries.
- *
- * @param {GeometryArray} gA the geometries that will be drawn
- */
-Canvas.prototype.paint = function(gA) {
-	for (var q = 0; q < gA.count(); q++) {
-		var m = gA.get(q);
-		var t = m.geomType;
-		var col = m.color;
-		if (t == geomType.point) {
-			this.drawGeometry(t,m,col);
-		}
-		else {
-			if (this.isTooSmall(m)){
-				var newMember = new MultiGeometry(geomType.point);
-				newMember.addGeometry();
-				newMember.get(-1).addPoint(m.getCenter());
-				this.drawGeometry(geomType.point,newMember,col);
-			}
-			else{
-				if(t == geomType.line) {this.drawGeometry(t,m, col);}
-				else if(t == geomType.polygon) {this.drawGeometry(t,m,col);}
-				else {
-					var e = new Mb_exception("class Canvas: function paint: unknown geomType" + t);				
-				}
-			}
-		}
-	}
-	this.getCanvas().paint();
-};
-
-/**
- * @class a {@link Highlight} object is {@link jsGraphics} rendering of a {@link GeometryArray} in various mapframes.
- *
- * @constructor
- * @requires Canvas
- * @requires GeometryArray
- * @param {Array} aTargetArray an array of Strings referring to mapframes
- * @param {String} aTagName the name of the div tags
- * @param {Object} aStyle the style of the div tags
- * @param {Integer} the line width of the jsGraphics lines
- */
-function Highlight(aTargetArray, aTagName, aStyle, aLineWidth) {
-	/**
-	 * removes a {@link MultiGeometry} object from the geometry Array
-	 *
-	 * @param {MultiGeometry} m a MultiGeometry
-	 * @param {String} color a color
-	 */	
-	this.del = function(m, color) {
-		var a = gA.findMultiGeometry(m);
-		var del = false;
-		for (var i=0; i<a.length && del === false; i++) {
-			if (gA.get(a[i]).color == color) {
-				gA.del(a[i]);
-				del = true;
-			}
-		}
-		this.paint();
-	};
-
-	/**
-	 * adds a {@link MultiGeometry} object to the geometry Array
-	 *
-	 * @param {MultiGeometry} m a MultiGeometry
-	 * @param {String} color the color of the highlight
-	 */	
-	this.add = function(m, color) {
-		gA.addCopy(m);
-		if (typeof(color) != 'undefined') {gA.get(-1).color = color;} 
-		else {gA.get(-1).color = lineColor;}
-		this.paint();
-	};
-	
-	/**
-	 * removes all MultiGeometries.
-	 *
-	 */	
-	this.clean = function() {
-		if (gA.count() > 0) {
-			gA = new GeometryArray();
-			this.paint();
-		}
-	};
-
-	/**
-	 * displays the highlight
-	 *
-	 */	
-	this.paint = function() {
-		for (var i=0; i < canvas.length; i++) {
-			if (typeof(canvas[i]) == "object") {canvas[i].clean();}
-		}
-		for (var i=0; i<targets.length; i++){
-			if (typeof(canvas[i]) == 'undefined') {
-				canvas[i] = new Canvas(targets[i], tagname, style, lineWidth);
-			}
-			canvas[i].paint(gA);
-		}
-	};
-
-	var lineWidth = aLineWidth;
-	var tagname = 'mod_gaz_draw'+aTagName;
-	var style = aStyle;
-	var targets = aTargetArray; 
-	var canvas = []; 
-	var gA = new GeometryArray(); 
-	var lineColor = "#ff0000";
-	this.paint();
-}
-
-// ----------------------------------------------------------------------------------------------------
-// Snapping
-// ----------------------------------------------------------------------------------------------------
-/**
- * @class a {@link Snapping} object stores is {@link jsGraphics} rendering of a {@link GeometryArray} in various mapframes.
- *
- * @constructor
- * @requires GeometryArray
- * @requires Highlight
- * @param {String} aTarget name of the mapframe where snapping occurs
- * @param {String} aTolerance Snapping is activated if the mouse is 
- *                 within aTolerance pixel distance to the reference point.
- * @param {String} aColor apparently deprecated?
- * @param {Integer} aZIndex the z-Index of the {@link jsGraphics} generated by {@link Highlight}.
- */
-function Snapping(aTarget, aTolerance, aColor, aZIndex){
-
-	/**
-	 * draws a circle to highlight the snapped point.
-	 * 
-	 * @param {Point} center the snapped point.
-	 * @param {Integer} radius radius of the circular highlight.
-	 */
-	this.draw = function(center,radius){ 
-		mG = new MultiGeometry(geomType.point);
-		mG.addGeometry();
-		mG.get(-1).addPoint(center);
-		highlight.add(mG);
-	};
-	this.getTolerance = function() {
-		return tolerance;
-	};
-	this.getTarget = function() {
-		return target;
-	};
-	this.cleanHighlight = function() {
-		return highlight.clean();
-	};
-	this.addPoint = function(aPoint) {
-		coord.push(aPoint);
-	};
-	this.getPointCount = function() {
-		return coord.length;
-	};
-	this.getPoint = function(i) {
-		return coord[i];
-	};
-	this.resetPoints = function() {
-		coord = [];
-	};
-	this.getNearestNeighbour = function(){
-		if (min_i != -1) {return this.getPoint(min_i);}
-		return false;
-	};
-	this.setIndexOfNearestNeighbour = function(i){
-		min_i = i;
-	};
-	this.resetIndexOfNearestNeighbour = function(){
-		min_i = -1;
-	};
-	
-	/**
-	 * @private
-	 */
-	var tolerance = (typeof(aTolerance) == 'undefined') ? 10 : aTolerance;
-
-	/**
-	 * @private
-	 */
-	var zIndex = (typeof(aZIndex) == 'undefined') ? 50 : aZIndex;
-
-	/**
-	 * @private
-	 */
-	var coord = []; 
-
-	/**
-	 * @private
-	 */
-	var min_i = -1;
-
-	/**
-	 * @private
-	 */
-	var target = aTarget;
-
-	/**
-	 * @private
-	 */
-	var lineWidth = 2;
-
-	/**
-	 * @private
-	 */
-	var style = {"position":"absolute", "top":"0px", "left":"0px", "z-index":zIndex};
-
-	/**
-	 * @private
-	 */
-	var highlight = new Highlight([target], "snapping"+Math.round(Math.random()*Math.pow(10,10)), style, lineWidth);
-}
-
-Snapping.prototype.check = function(currPoint){
-	var minDist = false;
-	
-	for (var i = 0 ; i < this.getPointCount() ; i++) {
-
-		var currDist = currPoint.dist(realToMap(this.getTarget(), this.getPoint(i)));
-		if (minDist === false || currDist < minDist) {
-			minDist = currDist;
-			if (minDist < this.getTolerance()) {this.setIndexOfNearestNeighbour(i);}
-		}
-	}
-	if (this.getPointCount() > 0 && minDist > this.getTolerance()) {
-		this.resetIndexOfNearestNeighbour();
-	}
-	this.cleanHighlight();
-	if (this.isSnapped()) {
-		this.draw(this.getNearestNeighbour(), this.getTolerance());
-	}
-};
-
-/**
- * Stores the points which will have the snapping property. 
- * 
- * @param {GeometryArray} geom all points of geom will be stored. May also be a 
- *                             {@link MultiGeometry} or {@link Geometry}.
- * @param {Point} point this point is excluded. Useful when moving a point of a 
- *                      geometry; you don't want to snap against the point you
- *                      move. Optional.
- */
-Snapping.prototype.store = function(geom, point){
-	this.resetPoints();
-	this.resetIndexOfNearestNeighbour();
-
-	for (var i = 0 ; i < geom.count(); i++){
-		if (geom.name == nameGeometryArray || geom.name == nameMultiGeometry){
-			for (var j = 0 ; j < geom.get(i).count() ; j++){
-				if (geom.get(i).name == nameMultiGeometry){
-					for (var k = 0 ; k < geom.get(i).get(j).count() ; k++){
-						if ((geom.get(i).get(j).isComplete() === true && typeof(point) == 'undefined') || (typeof(point) != 'undefined' && !geom.get(i).get(j).get(k).equals(point))){
-							this.add(geom.getPoint(i, j, k));
-						}
-					}
-				}
-				else {
-					if ((geom.get(i).isComplete() === true && typeof(point) == 'undefined') || (typeof(point) != 'undefined' && !geom.get(i).get(j).get(k).equals(point))){
-						this.add(geom.getPoint(i, j));
-					}
-				}
-			}
-		}
-		else {
-			if (typeof(point) != 'undefined' && !geom.get(i).get(j).get(k).equals(point)){
-				this.add(geom.get(i));
-			}
-		}
-	}
-};
-
-/**
- * Determines whether a point is within snapping distance to the mouse cursor
- * 
- * @return true if a point is within snapping distance; else false
- * @type Boolean
- */
-Snapping.prototype.isSnapped = function(){ 
-	if (this.getNearestNeighbour() !== false) {return true;}
-	return false;
-};
-
-/**
- * Returns the point that is within snapping distance and closest to the mouse cursor.
- * 
- * @return the point (if there is any); else false
- * @type Point
- */
-Snapping.prototype.getSnappedPoint = function(){
-	return this.getNearestNeighbour();
-};
-
-/**
- * Adds the point to the stored points with snapping property.
- * 
- * @param {Point} point which receives snapping property.
- */
-Snapping.prototype.add = function(aPoint){ 
-	this.addPoint(aPoint);
-};
-
-/**
- * Removes the highlight.
- */
-Snapping.prototype.clean = function(){
-	this.cleanHighlight();
-};
-
-
-
-// ----------------------------------------------------------------------------------------------------
-// misc. functions
-// ----------------------------------------------------------------------------------------------------
-
-/**
- * @ignore
- */
-function calculateVisibleDash (p0, p1, width, height) {
-	if (p0.x > p1.x) {var p_temp = p0; p0 = p1; p1 = p_temp; p_temp = null;}
-	var p = p0; var q = p1; var m; var ix; var iy;
-	if (p1.x != p0.x) {
-		m = -(p1.y-p0.y)/(p1.x-p0.x); 
-		if (p0.x < width && p1.x > 0 && !(p0.y < 0 && p1.y < 0) && !(p0.y > height && p1.y > height) ) {
-			if (p0.x < 0) {
-				iy = p0.y - m*(0-p0.x);
-				if (iy > 0 && iy < height) {p = new Point(0, iy);}
-				else if (iy > height) {
-				    ix = p0.x+((p0.y - height)/m);
-				    if (ix > 0 && ix < width) {p = new Point(ix, height);} else {return false;}
-				}
-				else if (iy < 0) {
-				    ix = p0.x+(p0.y/m);
-				    if (ix > 0 && ix < width) {p = new Point(ix, 0);} else {return false;}
-				}
-				else {return false;}
-			}
-			else if (p0.y >= 0 && p0.y <= height) {p = p0;}
-			else if (p0.y < 0) {
-			    ix = p0.x+(p0.y/m);
-			    if (ix > 0 && ix < width) {p = new Point(ix, 0);} else {return false;}
-			}
-			else if (p0.y > height && m > 0) {
-			    ix = p0.x+((p0.y - height)/m);
-			    if (ix > 0 && ix < width) {p = new Point(ix, height);} else {return false;}
-			}
-			else {return false;}
-			if (p1.x > width) {
-				iy = p1.y - m*(width-p1.x);
-				if (iy > 0 && iy < height) {q = new Point(width, iy);}
-				else if (iy < 0) {
-				    ix = p0.x+(p0.y/m);
-				    if (ix > 0 && ix < width) {q = new Point(ix, 0);} else {return false;}
-				}
-				else if (iy > height) {
-				    ix = p0.x+((p0.y - height)/m);
-				    if (ix > 0 && ix < width) {q = new Point(ix, height);} else {return false;}
-				}
-				else {return false;}
-			}
-			else if (p1.y >= 0 && p1.y <= height) {q = p1;}
-			else if (p1.y < 0) {
-			    ix = p1.x+(p1.y/m);
-			    if (ix > 0 && ix < width) {q = new Point(ix, 0);} else {return false;}
-			}
-			else if (p1.y > height) {
-			    ix = p1.x+((p1.y- height)/m);
-			    if (ix > 0 && ix < width) {q = new Point(ix, height);} else {return false;}
-			}
-		}
-		else {return false;}
-	}
-	else {
-		if (!(p0.y < 0 && p1.y < 0) && !(p0.y > height && p1.y > height)) {
-			if (p0.y < 0) {p = new Point(p0.x, 0);}
-			else if (p0.y > height) {p = new Point(p0.x, height);}
-			else {p = p0;}
-			if (p1.y < 0) {q = new Point(p0.x, 0);}
-			else if (p1.y > height) {q = new Point(p0.x, height);}
-			else {q = p1;}
-		}
-		else {return false;}
-	}
-	return [new Point(Math.round(q.x), Math.round(q.y)), new Point(Math.round(p.x), Math.round(p.y))];
-}
-
-/**
- * @ignore
- */
-function objString (a){
-	var z = "";
-	
-	for (attr in a) {
-		var b = a[attr];
-		if (typeof(b) == "object") {z += objString(b);}
-		else {z += attr + " " + b + "\n";alert(attr + " " + b);}
-	}	
-	return z;
-}
+var nameGeometryArray="GeometryArray";var nameMultiGeometry="MultiGeometry";var nameGeometry="Geometry";function GeomType(){this.polygon="polygon";this.line="line";this.point="point";}
+var geomType=new GeomType();function GeometryArray(){this.addMember=function(geomType){this.add(new MultiGeometry(geomType));};this.name=nameGeometryArray;this.list=[];}
+GeometryArray.prototype=new List();GeometryArray.prototype.getGeometry=function(i,j){return this.get(i).get(j);};GeometryArray.prototype.getPoint=function(i,j,k){return this.get(i).get(j).get(k);};GeometryArray.prototype.findMultiGeometry=function(geom){var a=[];for(var i=0;i<this.count();i++){if(this.get(i).equals(geom)){a.push(i);}}
+return a;};GeometryArray.prototype.delGeometry=function(i,j){if(this.get(i).del(j)===false){this.del(i);}};GeometryArray.prototype.delPoint=function(i,j,k){var res=this.get(i).delPoint(j,k);if(res===false){this.del(i);}};GeometryArray.prototype.close=function(){if(!this.get(-1).get(-1).close()){this.delGeometry(-1,-1);}
+else{if(this.get(-1).get(-1).count()===0){this.get(-1).del(-1);}
+if(this.get(-1).count()===0){this.del(-1);}}};GeometryArray.prototype.delAllPointsLike=function(point){var finished=false;while(finished===false){finished=true;for(var i=0;finished===true&&i<this.count();i++){for(var j=0;finished===true&&j<this.get(i).count();j++){for(var k=0;finished===true&&k<this.get(i).get(j).count();k++){if(this.getPoint(i,j,k).equals(point)){this.delPoint(i,j,k);finished=false;}}}}}};GeometryArray.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};function MultiGeometry(geomType){this.addGeometry=function(){this.add(new Geometry(this.geomType));};this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];e[z]=e[z+1];}
+this.list.length-=1;if(this.list.length===0){return false;}}
+return true;};this.list=[];this.e=new Wfs_element();this.geomType=geomType;this.name=nameMultiGeometry;}
+MultiGeometry.prototype=new List();MultiGeometry.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};MultiGeometry.prototype.getBBox=function(){var q=this.get(0).get(0);var min=cloneObject(q);var max=cloneObject(q);for(var i=0;i<this.count();i++){var pos=this.get(i).getBBox();if(pos[0].x<min.x){min.x=pos[0].x;}
+if(pos[1].x>max.x){max.x=pos[1].x;}
+if(pos[1].y>max.y){max.y=pos[1].y;}
+if(pos[0].y<min.y){min.y=pos[0].y;}}
+return[min,max];};MultiGeometry.prototype.getCenter=function(){var tmp=this.getBBox();var x=parseFloat(tmp[0].x)+parseFloat((tmp[1].x-tmp[0].x)/2);var y=parseFloat(tmp[0].y)+parseFloat((tmp[1].y-tmp[0].y)/2);return new Point(x,y);};MultiGeometry.prototype.getTotalPointCount=function(){var c=0;for(var i=0;i<this.count();i++){c+=this.get(i).count();}
+return c;};MultiGeometry.prototype.getPoint=function(j,k){return this.get(j).get(k);};MultiGeometry.prototype.equals=function(multigeom){if(this.geomType!=multigeom.geomType){return false;}
+if(this.count()!=multigeom.count()){return false;}
+if(this.getTotalPointCount()!=multigeom.getTotalPointCount()){return false;}
+for(var i=0;i<this.count();i++){if(!this.get(i).equals(multigeom.get(i))){return false;}}
+return true;};MultiGeometry.prototype.delPoint=function(i,j){var res=this.get(i).del(j);if(res===false){return this.del(i);}
+return true;};function Geometry(aGeomtype){this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];}
+this.list.length-=1;if(this.geomType==geomType.polygon){if(i==tmpLength){this.list[0]=this.list[tmpLength-1];}
+else if(i===0){this.list[tmpLength-1]=this.list[0];}
+if(this.list.length==1){return false;}}
+updateDist();if(this.list.length===0){return false;}
+return true;}
+return false;};this.addPointByCoordinates=function(x,y){this.add(new Point(x,y));updateDist();};this.addPoint=function(aPoint){this.add(new Point(aPoint.x,aPoint.y));updateDist();};this.addPointAtIndex=function(p,i){i=this.getIndex(i);if(i!==false){for(var z=this.count();z>i;z--){this.list[z]=this.list[z-1];}
+this.list[i]=new Point(p.x,p.y);updateDist();}};this.updatePointAtIndex=function(p,i){i=this.getIndex(i);if((i===0||i==this.count()-1)&&this.geomType==geomType.polygon){this.list[0]=p;this.list[this.count()-1]=p;}
+else{this.list[i]=p;}
+updateDist();};var updateDist=function(){dist[0]=0;totaldist[0]=0;for(var i=1;i<that.count();i++){dist[i]=that.get(i-1).dist(that.get(i));totaldist[i]=totaldist[i-1]+dist[i];}};this.getCurrentDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(dist[this.count()-1],numberOfDigits);}
+return dist[this.count()-1];};this.getTotalDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(totaldist[this.count()-1],numberOfDigits);}
+return totaldist[this.count()-1];};this.close=function(){complete=true;if(this.geomType==geomType.polygon){if(this.count()>2){if(!this.get(0).equals(this.get(-1))){this.addPoint(this.get(0));}}
+else{return false;}}
+if(this.geomType==geomType.line){if(this.count()<2){return false;}}
+return true;};this.isComplete=function(){return complete;};this.list=[];var dist=[];var totaldist=[];var complete=false;var that=this;this.geomType=aGeomtype;this.name=nameGeometry;}
+Geometry.prototype=new List();Geometry.prototype.getBBox=function(){var q=this.get(0);var min=cloneObject(q);var max=cloneObject(q);for(var j=0;j<this.count();j++){var pos=this.get(j);if(pos.x<min.x){min.x=pos.x;}
+else if(pos.x>max.x){max.x=pos.x;}
+if(pos.y<min.y){min.y=pos.y;}
+else if(pos.y>max.y){max.y=pos.y;}}
+return[min,max];};Geometry.prototype.updateAllPointsLike=function(oldP,newP){var len=this.count();for(var i=0;i<len;i++){if(oldP.equals(this.get(i))){if(i>0&&newP.equals(this.get(i-1))){this.del(i);len--;i--;}
+else{this.updatePointAtIndex(newP,i);}}}};Geometry.prototype.equals=function(geom){if(this.geomType!=geom.geomType){return false;}
+if(this.count()!=geom.count()){return false;}
+for(var i=0;i<this.count();i++){if(!this.get(i).equals(geom.get(i))){return false;}}
+return true;};function Wfs_element(){this.count=function(){return name.length;};this.getName=function(i){if(isValidElementIndex(i)){return name[i];}
+return false;};this.getValue=function(i){if(isValidElementIndex(i)){return value[i];}
+return false;};this.setElement=function(aName,aValue){var i=this.getElementIndexByName(aName);if(i===false){i=this.count();}
+name[i]=aName;value[i]=aValue;};var isValidElementIndex=function(i){if(i>=0&&i<name.length){return true;}
+var e=new Mb_exception("class Wfs_element: function isValidElementIndex: illegal element index");return false;};var name=[];var value=[];}
+Wfs_element.prototype.getElementIndexByName=function(elementName){for(var j=0;j<this.count();j++){if(this.getName(j)==elementName){return j;}}
+return false;};Wfs_element.prototype.getElementValueByName=function(elementName){var i=this.getElementIndexByName(elementName);if(i===false){return false;}
+return this.getValue(i);};function Canvas(aMapframe,aTagName,aStyle,aLineWidth){this.drawGeometry=function(t,g,col){var mapObjInd=getMapObjIndexByName(mapframe);width=mb_mapObj[mapObjInd].width;height=mb_mapObj[mapObjInd].height;for(var i=0;i<g.count();i++){if(t==geomType.point){var p=realToMap(mapframe,g.get(i).get(0));if(p.x+diameter<mb_mapObj[mapObjInd].width&&p.x-diameter>0&&p.y+diameter<mb_mapObj[mapObjInd].height&&p.y-diameter>0){drawCircle(p.x-1,p.y-1,diameter,col);}}
+else if(t==geomType.line||t==geomType.polygon){for(var j=0;j<g.get(i).count()-1;j++){var pq=calculateVisibleDash(realToMap(mapframe,g.get(i).get(j)),realToMap(mapframe,g.get(i).get(j+1)),width,height);if(pq){drawLine([pq[0].x-1,pq[1].x-1],[pq[0].y-1,pq[1].y-1],col);}}}
+else{var e=new Mb_exception("class Canvas: function drawGeometry: unknown geomType "+t);}}};this.isTooSmall=function(g){var tmp=g.getBBox();var min=realToMap(mapframe,tmp[0]);var max=realToMap(mapframe,tmp[1]);if((Math.abs(max.x-min.x)<minWidth)&&(Math.abs(max.y-min.y)<minWidth)){return true;}
+return false;};this.getCanvas=function(){return canvas;};var drawCircle=function(x,y,diameter,color){canvas.setColor(color);canvas.drawEllipse(x-diameter/2,y-diameter/2,diameter,diameter);};var drawLine=function(x_array,y_array,color){canvas.setColor(color);canvas.drawPolyline(x_array,y_array);};this.canvasDivTag=new DivTag(aTagName,aMapframe,aStyle);var that=this;var diameter=8;var minWidth=8;var lineWidth=aLineWidth;var mapframe=aMapframe;var style=aStyle;var canvas=new jsGraphics(aTagName,window.frames[mapframe]);canvas.setStroke(lineWidth);mb_registerPanSubElement(aTagName);}
+Canvas.prototype.clean=function(){this.canvasDivTag.clean();};Canvas.prototype.paint=function(gA){for(var q=0;q<gA.count();q++){var m=gA.get(q);var t=m.geomType;var col=m.color;if(t==geomType.point){this.drawGeometry(t,m,col);}
+else{if(this.isTooSmall(m)){var newMember=new MultiGeometry(geomType.point);newMember.addGeometry();newMember.get(-1).addPoint(m.getCenter());this.drawGeometry(geomType.point,newMember,col);}
+else{if(t==geomType.line){this.drawGeometry(t,m,col);}
+else if(t==geomType.polygon){this.drawGeometry(t,m,col);}
+else{var e=new Mb_exception("class Canvas: function paint: unknown geomType"+t);}}}}
+this.getCanvas().paint();};function Highlight(aTargetArray,aTagName,aStyle,aLineWidth){this.del=function(m,color){var a=gA.findMultiGeometry(m);var del=false;for(var i=0;i<a.length&&del===false;i++){if(gA.get(a[i]).color==color){gA.del(a[i]);del=true;}}
+this.paint();};this.add=function(m,color){gA.addCopy(m);if(typeof(color)!='undefined'){gA.get(-1).color=color;}
+else{gA.get(-1).color=lineColor;}
+this.paint();};this.clean=function(){if(gA.count()>0){gA=new GeometryArray();this.paint();}};this.paint=function(){for(var i=0;i<canvas.length;i++){if(typeof(canvas[i])=="object"){canvas[i].clean();}}
+for(var i=0;i<targets.length;i++){if(typeof(canvas[i])=='undefined'){canvas[i]=new Canvas(targets[i],tagname,style,lineWidth);}
+canvas[i].paint(gA);}};var lineWidth=aLineWidth;var tagname='mod_gaz_draw'+aTagName;var style=aStyle;var targets=aTargetArray;var canvas=[];var gA=new GeometryArray();var lineColor="#ff0000";this.paint();}
+function Snapping(aTarget,aTolerance,aColor,aZIndex){this.draw=function(center,radius){mG=new MultiGeometry(geomType.point);mG.addGeometry();mG.get(-1).addPoint(center);highlight.add(mG);};this.getTolerance=function(){return tolerance;};this.getTarget=function(){return target;};this.cleanHighlight=function(){return highlight.clean();};this.addPoint=function(aPoint){coord.push(aPoint);};this.getPointCount=function(){return coord.length;};this.getPoint=function(i){return coord[i];};this.resetPoints=function(){coord=[];};this.getNearestNeighbour=function(){if(min_i!=-1){return this.getPoint(min_i);}
+return false;};this.setIndexOfNearestNeighbour=function(i){min_i=i;};this.resetIndexOfNearestNeighbour=function(){min_i=-1;};var tolerance=(typeof(aTolerance)=='undefined')?10:aTolerance;var zIndex=(typeof(aZIndex)=='undefined')?50:aZIndex;var coord=[];var min_i=-1;var target=aTarget;var lineWidth=2;var style={"position":"absolute","top":"0px","left":"0px","z-index":zIndex};var highlight=new Highlight([target],"snapping"+Math.round(Math.random()*Math.pow(10,10)),style,lineWidth);}
+Snapping.prototype.check=function(currPoint){var minDist=false;for(var i=0;i<this.getPointCount();i++){var currDist=currPoint.dist(realToMap(this.getTarget(),this.getPoint(i)));if(minDist===false||currDist<minDist){minDist=currDist;if(minDist<this.getTolerance()){this.setIndexOfNearestNeighbour(i);}}}
+if(this.getPointCount()>0&&minDist>this.getTolerance()){this.resetIndexOfNearestNeighbour();}
+this.cleanHighlight();if(this.isSnapped()){this.draw(this.getNearestNeighbour(),this.getTolerance());}};Snapping.prototype.store=function(geom,point){this.resetPoints();this.resetIndexOfNearestNeighbour();for(var i=0;i<geom.count();i++){if(geom.name==nameGeometryArray||geom.name==nameMultiGeometry){for(var j=0;j<geom.get(i).count();j++){if(geom.get(i).name==nameMultiGeometry){for(var k=0;k<geom.get(i).get(j).count();k++){if((geom.get(i).get(j).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j,k));}}}
+else{if((geom.get(i).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j));}}}}
+else{if(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point)){this.add(geom.get(i));}}}};Snapping.prototype.isSnapped=function(){if(this.getNearestNeighbour()!==false){return true;}
+return false;};Snapping.prototype.getSnappedPoint=function(){return this.getNearestNeighbour();};Snapping.prototype.add=function(aPoint){this.addPoint(aPoint);};Snapping.prototype.clean=function(){this.cleanHighlight();};function calculateVisibleDash(p0,p1,width,height){if(p0.x>p1.x){var p_temp=p0;p0=p1;p1=p_temp;p_temp=null;}
+var p=p0;var q=p1;var m;var ix;var iy;if(p1.x!=p0.x){m=-(p1.y-p0.y)/(p1.x-p0.x);if(p0.x<width&&p1.x>0&&!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.x<0){iy=p0.y-m*(0-p0.x);if(iy>0&&iy<height){p=new Point(0,iy);}
+else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
+else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
+else{return false;}}
+else if(p0.y>=0&&p0.y<=height){p=p0;}
+else if(p0.y<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
+else if(p0.y>height&&m>0){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
+else{return false;}
+if(p1.x>width){iy=p1.y-m*(width-p1.x);if(iy>0&&iy<height){q=new Point(width,iy);}
+else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
+else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}
+else{return false;}}
+else if(p1.y>=0&&p1.y<=height){q=p1;}
+else if(p1.y<0){ix=p1.x+(p1.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
+else if(p1.y>height){ix=p1.x+((p1.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}}
+else{return false;}}
+else{if(!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.y<0){p=new Point(p0.x,0);}
+else if(p0.y>height){p=new Point(p0.x,height);}
+else{p=p0;}
+if(p1.y<0){q=new Point(p0.x,0);}
+else if(p1.y>height){q=new Point(p0.x,height);}
+else{q=p1;}}
+else{return false;}}
+return[new Point(Math.round(q.x),Math.round(q.y)),new Point(Math.round(p.x),Math.round(p.y))];}
+function objString(a){var z="";for(attr in a){var b=a[attr];if(typeof(b)=="object"){z+=objString(b);}
+else{z+=attr+" "+b+"\n";alert(attr+" "+b);}}
+return z;}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/javascripts/map.js
===================================================================
--- tags/2.4.2/http/javascripts/map.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/javascripts/map.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,1785 +1,240 @@
-var ie = document.all?1:0;
-var n6 = document.getElementById&&!document.all?1:0;
-var n4 = document.layers?1:0;
-
-var mb_feature_count = 100;
-
-var mb_resolution = 28.35;
-var mb_mapObj = [];
-var mb_fiWin = null;
-var mb_panActive = false;
-var clickX;
-var clickY;
-var mb_start_x = 0;
-var mb_start_y = 0;
-var mb_end_x = 0;
-var mb_end_y = 0;
-var mb_offset_top = 0;
-var mb_offset_right = 0;
-var mb_offset_bottom = 0;
-var mb_offset_left = 0;
-var mb_log = null;
-
-var mb_PanSubElements = [];
-function mb_registerPanSubElement(elName){
-	var ind = mb_PanSubElements.length;
-	mb_PanSubElements[ind] = elName;
-}
-
-var mb_vendorSpecific = [];
-function mb_registerVendorSpecific(stringFunction){
-	mb_vendorSpecific[mb_vendorSpecific.length] = stringFunction;
-}
-
-var mb_security_proxy = "http://wms1.ccgis.de/mapbender/tools/security_proxy.php?mb_ows_security_proxy=";
-
-var mb_trans = new Image; 
-mb_trans.src = "../img/transparent.gif";
-/*END OF GLOBALS*/
-
-
-function init(){
-	for(var i=0; i<mb_InitFunctions.length; i++){
-		eval(mb_InitFunctions[i]);
-	}
-	for(var i=0; i<mb_mapObj.length; i++){
-		setMapRequest(mb_mapObj[i].frameName);
-	}      	
-}
-
-function deleteWmsObject() {
-	wms = [];
-	wms_layer_count = 0;
-}
-
-function deleteMapObj() {
-	mb_mapObj = [];
-}
-
-function mb_registerMapObj(frameName, elementName,wms_index,width, height){
-	mb_mapObj[mb_mapObj.length] = new mb_mapObj_const(frameName, elementName, width, height, wms_index);    
-}
-
-function mb_mapObj_const(frameName, elementName, width, height, wms_index){
-
-   this.width = width;
-   this.height = height;
-   this.frameName = frameName;
-   this.elementName = elementName;
-   this.layers = [];
-   this.styles = [];
-   this.querylayers = [];
-   this.geom = "";
-   this.gml = ""; 
-   if(wms_index != null){
-      this.wms = [];
-      this.wms[0] = wms[wms_index];
-      this.wms[0].mapURL = false;
-      var cnt_layers = 0;
-      var cnt_querylayers = 0;
-      var styles = "";
-      var layers = "";
-      var querylayers = "";
-      for(var ii=0; ii<this.wms[0].objLayer.length; ii++){
-         if(this.wms[0].objLayer[ii].gui_layer_visible == 1 && ii>0){
-            if(cnt_layers > 0){layers += ","; styles += ","; }
-            layers += this.wms[0].objLayer[ii].layer_name; 
-            styles += ""; 
-            cnt_layers++;
-         }   
-         if(this.wms[0].objLayer[ii].gui_layer_querylayer == 1 && ii>0){
-            if(cnt_querylayers > 0){querylayers += ",";}
-            querylayers += this.wms[0].objLayer[ii].layer_name; 
-            cnt_querylayers++;
-         }                      
-      }
-      this.layers[0] = layers;
-      this.styles[0] = styles;
-      this.querylayers[0] = querylayers;   
-   }
-   else{
-	this.wms = [];
-	for(i=0; i<wms.length; i++){
-		this.wms[i] = wms[i];
-		this.wms[i].mapURL = false;
-	}
-      for(var i=0; i< this.wms.length; i++){
-         var cnt_layers = 0;
-         var cnt_querylayers = 0;
-         var styles = "";
-         var layers = "";
-         var querylayers = "";
-         for(var ii=0; ii<this.wms[i].objLayer.length; ii++){
-            if(this.wms[i].objLayer[ii].gui_layer_visible == 1 && ii>0){
-               if(cnt_layers > 0){layers += ","; styles += ","; }
-               layers += wms[i].objLayer[ii].layer_name; 
-               styles += ""; 
-               cnt_layers++;
-            }            
-            if(this.wms[i].objLayer[ii].gui_layer_querylayer == 1 && ii>0){
-               if(cnt_querylayers > 0){querylayers += ",";}
-               querylayers += wms[i].objLayer[ii].layer_name; 
-               cnt_querylayers++;
-            }                          
-         }
-         this.layers[i] = layers;
-         this.styles[i] = styles;
-         this.querylayers[i] = querylayers;
-      }
-   }
-   this.epsg = wms[0].gui_wms_epsg;
-   this.extent = setExtent(this.width,this.height,this.epsg);
-   this.mapURL = [];
-   for(var i=0; i<mb_MapObjectSubFunctions.length; i++){
-      eval(mb_MapObjectSubFunctions[i]);
-   }  
-}
-
-
-function mb_getConjunctionCharacter(onlineresource){
-	if(onlineresource.indexOf("?") > -1){ 
-		if(onlineresource.charAt(onlineresource.length-1) == "?"){ 
-			nextvalue = "";
-		}else if(onlineresource.charAt(onlineresource.length-1) == "&"){
-			nextvalue = "";
-		}else{
-			nextvalue = "&";
-		}
-	}
-	if(onlineresource.indexOf("?") == -1){
-		nextvalue = "?";
-	} 
-	return nextvalue;  
-}
-
-
-function mb_moveWmsById (mapObj_ind, wms_id, toIndex) {
-	return mb_wmsMoveByIndex(mapObj_ind, getWMSIndexById(mapObj_ind, wms_id), toIndex);
-}
-
-function mb_wmsMoveByIndex(mapObj_ind, fromIndex, toIndex) {
-	if (fromIndex != toIndex && fromIndex >= 0 && fromIndex < mb_mapObj[mapObj_ind].wms.length && toIndex >= 0 && toIndex < mb_mapObj[mapObj_ind].wms.length) {
-		var changed = false;
-
-		if (fromIndex > toIndex) {
-			for (var i = fromIndex; i > toIndex ; i--) {
-				var result = mb_swapWmsByIndex(mapObj_ind, i-1, i);
-				if (result == true) changed = true;
-			}
-		}
-		else {
-			for (var i = fromIndex; i < toIndex ; i++) {
-				var result = mb_swapWmsByIndex(mapObj_ind, i, i+1);
-				if (result == true) changed = true;
-			}
-		}
-		return changed;
-	}
-	else {
-		return false;
-	}
-}
-
-function mb_swapWmsById(mapObj_ind, wms1_id, wms2_id) {
-	return mb_swapWmsByIndex(mapObj_ind, getWMSIndexById(mapObj_ind, wms1_id), getWMSIndexById(mapObj_ind, wms2_id));
-}
-
-function mb_swapWmsByIndex(mapObj_ind, indexA, indexB) {
-	if (indexA != indexB && indexA >= 0 && indexA < mb_mapObj[mapObj_ind].wms.length && indexB >= 0 && indexB < mb_mapObj[mapObj_ind].wms.length) {
-		upper = mb_mapObj[mapObj_ind].wms[indexA];
-		mb_mapObj[mapObj_ind].wms[indexA] = mb_mapObj[mapObj_ind].wms[indexB];
-		mb_mapObj[mapObj_ind].wms[indexB] = upper;
-		var upperLayers = mb_mapObj[mapObj_ind].layers[indexA];
-		var upperStyles = mb_mapObj[mapObj_ind].styles[indexA];
-		var upperQuerylayers = mb_mapObj[mapObj_ind].querylayers[indexA];
-		mb_mapObj[mapObj_ind].layers[indexA] = mb_mapObj[mapObj_ind].layers[indexB];
-		mb_mapObj[mapObj_ind].styles[indexA] = mb_mapObj[mapObj_ind].styles[indexB];
-		mb_mapObj[mapObj_ind].querylayers[indexA] = mb_mapObj[mapObj_ind].querylayers[indexB];
-		mb_mapObj[mapObj_ind].layers[indexB] = upperLayers;
-		mb_mapObj[mapObj_ind].styles[indexB] = upperStyles;
-		mb_mapObj[mapObj_ind].querylayers[indexB] = upperQuerylayers;
-		return true;
-	}
-	else {
-		return false;
-	}
-}
-
-function mb_moveUpWmsByIndex(mapObj_ind, index) {
-	if (index > 0 && index < wms.length) {
-		return mb_swapWmsByIndex(mapObj_ind, index-1, index);
-	}
-	else {
-		return false;
-	}
-}
-
-function mb_moveDownWmsByIndex(mapObj_ind, index) {
-	if (index >= 0 && index < wms.length-1) {
-		return mb_swapWmsByIndex(mapObj_ind, index, index+1);
-	}
-	else {
-		return false;
-	}
-}
-
-function mb_mapObjaddWMS(obj){
-	var cnt_layers = 0;
-	var cnt_querylayers = 0;
-	var styles = "";
-	var layers = "";
-	var querylayers = "";
-	var ind = getMapObjIndexByName(obj);
-	//is the id valid?
-	for( var i=0; i<(wms.length-1); i++){
-		if(parseInt(wms[i].wms_id) >= parseInt(wms[wms.length-1].wms_id)){
-			wms[wms.length-1].wms_id = parseInt(mb_mapObj[ind].wms[i].wms_id) + 1;
-		}
-	} 
-	mb_mapObj[ind].wms[mb_mapObj[ind].wms.length] = wms[wms.length-1];
-	mb_mapObj[ind].layers[mb_mapObj[ind].layers.length] = layers;
-	mb_mapObj[ind].styles[mb_mapObj[ind].styles.length] = styles;
-	mb_mapObj[ind].querylayers[mb_mapObj[ind].querylayers.length] = querylayers;  
-	mb_execloadWmsSubFunctions();
-	return true; 
-}
-//CB
-function mb_mapObjaddWMSwithLayers(obj,layers,querylayers){
-	var cnt_layers = 0;
-	var cnt_querylayers = 0;
-	var styles = "";
-	var ind = getMapObjIndexByName(obj);
-	mb_mapObj[ind].wms[mb_mapObj[ind].wms.length] = wms[wms.length-1];
-	mb_mapObj[ind].layers[mb_mapObj[ind].layers.length] = layers;
-	mb_mapObj[ind].styles[mb_mapObj[ind].styles.length] = styles;
-	mb_mapObj[ind].querylayers[mb_mapObj[ind].querylayers.length] = querylayers;   
-}
-function mb_mapObjremoveWMS(objind,wmsind){
-	var wms_ID = null;
-	
-	var new_wmsarray = [];
-	var new_layerarray = [];
-	var new_querylayerarray = [];
-	var new_stylesarray = [];
-	var new_mapURLarray = [];
-	
-	for	(var i=0;i<mb_mapObj[objind].wms.length; i++){
-		if(i != wmsind){
-			new_wmsarray[new_wmsarray.length] = mb_mapObj[objind].wms[i];
-			new_layerarray[new_layerarray.length] = mb_mapObj[objind].layers[i];
-			new_querylayerarray[new_querylayerarray.length] = mb_mapObj[objind].querylayers[i];
-			new_stylesarray[new_stylesarray.length] = mb_mapObj[objind].styles[i];
-			new_mapURLarray[new_mapURLarray.length] = mb_mapObj[objind].mapURL[i] 
-		}
-		else {
-			wms_ID = mb_mapObj[objind].wms[i].wms_id;
-		}
-	}
-	mb_mapObj[objind].wms = new_wmsarray; 
-	mb_mapObj[objind].layers = new_layerarray; 
-	mb_mapObj[objind].querylayers = new_querylayerarray; 
-	mb_mapObj[objind].styles = new_stylesarray; 
-	mb_mapObj[objind].mapURL = new_mapURLarray;
-
-	var another_new_wmsarray = [];
-	for	(var i=0;i<wms.length; i++){
-		if(wms[i].wms_id != wms_ID){
-			another_new_wmsarray[another_new_wmsarray.length] = wms[i]; 
-		}
-	}
-	wms = another_new_wmsarray; 
-}
-function setExtent(width,height,epsg){
-   for(var i=0; i < wms[0].gui_epsg.length; i++){
-      if(wms[0].gui_epsg[i] == epsg){      
-         var bbox_minx = parseFloat(wms[0].gui_minx[i]);
-         var bbox_miny = parseFloat(wms[0].gui_miny[i]);
-         var bbox_maxx = parseFloat(wms[0].gui_maxx[i]);
-         var bbox_maxy = parseFloat(wms[0].gui_maxy[i]);     
-   
-         var extenty = bbox_maxy - bbox_miny;
-         var extentx = bbox_maxx - bbox_minx;
-
-         var relation_px_x = width / height;
-         var relation_px_y = height / width;
-         var relation_bbox_x = extentx / extenty;         
-         var centerx = bbox_minx + (extentx/2);
-         var centery = bbox_miny + (extenty/2);
-         if(relation_bbox_x <= relation_px_x){                
-                bbox_minx = centerx - relation_px_x * extenty / 2;
-                bbox_maxx = centerx + relation_px_x * extenty / 2;
-         }
-        
-         if(relation_bbox_x > relation_px_x){                
-                bbox_miny = centery - relation_px_y * extentx / 2;
-                bbox_maxy = centery + relation_px_y * extentx / 2;
-         }
-        return bbox_minx  +","+ bbox_miny +","+ bbox_maxx  +","+ bbox_maxy;
-     }
-   }
-}
-function setMapRequest(frameName){
-	var functionName = 'setMapRequest';
-	var ts = mb_timestamp();
-
-	for(var i=0; i<mb_MapRequestPreFunctions.length; i++){
-		var ret = eval(mb_MapRequestPreFunctions[i]);
-		if(ret == false){
-			return true;
-		}
-	}
-	for(var i=0; i<mb_mapObj.length; i++){
-		var newMapRequest = "";
-		if(mb_mapObj[i].frameName == frameName){
-			for(var ii=0; ii<mb_mapObj[i].wms.length; ii++){
-				if(mb_mapObj[i].wms[ii].gui_wms_visible > 0){
-					var myDivId = "div_" + ii;          
-					var myMapId = "map_" + ii;
-					//disable Layer which are out of scale
-					var str_LayerStyles = mb_checkScale(frameName,i,ii);
-					if(mb_mapObj[i].layers[ii] != "" && str_LayerStyles[0] != ''){
-						var newMapURL = "";
-
-						if (mb_mapObj[i].wms[ii].gui_wms_mapopacity != 1) {
- 							var cadenaOpacity = "opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity+"; Filter: Alpha(Opacity="+mb_mapObj[i].wms[ii].gui_wms_mapopacity*100+"); -moz-opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity+" ; -khtml-opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity;
-	 						newMapRequest += "<div id='"+myDivId+"' style=\"position:absolute; top:0px; left:0px; z-index:"+ii+";"+cadenaOpacity+"\">";
-						
-						}
-						// IE problem: layers that are already transparent (defined in map file) 
-						// are sabotaged by the Mapbender opacity setting...
-						// this solution helps to display these layers correctly if no opacity
-						// manipulation is taking place in Mapbender
-						//
-						// solution needed for both WMS and Mapbender transparency in IE
-						// see: 
-						else {
-							newMapRequest += "<div id='"+myDivId+"' style='position:absolute; top:0px; left:0px; z-index:'"+ii+"'>";
-						}
-
-						newMapRequest += "<img id='"+myMapId+"' name='mapimage' src='";
-						newMapURL += mb_mapObj[i].wms[ii].wms_getmap;   
-						
-						newMapURL += mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getmap);
-						
-						if(mb_mapObj[i].wms[ii].wms_version == "1.0.0"){newMapURL += "WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=map&";}
-						if(mb_mapObj[i].wms[ii].wms_version != "1.0.0"){newMapURL += "VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetMap&SERVICE=WMS&";} 
-						
-						newMapURL += "LAYERS="+str_LayerStyles[0]+"&";
-						newMapURL += "STYLES="+str_LayerStyles[1]+"&";
-		
-						newMapURL += "SRS="+mb_mapObj[i].epsg+"&";
-						newMapURL += "BBOX="+mb_mapObj[i].extent+"&";
-						newMapURL += "WIDTH="+mb_mapObj[i].width+"&";
-						newMapURL += "HEIGHT="+mb_mapObj[i].height+"&";
-						newMapURL += "FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";
-						newMapURL += "BGCOLOR=0xffffff&";
-						if(mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/gif/i)>-1 || mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/png/i)>-1){
-							newMapURL += "TRANSPARENT=TRUE&";
-						}
-						newMapURL += "EXCEPTIONS="+mb_mapObj[i].wms[ii].gui_wms_exceptionformat;
-						// add vendor-specifics
-						for(var v=0; v < mb_vendorSpecific.length; v++){
-							var vendorSpecificString = eval(mb_vendorSpecific[v]); 
-
-							// if eval doesn't evaluate a function, the result is undefined.
-							// Sometimes it is necessary not to evaluate a function, for
-							// example if you want to change a variable from the current
-							// scope (see mod_addSLD.php) 
-							if (typeof(vendorSpecificString) != "undefined") {
-								newMapURL += "&" + vendorSpecificString; 
-							}
-						}           
-						// add Filter
-						if(mb_mapObj[i].wms[ii].wms_filter != ""){
-							var tmp = mb_mapObj[i].wms[ii].wms_filter +"?id="+ mb_styleID;
-
-							var temp = "&SLD=" + tmp+ "&";
-							newMapURL += temp;
-						}
-						if(mb_log){
-							var tmp = eval(mb_log + "('" + newMapURL + "','" + ts + "')");
-						}
-						newMapRequest += newMapURL;
-						mb_mapObj[i].mapURL[ii] = newMapURL;	
-						mb_mapObj[i].wms[ii].mapURL = newMapURL;
-						newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'></div>";   
-					}
-					else{
-						mb_mapObj[i].mapURL[ii] = false;
-						mb_mapObj[i].wms[ii].mapURL = false;
-						newMapRequest += "<div id='" + myDivId + "' style='position:absolute; top:0px; left:0px; z-index:" + ii + "'>";
-						newMapRequest += "<img id='"+myMapId+"' name='mapimage' src='" + mb_trans.src;
-						newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
-						newMapRequest +="</div>";
-					}
-				}
-			}
-			//prompt("",newMapRequest);
-			writeTag(mb_mapObj[i].frameName,mb_mapObj[i].elementName,newMapRequest);
-		}
-	}
-	for(var i=0; i<mb_MapRequestSubFunctions.length; i++){
-		eval(mb_MapRequestSubFunctions[i]);
-	}
-}
-function setSingleMapRequest(frameName,wms_id){
-	var functionName = 'setSingleMapRequest';
-	var ts = mb_timestamp();	
-	
-	for(var i=0; i<mb_MapRequestPreFunctions.length; i++){
-		eval(mb_MapRequestPreFunctions[i]);
-	}	
-	for(var i=0; i<mb_mapObj.length; i++){
-		var newMapRequest = "";
-		if(mb_mapObj[i].frameName == frameName){
-			for(var ii=0; ii<mb_mapObj[i].wms.length; ii++){ 
-				var myDivId = "div_" + ii;
-				var myMapId = "map_" + ii;
-				if(mb_mapObj[i].wms[ii].wms_id == wms_id){  
-					var newMapURL = "";
-					newMapRequest += "<img id='"+myMapId+"' name='mapimage' src='";
-					newMapURL += mb_mapObj[i].wms[ii].wms_getmap; 
-
-					newMapURL += mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getmap);
-						
-					if(mb_mapObj[i].wms[ii].wms_version == "1.0.0"){newMapURL += "WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=map&";}
-					if(mb_mapObj[i].wms[ii].wms_version != "1.0.0"){newMapURL += "VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetMap&SERVICE=WMS&";}             
-					
-					//disable Layer which are out of scale
-					var str_LayerStyles = mb_checkScale(frameName,i,ii); 
-
-					newMapURL += "LAYERS="+str_LayerStyles[0]+"&";
-					newMapURL += "STYLES="+str_LayerStyles[1]+"&";
-         
-					newMapURL += "SRS="+mb_mapObj[i].epsg+"&";
-					newMapURL += "BBOX="+mb_mapObj[i].extent+"&";
-					newMapURL += "WIDTH="+mb_mapObj[i].width+"&";
-					newMapURL += "HEIGHT="+mb_mapObj[i].height+"&";
-					newMapURL += "FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";
-					newMapURL += "BGCOLOR=0xffffff&";
-					if(mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/gif/i)>-1 || mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/png/i)>-1){
-						newMapURL += "TRANSPARENT=TRUE&";
-					}
-					newMapURL += "EXCEPTIONS="+mb_mapObj[i].wms[ii].gui_wms_exceptionformat;
-					// add vendor-specific
-					for (var v = 0; v < mb_vendorSpecific.length; v++) {
-						var vendorSpecificString = eval(mb_vendorSpecific[v]); 
-						// if eval doesn't evaluate a function, the result is undefined.
-						// Sometimes it is necessary not to evaluate a function, for
-						// example if you want to change a variable from the current
-						// scope (see mod_addSLD.php) 
-						if (typeof(vendorSpecificString) != "undefined") {
-							newMapURL += "&" + vendorSpecificString;
-						} 
-					}
-					// add Filter
-					if(mb_mapObj[i].wms[ii].wms_filter != ""){
-						var tmp = mb_mapObj[i].wms[ii].wms_filter +"?id="+ mb_styleID;
-						//prompt("",tmp);;
-						var temp = "&SLD=" + tmp+ "&";
-						newMapURL += temp;
-					}
-					//prompt("",newMapURL);
-					if(mb_mapObj[i].layers[ii] != "" && str_LayerStyles[0] != ""){
-						newMapRequest += newMapURL;
-						mb_mapObj[i].mapURL[ii] = newMapURL;
-						mb_mapObj[i].wms[ii].mapURL = newMapURL;
-						newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
-					}
-					else{
-						mb_mapObj[i].mapURL[ii] = false;
-						mb_mapObj[i].wms[ii].mapURL = false;
-						newMapRequest = "<img id='"+myMapId+"' name='mapimage' src='" + mb_trans.src;
-						newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
-					}        
-					//prompt("",newMapRequest);
-					if(mb_log){
-						var tmp = eval(mb_log + "('" + newMapURL + "','" + ts + "')");
-					}
-					writeTag(mb_mapObj[i].frameName,myDivId,newMapRequest);
-				}                            
-			}           
-		}      
-	}   
-	for(var i=0; i<mb_MapRequestSubFunctions.length; i++){
-		eval(mb_MapRequestSubFunctions[i]);
-	}  
-}
-function mb_restateLayers(frameName,wms_id){
-	//alert(frameName + " / " + wms_id);
-	var ind = getMapObjIndexByName(frameName);	
-	for(var i=0; i<mb_mapObj[ind].wms.length; i++){
-		if(mb_mapObj[ind].wms[i].wms_id == wms_id){
-			var cnt_layers = 0;
-			var cnt_querylayers = 0;
-			var layers = "";
-			var styles = "";
-			var querylayers = "";
-			for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
-				if(mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_visible == 1 && ii>0){
-					if(cnt_layers > 0){layers += ","; styles += ","; }
-					layers += mb_mapObj[ind].wms[i].objLayer[ii].layer_name;
-					//alert(mb_mapObj[ind].wms[i].objLayer[ii].layer_name); 
-					styles += ""; 
-					cnt_layers++;
-				}            
-				if(mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_querylayer == 1 && ii>0){
-					if(cnt_querylayers > 0){querylayers += ",";}
-					querylayers += mb_mapObj[ind].wms[i].objLayer[ii].layer_name; 
-					cnt_querylayers++;
-				}
-				mb_mapObj[ind].layers[i] = layers;
-				mb_mapObj[ind].querylayers[i] = querylayers;
-				mb_mapObj[ind].styles[i] = styles;
-			}
-		}
-	}
-}
-
-function mb_checkScale(frameName,mObj,wmsObj){
-	var thisLayer = mb_mapObj[mObj].layers[wmsObj].split(",");
-	var thisScale = mb_getScale(frameName);  
-	var str_layer = "";
-	var str_styles = "";
-	var str_titles = "";
-	var str_legendurls = "";
-	var str_parent = "";
-	var cnt_layer = 0;
-	for(var i=0; i<mb_mapObj[mObj].wms[wmsObj].objLayer.length; i++){  
-		var myLayername = mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_name;
-		var myMinscale = mb_mapObj[mObj].wms[wmsObj].objLayer[i].gui_layer_minscale;
-		var myMaxscale = mb_mapObj[mObj].wms[wmsObj].objLayer[i].gui_layer_maxscale;
-		for(var ii=0; ii<thisLayer.length; ii++){
-			var minscaleOK = false;
-			var maxscaleOK = false;   
-			if(thisLayer[ii] == myLayername){
-				if(myMinscale == 0 || thisScale >= myMinscale){minscaleOK = true;}
-				if(myMaxscale == 0 || thisScale <= myMaxscale){maxscaleOK = true;}
-				if(maxscaleOK == true && minscaleOK == true ){
-					if(cnt_layer > 0){str_layer += ","; str_styles += ","; str_titles += ",";str_parent += ","; str_legendurls += ",";}
-					str_layer += thisLayer[ii];
-					str_styles += "";
-					str_titles += mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_title;
-					str_parent += mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_parent;
-					if(mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_style.length>0){
-					 	str_legendurls += mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_style[0]["legendurl"] ;
-					}
-					cnt_layer++;
-				}
-			}
-		}
-	}
-	var str_layerstyles = [];
-	str_layerstyles[0] = str_layer;
-	str_layerstyles[1] = str_styles;
-	str_layerstyles[2] = str_titles;
-	str_layerstyles[3] = str_legendurls;
-	str_layerstyles[4] = str_parent;
-	return str_layerstyles;
-}
-function setFeatureInfoRequest(fName,x,y, path) {
-	var functionName = 'setFeatureInfoRequest';
-	var ts = mb_timestamp();
-	for(var i=0; i<mb_FeatureInfoPreFunctions.length; i++){
-		eval(mb_FeatureInfoPreFunctions[i]);
-	}   
-	var cnt_fi = 0;
-	for(var i=0; i<mb_mapObj.length; i++){
-		if(mb_mapObj[i].frameName == fName){
-			for(var ii=0; ii<mb_mapObj[i].wms.length; ii++){
-				var newfeatureInfoRequest = "";
-				var requestParams = "";
-				var validation = false;
-				newfeatureInfoRequest += mb_mapObj[i].wms[ii].wms_getfeatureinfo;          
-            	newfeatureInfoRequest += mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getfeatureinfo);
-            	
-				if(mb_mapObj[i].wms[ii].wms_version == "1.0.0"){requestParams += "WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=feature_info&";}
-				if(mb_mapObj[i].wms[ii].wms_version != "1.0.0"){requestParams += "VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetFeatureInfo&SERVICE=WMS&";}
-				requestParams += "SRS="+mb_mapObj[i].epsg+"&";
-				requestParams += "BBOX="+mb_mapObj[i].extent+"&";
-				requestParams += "WIDTH="+mb_mapObj[i].width+"&";
-				requestParams += "HEIGHT="+mb_mapObj[i].height+"&";
-				requestParams += "LAYERS="+mb_mapObj[i].layers[ii]+"&";
-				requestParams += "STYLES="+mb_mapObj[i].styles[ii]+"&";
-				requestParams += "FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";
-				requestParams += "INFO_FORMAT="+mb_mapObj[i].wms[ii].gui_wms_featureinfoformat+"&";
-				requestParams += "EXCEPTIONS=application/vnd.ogc.se_xml&";
-				if(mb_feature_count > 0){             
-					requestParams += "FEATURE_COUNT="+mb_feature_count+"&";
-				}
-				requestParams += "QUERY_LAYERS="+mb_mapObj[i].querylayers[ii]+"&";
-				requestParams += "X=" + x  + "&";
-				requestParams += "Y=" + y;
-				
-				if(mb_mapObj[i].querylayers[ii] != "" && mb_mapObj[i].layers[ii] != ""){
-					validation = true;
-				}
-				//add vendor-specific
-				for(var v=0; v < mb_vendorSpecific.length; v++){
-					var vendorSpecificString = eval(mb_vendorSpecific[v]); 
-					requestParams += "&" + vendorSpecificString; 
-				}
-				if(mb_log && validation){
-					var tmp = eval(mb_log + "('" + newfeatureInfoRequest + requestParams + "','" + ts + "')");
-				}
-				if(document.getElementById("FeatureInfoRedirect") && validation){
-					newfeatureInfoRequest += requestParams;
-					if(path){
-						window.frames["FeatureInfoRedirect"].document.getElementById(mb_mapObj[i].wms[ii].wms_id).src = path + "?url=" + escape(newfeatureInfoRequest)+"&"+mb_nr;
-					}
-					else{
-						window.frames["FeatureInfoRedirect"].document.getElementById(mb_mapObj[i].wms[ii].wms_id).src = newfeatureInfoRequest;
-					}
-					cnt_fi++;
-            	}
-				else if(path && validation){
-					newfeatureInfoRequest += requestParams
-					window.open(path + "?url=" + escape(newfeatureInfoRequest)+"&"+mb_nr, "" , "width=300,height=400,scrollbars=yes,resizable=yes");
-					cnt_fi++;
-				}
-				else if(validation){
-					newfeatureInfoRequest += requestParams;
-					window.open(newfeatureInfoRequest, "" , "width=300,height=400,scrollbars=yes,resizable=yes");
-					cnt_fi++;          
-				}      
-			}
-		}
-	}
-   	if(cnt_fi == 0){alert(unescape("Please select a layer! \n Bitte waehlen Sie eine Ebene zur Abfrage aus!"));}
-}
-function writeTag(frameName, elName, tagSource) {
-  if(frameName && frameName != ""){
-     window.frames[frameName].document.getElementById(elName).innerHTML = tagSource;
-  }
-  else if(!frameName || frameName == ""){
-       document.getElementById(elName).innerHTML = tagSource;
-  }
-}
-function zoom(frameName,in_, factor,x,y) {
-  var x = parseFloat(x);
-  var y = parseFloat(y);
-  var ind = getMapObjIndexByName(frameName);
-  var arrayBBox = mb_mapObj[ind].extent.split(",");
-  var xtentx = parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]);
-  var xtenty =  parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]);
-  var centerx = parseFloat(arrayBBox[0]) + xtentx/2;
-  var centery = parseFloat(arrayBBox[1]) + xtenty/2;
-  var factor = parseFloat(factor);
-  if(x){
-   centerx = x;
-   centery = y;
-  }
-  if (!in_) {factor = 1 / factor;}
-  var new_xtentx = xtentx / factor;
-  var new_xtenty = xtenty / factor;
-  var minx = centerx - new_xtentx / 2;
-  var miny = centery - new_xtenty / 2;
-  var maxx = centerx + new_xtentx / 2;
-  var maxy = centery + new_xtenty / 2;
-  mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
-  setMapRequest(frameName);
-}
-function mb_panMap(frameName,dir){
-   var ind = getMapObjIndexByName(frameName);
-   var arrayBBox = mb_mapObj[ind].extent.split(",");
-   var minx = parseFloat(arrayBBox[0]);
-   var miny = parseFloat(arrayBBox[1]);
-   var maxx = parseFloat(arrayBBox[2]);
-   var maxy = parseFloat(arrayBBox[3]);
-   var xtentx = parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]);
-   var xtenty =  parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]);
-
-   if(dir == "NW"){minx = minx - (xtentx/2); maxx = maxx - (xtentx/2); miny = miny + (xtenty/2); maxy = maxy + (xtenty/2);}
-   if(dir == "N"){miny = miny + (xtenty/2); maxy = maxy + (xtenty/2);}
-   if(dir == "NE"){minx = minx + (xtentx/2); maxx = maxx + (xtentx/2); miny = miny + (xtenty/2); maxy = maxy + (xtenty/2);}
-   if(dir == "W"){minx = minx - (xtentx/2); maxx = maxx - (xtentx/2);}
-   if(dir == "E"){minx = minx + (xtentx/2); maxx = maxx + (xtentx/2);}
-   if(dir == "SW"){minx = minx - (xtentx/2); maxx = maxx - (xtentx/2); miny = miny - (xtenty/2); maxy = maxy - (xtenty/2);}
-   if(dir == "S"){miny = miny - (xtenty/2); maxy = maxy - (xtenty/2);}
-   if(dir == "SE"){minx = minx + (xtentx/2); maxx = maxx + (xtentx/2); miny = miny - (xtenty/2); maxy = maxy - (xtenty/2);}
-  mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
-  setMapRequest(frameName);
-}
-
-function handleSelectedLayer (frameName, wms_title, layerName, type, status) {
-//	alert(frameName + " , " +wms_title + " , " +layerName + " , " +type + " , " +status);
-//	type = {visible || querylayer] status = {0 || 1}
-	for (var i=0; i < mb_mapObj.length; i++) {
-		if (mb_mapObj[i].frameName == frameName) {
-			var cnt_layer = 0;
-			var str_layer = "";
-			var myMapObj = i;
-			for (var ii = 0; ii < mb_mapObj[i].wms.length; ii++) {
-				if (mb_mapObj[i].wms[ii].wms_title == wms_title) { //ii is true
-					var myWMS = ii; 
-					if (type == "visible") {
-						var arrayLayer = mb_mapObj[i].layers[ii].split(",");
-					}
-					if (type == "querylayer") {
-						var arrayLayer = mb_mapObj[i].querylayers[ii].split(",");
-					}
-					for (var iii = 1; iii < mb_mapObj[i].wms[ii].objLayer.length; iii++) {
-						var layer_name = mb_mapObj[i].wms[ii].objLayer[iii].layer_name;
-						if (type == "querylayer") {
-							if (layer_name == layerName && status == 1 && mb_mapObj[i].wms[ii].objLayer[iii].layer_queryable == 1){
-								if (cnt_layer > 0) {
-									str_layer += ",";
-								}
-								str_layer += layer_name;
-								cnt_layer++;                   
-							}
-						}
-						else if (type == "visible") {
-							if (layer_name == layerName && status == 1) {
-								if (cnt_layer > 0) {
-									str_layer += ",";
-								}
-								str_layer += layer_name;
-								cnt_layer++;                   
-							}
-						}
-						for (var iiii = 0; iiii < arrayLayer.length; iiii++) {
-							if (layer_name == arrayLayer[iiii] && layer_name != layerName) {
-								if (cnt_layer > 0) {
-									str_layer += ",";
-								}
-								str_layer += layer_name;
-								cnt_layer++;             
-							}
-						}
-					}
-				}   
-			}         
-		}
-	}
-	if (type == "visible") {
-		mb_mapObj[myMapObj].layers[myWMS] = str_layer;
-		var array_str_layer = str_layer.split(",");
-		var str_styles = "";
-		for (var cnt=0; cnt < array_str_layer.length; cnt++) {
-			if (cnt > 0) {
-				str_styles += ",";
-			}
-			str_styles += "";
-		}
-		mb_mapObj[myMapObj].styles[myWMS] = str_styles;
-	}
-	if (type == "querylayer") {
-		mb_mapObj[myMapObj].querylayers[myWMS] = str_layer;
-	}
-/*
-	if(type == 'visible'){
-		setSingleMapRequest(frameName,wms_title);
-	}
-*/
-}
-
-function handleSelectedLayer_array(mapObj, array_wms, array_layer, type, status){
-	//alert(mapObj+" / "+array_wms[0]+" / "+ array_layer[0]+" / "+ type+" / "+ status);
-	var ind = getMapObjIndexByName(mapObj);
-	for(var j=0; j<array_wms.length; j++){
-		for(var i=0; i<mb_mapObj[ind].wms.length; i++){
-			if(mb_mapObj[ind].wms[i].wms_id == array_wms[j]){
-				var check = false;
-				for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
-					if(mb_mapObj[ind].wms[i].wms_id == array_wms[j] && mb_mapObj[ind].wms[i].objLayer[ii].layer_name == array_layer[j]){
-						if(type == "visible"){
-							mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_visible = parseInt(status);
-							//alert(mb_mapObj[ind].wms[i].objLayer[ii].layer_name);
-							check = true;
-						}
-                        if(type == "querylayer" && (mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_queryable == "1" || mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_queryable == 1)){
-							mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_querylayer = parseInt(status);
-						}
-					}
-				}
-                mb_restateLayers(mapObj, array_wms[j]);
-                //alert('restate');
-                /*
-                * hier noch checken, welche wms sich geaendert haben und disctinct eine singleRequest aufrufen:
-                */ 
-                if(check == true){					
-                    
-                    if(mb_mapObj[ind].wms[i].gui_wms_visible == 1){
-						setSingleMapRequest(mapObj,mb_mapObj[ind].wms[i].wms_id);
-                        //alert('sSMR');
-					}
-				}
-			}
-		}
-	}
-}
-
-function makeClickPos2RealWorldPos(frameName, myClickX, myClickY) {
-	var ind = getMapObjIndexByName(frameName);
-	var width = parseInt(mb_mapObj[ind].width);
-	var height = parseInt(mb_mapObj[ind].height);
-	var arrayBBox = mb_mapObj[ind].extent.split(",");
-	var minX = parseFloat(arrayBBox[0]);
-	var minY = parseFloat(arrayBBox[1]);
-	var maxX = parseFloat(arrayBBox[2]);
-	var maxY = parseFloat(arrayBBox[3]);
-	var deltaX = (maxX - minX)/width;
-	var deltaY = (maxY - minY)/height;
-	if(deltaX > 0){
-		var roundx = 1/Math.pow(10,(Math.round(Math.log(deltaX)/Math.log(10))));
-	}
-	else{
-		var roundx =  Math.pow(10,(Math.round(Math.log(deltaX)/Math.log(10))));
-	}
-	if(deltaY > 0){
-		var roundy = 1/Math.pow(10,(Math.round(Math.log(deltaY)/Math.log(10))));
-	}
-	else{
-		var roundy =  Math.pow(10,(Math.round(Math.log(deltaY)/Math.log(10))));
-	}	
-	var xtentx = maxX - minX;
-	var xtenty =  maxY - minY;
-	var posX = parseFloat(minX + (myClickX / width) * xtentx);
-	var posY = parseFloat(maxY - (myClickY / height) * xtenty);
-	posX = Math.round(posX * roundx)/roundx;
-	posY = Math.round(posY * roundy)/roundy;
-	return new Array(posX, posY);
-}
-function makeRealWorld2mapPos(frameName,rw_posx, rw_posy){
-   var ind = getMapObjIndexByName(frameName);
-   var arrayBBox = mb_mapObj[ind].extent.split(",");
-   var minX = parseFloat(arrayBBox[0]);
-   var minY = parseFloat(arrayBBox[1]);
-   var maxX = parseFloat(arrayBBox[2]);
-   var maxY = parseFloat(arrayBBox[3]);
-   var xtentx = parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]);
-   var xtenty =  parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]);
-   var width = mb_mapObj[ind].width;
-   var height = mb_mapObj[ind].height;
-   pixPos_x = Math.round(parseFloat(((rw_posx - minX)/xtentx)*width));
-   pixPos_y = Math.round(parseFloat(((maxY - rw_posy)/xtenty)*height));
-   return new Array(pixPos_x, pixPos_y);
-}
-
-function mb_arrangeElement(frameName, elName, left, top) {
-   if(frameName != ""){
-      window.frames[frameName].document.getElementById(elName).style.top = top;
-      window.frames[frameName].document.getElementById(elName).style.left = left;
-   }
-   else{
-      document.getElementById(elName).style.top = top;
-      document.getElementById(elName).style.left = left;   
-   }
-}
-
-/***********************Drag & Drop***********************/
-function mb_getMousePos(e,fName){
-if(fName){
-     if(ie){
-        clickX = window.frames[fName].event.clientX;
-        clickY = window.frames[fName].event.clientY;
-     }
-     else{
-        clickX = e.pageX;
-        clickY = e.pageY;
-     }
-  }
-  else{
-       if(ie){
-        clickX = event.clientX;
-        clickY = event.clientY;
-     }
-     else{
-        clickX = e.pageX;
-        clickY = e.pageY;
-     }
-  }
-  var pos = new Array(clickX,clickY);
-  return pos;
-}
-// function for object-identification 
-function getMapObjIndexByName(frameName){
-	for(var i=0; i<mb_mapObj.length; i++){
-		if(mb_mapObj[i].frameName == frameName){
-			return i;
-		}
-	}   
-}
-function mb_getLayerTitleByName(map_index, wms_index, myLayer_name){
-	for(var i=0; i<mb_mapObj[map_index].wms[wms_index].objLayer.length; i++){
-		if(mb_mapObj[map_index].wms[wms_index].objLayer[i].layer_name == myLayer_name){
-			return mb_mapObj[map_index].wms[wms_index].objLayer[i].layer_title;
-		}
-	}
-}
-function getWMSIDByTitle(frameName,wms_title){
-   var ind = getMapObjIndexByName(frameName);
-   for(var i=0; i< mb_mapObj[ind].wms.length; i++){
-      if(mb_mapObj[ind].wms[i].wms_title == wms_title){
-         //return i;
-         return mb_mapObj[ind].wms[i].wms_id;
-      }
-   }
-}
-function getWMSIndexByTitle(frameName,wms_title){
-   var ind = getMapObjIndexByName(frameName);
-   for(var i=0; i< mb_mapObj[ind].wms.length; i++){
-      if(mb_mapObj[ind].wms[i].wms_title == wms_title){
-         return i;
-      }
-   }
-}
-function getWMSIndexById(frameName,wms_id){
-   var ind = getMapObjIndexByName(frameName);
-   for(var i=0; i< mb_mapObj[ind].wms.length; i++){
-      if(mb_mapObj[ind].wms[i].wms_id == wms_id){
-         return i;
-      }
-   }
-}
-//scale
-function mb_getScale(frameName) {
-   for(var i=0; i<mb_GetScalePreFunctions.length; i++){
-		var myScale = eval(mb_GetScalePreFunctions[i]);
-	}
-   if(myScale){
-      var Y_str = myScale;
-   }
-   else{
-      var ind = getMapObjIndexByName(frameName);
-      var arrayBBox = mb_mapObj[ind].extent.split(",");
-      var xtenty =  parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]);
-      var scaleY = (xtenty / mb_mapObj[ind].height) *(mb_resolution * 100);
-      if (scaleY<1){
-      	var Y_str = scaleY;
-      }else{
-      	var Y_str = Math.round(scaleY);
-      }
-   }   
-   return Y_str;   
-}
-
-function mb_repaintScale(frameName, x, y, scale){
-   var ind = getMapObjIndexByName(frameName);
-   if(x == null && y == null){
-      var arrayBBox = mb_mapObj[ind].extent.split(",");
-      x = parseFloat(arrayBBox[0]) + ((parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]))/2);
-      y = parseFloat(arrayBBox[1]) + ((parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]))/2);
-   }
-   var minx = parseFloat(x) - (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale);
-   var miny = parseFloat(y) -  (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale);
-   var maxx = parseFloat(x) + (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale);
-   var maxy = parseFloat(y) +  (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale);
-   mb_repaint(frameName,minx, miny, maxx, maxy);
-}
-function mb_repaint(frameName,minx,miny,maxx,maxy){
-   var ind = getMapObjIndexByName(frameName);
-   mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
-   setMapRequest(frameName);
-}
-function mb_calculateExtent(frameName,minx,miny,maxx,maxy){
-  var ind = getMapObjIndexByName(frameName);
-  
-  var extenty = parseFloat(maxy) - parseFloat(miny);
-  var extentx = parseFloat(maxx) - parseFloat(minx);
-
-  var relation_px_x = mb_mapObj[ind].width / mb_mapObj[ind].height;
-  var relation_px_y = mb_mapObj[ind].height / mb_mapObj[ind].width;
-  var relation_bbox_x = extentx / extenty;     
-  var centerx = parseFloat(minx) + (extentx/2);
-  var centery = parseFloat(miny) + (extenty/2);
-  if(relation_bbox_x <= relation_px_x){                
-    minx = centerx - relation_px_x * extenty / 2;
-    maxx = centerx + relation_px_x * extenty / 2;
-  }
-  if(relation_bbox_x > relation_px_x){                
-    miny = centery - relation_px_y * extentx / 2;
-    maxy = centery + relation_px_y * extentx / 2;
-  }
-  mb_mapObj[ind].extent = minx  +","+ miny +","+ maxx  +","+ maxy;
-}
-
-function mb_showHighlight(frameName,x,y){
-   var pos = makeRealWorld2mapPos(frameName,x, y);
-   mb_arrangeElement(frameName,"highlight",pos[0]-7, pos[1]-7);
-   window.frames[frameName].document.getElementById("highlight").style.visibility = 'visible';
-}
-function mb_hideHighlight(frameName){
-   mb_arrangeElement(frameName,"highlight",-20, -20);
-   mb_arrangeElement(frameName,"highlight",-20, -20);
-   window.frames[frameName].document.getElementById("highlight").style.visibility = 'hidden';
-}
-function mb_permanentHighlight(frameName,x,y){   
-   var pos = makeRealWorld2mapPos(frameName,x, y);
-   mb_arrangeElement(frameName,"permanent",pos[0]-7, pos[1]-7);
-   window.frames[frameName].document.getElementById("permanent").style.visibility = 'visible';
-}
-// framename, commaseparated coordinates, commaseparated rgb values (color)
-//new: coords is array!
-function mb_markResult(frameName,geom,col){
-	var x = "";
-	var y = "";
-	var tmp = [];
-	var ind = getMapObjIndexByName(frameName);
-	for(var i=0; i < geom.length; i++){
-		if(i > 0){
-			x += ":";
-			y += ":";
-		}
-		tmp = geom[i].split(",");
-		for(var ii=0; ii < tmp.length; ii+=2){			
-			var pos = makeRealWorld2mapPos(frameName,tmp[ii], tmp[ii+1]);
-			if(ii>0){
-				x += ",";
-				y += ",";
-			}
-			x += pos[0];
-			y += pos[1];
-		}      
-	}
-	var source = "<img src='../extensions/markResult.php?x=" + x + "&y=" + y + "&width=" + mb_mapObj[ind].width + "&height=" + mb_mapObj[ind].height + "&color="+col+"'>";
-	//prompt("",source);
-	writeTag(frameName,"markResult",source);   
-}
-function mb_disableResult(frameName){
-   writeTag(frameName,"markResult","");
-}
-
-function mb_registerGML(frameName,obj){
-	var ind = getMapObjIndexByName(frameName);
-	mb_mapObj[ind].geom = obj;
-}
-function mb_timestamp(){
-	var d = new Date();
-	var ts = Math.round(Date.parse(d)/1000);
-	return ts;
-}
-function mb_getlayerposbyname(objInd,wmsInd,lname){
-	var t = mb_mapObj[objInd].wms[wmsInd];
-	for(var i=0; i < t.objLayer.length; i++){
-		if(t.objLayer[i].layer_name == lname){
-			return t.objLayer[i].layer_pos;
-		}
-	}
-}
-function mb_getLayerObjByName(fname,wms_id,layer_name){
-	var ind = getMapObjIndexByName(fname);
-	var wmsInd = getWMSIndexById(fname,wms_id);
-	var t = mb_mapObj[ind].wms[wmsInd];
-	for(var i=0; i < t.objLayer.length; i++){
-		if(t.objLayer[i].layer_name == layer_name){
-			return t.objLayer[i];
-		}
-	}
-}
-function mb_getchildsbyname(objInd,wmsInd,lname){
-	var t = mb_mapObj[objInd].wms[wmsInd];
-	var pos = mb_getlayerposbyname(objInd, wmsInd,lname);
-	var l = [];
-	l["name"] = [];
-	l["title"] = [];
-	l["legendurl"] = [];
-	for(var i=0; i < t.objLayer.length; i++){
-		if(t.objLayer[i].layer_parent == pos){
-			l["name"][l["name"].length] = t.objLayer[i].layer_name;
-			l["title"][l["title"].length] = t.objLayer[i].layer_title;
-			if(t.objLayer[i].layer_style.length>0){
-				l["legendurl"][l["legendurl"].length] = t.objLayer[i].layer_style[0]["legendurl"] ;
-			}else{
-				l["legendurl"][l["legendurl"].length] = 0 ;
-			}
-		}
-	}
-	if(l["name"].length > 0){
-		return l;
-	}
-	else{
-		return false;
-	}
-}
-
-/*
- ***************************************************************************************
- *   div tag
- ***************************************************************************************
- */
-
-/**
- * @class Represents a div tag. May be located in any frame of Mapbender.
- * 
- * @constructor
- * @param aTagName {String} the name of the tag
- * @param aFrameName {String} the name of frame where the div tag is being created
- * @param aStyle {Object} an object containing a set of name value pairs, like
- *                        {position:absolute,top:30,z-Index:30}
- */
-function DivTag (aTagName, aFrameName, aStyle) {
-	/**
-	 * @ignore
-	 */
-	this.exists = function () { 
-		return (rootNode.getElementById(tagName)) ? true : false;
-	};
-	
-	/**
-	 * @ignore
-	 */
-	this.getTag = function() {
-		return rootNode.getElementById(tagName);
-	};
-	
-	/**
-	 * @private
-	 */
-	var determineRootNode = function () {
-		node = document;
-		if (frameName !== "") {
-			if (checkFrame()) {node = window.frames[frameName].document;}
-			else {var e = new Mb_exception("frame "+frameName+" doesn't exist.");}
-		}
-		return node;	
-	};
-	
-	/**
-	 * @private
-	 */
-	var toCamelCase = function(aString) {
-		var newString = "";
-		for (var i = 0; i < aString.length; i++) {
-			if (aString.substr(i,1) != "-") {
-				newString += aString.substr(i,1); 
-			}
-			else {
-				i++;
-				newString += aString.substr(i,1).toUpperCase();
-			}
-		}
-		return newString;
-	}
-	
-	/**
-	 * @private
-	 */
-	var setStyle = function () {
-		if (that.exists()) {
-			var node = rootNode.getElementById(tagName);
-			node.setAttribute("style", "");
-			
-			for (var attr in tagStyle) {
-				if (typeof(tagStyle[attr]) != "function" && typeof(tagStyle[attr]) != "object") {
-					var evalString = "node.style."+toCamelCase(attr)+" = \"" + tagStyle[attr] + "\";"; 
-					eval(evalString);				
-				}
-			}
-		}
-	}
-	
-	/**
-	 * @private
-	 */
-	var create = function () {
-		if (!that.exists()) {
-			var divTag = rootNode.createElement("div");
-			var divTagAppended = rootNode.getElementsByTagName("body")[0].appendChild(divTag);
-			divTagAppended.id = tagName;
-		}
-		else {
-			that.clean();
-		}
-		setStyle();
-	};
-
-	/**
-	 * @private
-	 */
-	var checkFrame = function () {
-		if (frameName !== "") {
-			return (typeof(window.frames[frameName]) != 'undefined');
-		}
-		return true;
-	};
-	
-	var that = this;
-	var tagName = aTagName;
-	var frameName = aFrameName;
-	var rootNode = determineRootNode();
-	var tagStyle = aStyle;
-
-	create();
-}
-/**
- * Writes a text into the div tag, while removing existing content.
- * 
- * @param {String} someText the text that is inserted into the tag.
- */
-DivTag.prototype.write = function (someText) {
-	if (this.exists()) {
-		this.getTag().innerHTML = someText;
-	}
-};
-
-/**
- * Deletes the div tag content.
- */
-DivTag.prototype.clean = function () {
-	this.write("");
-};
-
-
-/*
- ***************************************************************************************
- *   Javascript exception handling
- ***************************************************************************************
- */
-
-/**
- * @class An abstract class, logs JavaScript events like errors, warnings etc.
- *
- * @constructor
- */
-var Mb_log = function() {
-	var that = this;
-	
-	var levelArray = global_log_levels.split(",");
-	var log_level = global_mb_log_level;
-	var log_js = global_mb_log_js;
-	
-	var indexOfLevel = function(aLevel) {
-		for (var i = 0; i < levelArray.length; i++) {
-			if (aLevel == levelArray[i])  {
-				return i;
-			}
-		}
-		return false;
-	};
-	var isValidLevel = function(aLevel) {
-		var isNotOff = typeof(log_js) != 'undefined' && log_js != "off";
-		var levelIndex = indexOfLevel(aLevel);
-		var isAppropriate = (typeof(levelIndex)=='number' && levelIndex < indexOfLevel(log_level));
-		return (isNotOff && isAppropriate);
-	};
-	this.throwException = function (message, level) {
-		if (isValidLevel(level)) {
-			if (log_js == "on") {
-				try {
-					mb_ajaxWrap_post('../php/mb_js_exception.php', {level:level,text:message});
-				}
-				catch(e) {
-					alert(e + ": " + message);
-				}
-			}
-			else if (log_js == "alert") {
-				alert(message);
-			}
-			else if (log_js == "console") {
-				if (level == "warning") {
-					console.warn("%s", message);
-				}
-				else if (level == "error") {
-					console.error("%s", message);
-				}
-				else {
-					console.log("%s", message);
-				}
-			}
-		}
-	};
-}	
-
-/**
- *  class for exception logging
- *
- * @extends {@link Mb_log}
- * @param message the message that is being logged
- */	
-function Mb_exception(message) {
-	 var level = "error";
-	this.throwException(message, level);
-}
-Mb_exception.prototype = new Mb_log();
-
-/**
- *  class for warning logging
- *
- * @extends {@link Mb_log}
- * @param message the message that is being logged
- */
-function Mb_warning(message) {
-	var level = "warning";
-	this.throwException(message, level);
-}
-Mb_warning.prototype = new Mb_log();
- 
-/**
- *  class for notice logging
- *
- * @extends {@link Mb_log}
- * @param message the message that is being logged
- */	
- 
-function Mb_notice(message) {
-	var level = "notice";
-	this.throwException(message, level);
-}
-Mb_notice.prototype = new Mb_log();
-
-/*
- ***************************************************************************************
- *   AJAX wrapper functions
- ***************************************************************************************
- */
-/**
- * A wrapper for an AJAX request via GET 
- *
- * @param {String} url the URL of a (presumably a server side) script.
- * @param {Object} param An object containing parameters, f.e. {name1:value1, name2:value2}
- * @param {Function} callback A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (XML, HTML, whatever), status is a {String}, either "success" or "error". 
- */
-function mb_ajax_get(url, param, callback) {
-	try {
-		mb_ajaxWrap_get(url, param, callback);
-	}
-	catch(e) {
-		var error = new Mb_exception('map.php: mb_ajax_get:'+e);
-	}
-}	
-
-/**
- * A wrapper for an AJAX request via POST 
- *
- * @param {String} url the URL of a (presumably a server side) script.
- * @param {Object} param An object containing parameters, f.e. {name1:value1, name2:value2}
- * @param {Function} callback A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (XML, HTML, whatever), status is a {String}, either "success" or "error". 
- */
-function mb_ajax_post(url, param, callback) {
-	try {
-		mb_ajaxWrap_post(url, param, callback);
-	}
-	catch(e) {
-		var error = new Mb_exception('map.php: mb_ajax_post:'+e);
-	}
-}	
-	
-/**
- * A wrapper for an AJAX request via GET 
- *
- * @param {String} url the URL of a (presumably a server side) script.
- * @param {Object} param An object containing parameters, f.e. {name1:value1, name2:value2}
- * @param {Function} callback A function that is called when the server side script has been processed. The function is called with two parameters, result and status. Result is the output of the server side script (a JavaScript Object, not a String!), status is a {String}, either "success" or "error". 
- */
-function mb_ajax_json(url, param, callback) {
-	try {
-		mb_ajaxWrap_json(url, param, callback);
-	}
-	catch(e) {
-		var error = new Mb_exception('map.php: mb_ajax_json:'+e);
-	}
-}	
-	
-/*
- ***************************************************************************************
- *   button handling
- ***************************************************************************************
- */
- 
-var mb_button = [];
-
-function mb_regButton_frame(wii, frameName, param){
-	var ind = mb_button.length;
-	mb_button[ind] = new mb_conButton(wii, ind);
-	if (frameName == null) {
-		if (param == null) {
-			eval(wii+"("+ind+")");
-		}
-		else {
-			eval(wii+"("+ind+", "+param+")");
-		}
-	}
-	else if (param == null) {
-		eval("window.frames['" + frameName + "']."+wii+"("+ind+")");
-	}
-	else {
-		eval("window.frames['" + frameName + "']."+wii+"("+ind+", "+param+")");
-	}
-	mb_button[ind].prev = mb_button[ind].src;
-	mb_button[ind].src = mb_button[ind].img_off;
-	mb_button[ind].onmouseover = new Function("mb_button_over("+ind+")");
-	mb_button[ind].onmouseout = new Function("mb_button_out("+ind+")");
-	mb_button[ind].onclick = new Function("mb_button_click("+ind+")");
-	if (frameName==null) {
-		mb_button[ind].frameName = "";
-	}
-	else {
-		mb_button[ind].frameName = frameName;
-	}
-}
-
-function mb_regButton(wii){
-	mb_regButton_frame(wii, null, null);
-}
-
-function mb_conButton(wii, ind){
-   this.wii = wii;
-   return true;
-}
-function mb_button_over(ind){
-   if(mb_button[ind].status == 0){
-      mb_button[ind].prev = mb_button[ind].src;
-      mb_button[ind].src = mb_button[ind].img_over;
-   }
-}
-function mb_button_out(ind){
-   mb_button[ind].src = mb_button[ind].prev;
-}
-function mb_button_click(ind){
-   var mbStatus = mb_button[ind].status;
-   if(mbStatus == 0){
-      mb_disableButton(mb_button[ind].elName);
-      mb_button[ind].prev = mb_button[ind].img_on;
-      mb_button[ind].src = mb_button[ind].img_on;
-      mb_button[ind].status = 1;
-      if (mb_button[ind].frameName != "") {
-          window.frames[mb_button[ind].frameName].document.getElementById(mb_button[ind].elName).go();
-      }
-      else {
-	      document.getElementById(mb_button[ind].elName).go();
-      }
-   }
-   else{
-      mb_button[ind].prev = mb_button[ind].img_off;
-      mb_button[ind].src = mb_button[ind].img_off;
-      mb_button[ind].status = 0;      
-      if (mb_button[ind].frameName != "") {
-          window.frames[mb_button[ind].frameName].document.getElementById(mb_button[ind].elName).stop();
-      }
-      else {
-	      document.getElementById(mb_button[ind].elName).stop();
-      }
-   }
-}
-function mb_disableButton(elName){
-   for(var i=0; i<mb_button.length; i++){
-      if(mb_button[i].elName != elName && mb_button[i].status == 1){
-            mb_button[i].status = 0;
-		      if (mb_button[i].frameName != "") {
-    	        window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).src = mb_button[i].img_off;
-	            window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).stop();
-		      }
-		      else {
-    	        document.getElementById(mb_button[i].elName).src = mb_button[i].img_off;
-	            document.getElementById(mb_button[i].elName).stop();
-		      }
-            return true;
-       
-      }
-   }
-}
-function mb_disableThisButton(elName){
-   for(var i=0; i<mb_button.length; i++){
-      if(mb_button[i].elName == elName && mb_button[i].status == 1){
-      		//alert(mb_button[i].elName);
-            mb_button[i].status = 0;
-		      if (mb_button[i].frameName != "") {
-    	        window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).src = mb_button[i].img_off;
-	            window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).stop();
-		      }
-		      else {
-        	    document.getElementById(mb_button[i].elName).src = mb_button[i].img_off;
-		        document.getElementById(mb_button[i].elName).stop();
-		      }
-            return true;
-       
-      }
-   }
-}
-
-/*
- ***************************************************************************************
- *   miscellaneous functions
- ***************************************************************************************
- */
-
-function cloneObject(someObject){
-	var clone = [];
-	
-	for (attribute in someObject) {
-
-		var currentElement = someObject[attribute];
-
-		if (typeof(currentElement) == "object") {
-			clone[attribute] = cloneObject(currentElement);
-		}
-		else {
-			clone[attribute] = currentElement;
-		}
-	}	
-	return clone;
-}
-
-
-/**
- * @class A List object is an array of arbitrary objects with additional methods. 
- *
- * @constructor
- */
-var List = function() {
-	
-	/**
-	 * gets the number of elements in this {@link List}
-	 *
-	 * @returns number of elements in this {@link List}
-	 * @type Integer
-	 */
-	this.count = function() {
-		return this.list.length;
-	};
-
-	/**
-	 * deletes the object at index i; -1 refers to the last object in this {@link List}
-	 *
-	 * @param {Integer} i index
-	 */
-	this.del = function(i){
-		i = this.getIndex(i);
-		for(var z = i; z < this.count() - 1; z++){
-			this.list[z] = this.list[z+1];
-		}
-		this.list.length -= 1;
-	};
-
-	/**
-	 * empties this {@link List}
-	 */
-	this.empty = function() {
-		while (this.list != null && this.count() > 0) {
-			this.list.pop();
-		}
-	}
-	
-	/**
-	 * @param {Integer} i index
-	 * @returns the object at index i; -1 refers to the last object in this {@link List}
-	 * @type Integer or false
-	 */
-	this.get = function(i) {
-		i = this.getIndex(i);
-		if (i !== false) {return this.list[i];}
-		return false;		
-	};
-	/**
-	 * adds a reference to item to this {@link List}.
-	 *
-	 * @param {Object} item an object
-	 */
-	this.add = function(item) {
-		this.list.push(item);
-	};
-	/**
-	 * adds a copy of item to this {@link List}.
-	 *
-	 * @param {Object} item an object
-	 */
-	this.addCopy = function(item) {
-		this.list.push(cloneObject(item));
-	};
-	/**
-	 * attaches the {@link List} aList to this {@link List}
-	 *
-	 * @param {List} aList another list
-	 */
-	this.union = function(aList) {
-		for (var i=0; i < aList.count(); i++) {this.addCopy(aList.get(i));}
-	};
-	/**
-	 * checks if the index is valid and returns it if it is; if i == -1, the correct index is retrieved.
-	 *
-	 * @private
-	 * @return Integer or false
-	 * @type Integer
-	 */
-	this.getIndex = function(i){ 
-		if ((i >= 0 && i < this.list.length) || (i*(-1)>0 && i*(-1) <= this.list.length)){
-			if (i >= 0) {return i;} else {return this.list.length+i;}
-		}
-		else {
-			var e = new Mb_exception("class List: function getIndex: member index " + i + " is not valid");
-			return false;
-		}
-	};
-	/**
-	 * @returns a {String} representation of this List
-	 * @type String
-	 */
-	this.toString = function(){
-		var str = "";
-		for (var i =0 ; i < this.count() ; i++){
-			str += this.get(i).toString();
-		}
-		return str;	
-	};	
-	
-	this.list = null;
-};
-
-
-
-/*
- ***************************************************************************************
- *   register functions
- ***************************************************************************************
- */
-
-var mb_MapRequestSubFunctions = [];
-var mb_WfsReadSubFunctions = [];
-var mb_WfsWriteSubFunctions = [];
-var mb_MapRequestPreFunctions = [];
-var mb_FeatureInfoPreFunctions = [];
-var mb_InitFunctions = [];
-var mb_MapObjectSubFunctions = [];
-var mb_GetScalePreFunctions = [];
-var mb_loadWmsSubFunctions = [];
-
-function mb_registerInitFunctions(stringFunction){
-	mb_InitFunctions[mb_InitFunctions.length] = stringFunction;
-}
-function mb_registerPreFunctions(stringFunction){
-	mb_MapRequestPreFunctions[mb_MapRequestPreFunctions.length] = stringFunction;
-}
-function mb_registerFeatureInfoPreFunctions(stringFunction){
-	mb_FeatureInfoPreFunctions[mb_FeatureInfoPreFunctions.length] = stringFunction;
-}
-function mb_registerSubFunctions(stringFunction){
-	mb_MapRequestSubFunctions[mb_MapRequestSubFunctions.length] = stringFunction;
-}
-function mb_registerMapObjectSubFunctions(stringFunction){
-	mb_MapObjectSubFunctions[mb_MapObjectSubFunctions.length] = stringFunction;
-}
-function mb_registerGetScalePreFunctions(stringFunction){
-	mb_GetScalePreFunctions[mb_GetScalePreFunctions.length] = stringFunction;
-}
-function mb_registerloadWmsSubFunctions(stringFunction){
-	mb_loadWmsSubFunctions[mb_loadWmsSubFunctions.length] = stringFunction;
-}
-function mb_registerWfsReadSubFunctions(stringFunction){
-	mb_WfsReadSubFunctions[mb_WfsReadSubFunctions.length] = stringFunction;
-}
-function mb_registerWfsWriteSubFunctions(stringFunction){
-	mb_WfsWriteSubFunctions[mb_WfsWriteSubFunctions.length] = stringFunction;
-}
-function mb_removeFunctionFromArray(arrayname,stringFunction){
-	var length = eval(arrayname+".length");
-	for(var i=0; i<length; i++){
-		if(eval(arrayname+"["+i+"]") == stringFunction){
-			var newArray1 = eval(arrayname+".slice(0, "+(i-1)+")");
-			var newArray2 = eval(arrayname+".slice("+(i+1)+", "+length+")");
-			eval(arrayname + " = newArray1.concat(newArray2)");
-			i--;
-			length--;
-		}
-	}
-}
- 
-function mb_execloadWmsSubFunctions(){
-	for(var i=0; i<mb_loadWmsSubFunctions.length; i++){
-		eval(mb_loadWmsSubFunctions[i]); 	 
-	} 	 
-}
-
-function mb_execWfsReadSubFunctions(geom) { 	 
-	for(var i=0; i<mb_WfsReadSubFunctions.length; i++){ 	 
-		mb_WfsReadSubFunctions[i](geom); 	 
-	} 	 
-}
-
-function mb_execWfsWriteSubFunctions() { 	 
-	for(var i=0; i<mb_WfsWriteSubFunctions.length; i++){
-		mb_WfsWriteSubFunctions[i](); 	 
-	} 	 
-}
-
-/*
- * first draft of a redesign
- *
-var FunctionArray = function() {
-	this.list = [];
-
-	this.register = function (aFunction) {
-		this.add(aFunction);
-	}
-	this.execute = function () {
-		for (var i = 0; i < this.count(); i++) {
-			var aFunction = this.get(i);
-			if (typeof(aFunction) == 'function') {
-				aFunction();
-			}
-			else if (typeof(aFunction) == 'string') {
-				eval(aFunction);
-			}
-			else {
-				var e = new mb_exception("FunctionArray.execute: Invalid parameter: " + aFunction);
-			}
-		}
-	}
-	this.remove = function (functionString) {
-		var listLength = this.count();
-		for (var i = listLength - 1; i >= 0; i--) {
-			if (this.get(i) == functionString){
-				this.del(i);
-			}
-		}
-	}
-}
-
-FunctionArray.prototype = new List();
-
-var mbInitFunctions = new FunctionArray();
-var mbMapRequestSubFunctions = new FunctionArray();
-var mbWfsReadSubFunctions = new FunctionArray();
-var mbWfsWriteSubFunctions = new FunctionArray();
-var mbMapRequestPreFunctions = new FunctionArray();
-var mbFeatureInfoPreFunctions = new FunctionArray();
-var mbInitFunctions = new FunctionArray();
-var mbMapObjectSubFunctions = new FunctionArray();
-var mbGetScalePreFunctions = new FunctionArray();
-var mbloadWmsSubFunctions = new FunctionArray();
-
-*/
-
-/*
- ***************************************************************************************
- *   deprecated functions
- ***************************************************************************************
- */
-
-// only used in mod_perimeter.php
-// previously used in mod_initWmc.php, mod_digitize_tab.php, mod_geometryArray.js
-function mb_checkTag(frameName, tagName, elementId, appendAtTagName, attributes){
-	var oldElement;
-	var newElement;
-	var prefix;
-	if(frameName && frameName != ""){
-		prefix = window.frames[frameName].document;
-	}
-	else if(!frameName || frameName == ""){
-		prefix = document;
-	}
-	oldElement = prefix.getElementById(elementId);
-	if (oldElement == null) {
-		newElement = prefix.createElement(tagName);
-		newElement = prefix.getElementsByTagName(appendAtTagName)[0].appendChild(newElement);
-	}
-	else {
-		if (oldElement.nodeName.toLowerCase() == tagName.toLowerCase()) {
-			for (var i=0; i<attributes.length; i++) {
-				oldElement.setAttribute(attributes[i][0], attributes[i][1]);
-			}
-			return oldElement;
-		}
-		else {
-			return false;
-		}
-	}
-	var newElementAttributeNode = document.createAttribute("id");
-	newElementAttributeNode.value = elementId;
-	newElement.setAttributeNode(newElementAttributeNode);
-	for (var i=0; i<attributes.length; i++) {
-		newElement.setAttribute(attributes[i][0], attributes[i][1]);
-	}
-	return newElement;
-}
\ No newline at end of file
+var ie=document.all?1:0;var n6=document.getElementById&&!document.all?1:0;var n4=document.layers?1:0;var mb_feature_count=100;var mb_resolution=28.35;var mb_mapObj=[];var mb_fiWin=null;var mb_panActive=false;var clickX;var clickY;var mb_start_x=0;var mb_start_y=0;var mb_end_x=0;var mb_end_y=0;var mb_offset_top=0;var mb_offset_right=0;var mb_offset_bottom=0;var mb_offset_left=0;var mb_log=null;var mb_PanSubElements=[];function mb_registerPanSubElement(elName){var ind=mb_PanSubElements.length;mb_PanSubElements[ind]=elName;}
+var mb_vendorSpecific=[];function mb_registerVendorSpecific(stringFunction){mb_vendorSpecific[mb_vendorSpecific.length]=stringFunction;}
+var mb_security_proxy="http://wms1.ccgis.de/mapbender/tools/security_proxy.php?mb_ows_security_proxy=";var mb_trans=new Image;mb_trans.src="../img/transparent.gif";function init(){for(var i=0;i<mb_InitFunctions.length;i++){eval(mb_InitFunctions[i]);}
+for(var i=0;i<mb_mapObj.length;i++){setMapRequest(mb_mapObj[i].frameName);}}
+function deleteWmsObject(){wms=[];wms_layer_count=0;}
+function deleteMapObj(){mb_mapObj=[];}
+function mb_registerMapObj(frameName,elementName,wms_index,width,height){mb_mapObj[mb_mapObj.length]=new mb_mapObj_const(frameName,elementName,width,height,wms_index);}
+function mb_mapObj_const(frameName,elementName,width,height,wms_index){this.width=width;this.height=height;this.frameName=frameName;this.elementName=elementName;this.layers=[];this.styles=[];this.querylayers=[];this.geom="";this.gml="";if(wms_index!=null){this.wms=[];this.wms[0]=wms[wms_index];this.wms[0].mapURL=false;var cnt_layers=0;var cnt_querylayers=0;var styles="";var layers="";var querylayers="";for(var ii=0;ii<this.wms[0].objLayer.length;ii++){if(this.wms[0].objLayer[ii].gui_layer_visible==1&&ii>0){if(cnt_layers>0){layers+=",";styles+=",";}
+layers+=this.wms[0].objLayer[ii].layer_name;styles+="";cnt_layers++;}
+if(this.wms[0].objLayer[ii].gui_layer_querylayer==1&&ii>0){if(cnt_querylayers>0){querylayers+=",";}
+querylayers+=this.wms[0].objLayer[ii].layer_name;cnt_querylayers++;}}
+this.layers[0]=layers;this.styles[0]=styles;this.querylayers[0]=querylayers;}
+else{this.wms=[];for(i=0;i<wms.length;i++){this.wms[i]=wms[i];this.wms[i].mapURL=false;}
+for(var i=0;i<this.wms.length;i++){var cnt_layers=0;var cnt_querylayers=0;var styles="";var layers="";var querylayers="";for(var ii=0;ii<this.wms[i].objLayer.length;ii++){if(this.wms[i].objLayer[ii].gui_layer_visible==1&&ii>0){if(cnt_layers>0){layers+=",";styles+=",";}
+layers+=wms[i].objLayer[ii].layer_name;styles+="";cnt_layers++;}
+if(this.wms[i].objLayer[ii].gui_layer_querylayer==1&&ii>0){if(cnt_querylayers>0){querylayers+=",";}
+querylayers+=wms[i].objLayer[ii].layer_name;cnt_querylayers++;}}
+this.layers[i]=layers;this.styles[i]=styles;this.querylayers[i]=querylayers;}}
+this.epsg=wms[0].gui_wms_epsg;this.extent=setExtent(this.width,this.height,this.epsg);this.mapURL=[];for(var i=0;i<mb_MapObjectSubFunctions.length;i++){eval(mb_MapObjectSubFunctions[i]);}}
+function mb_getConjunctionCharacter(onlineresource){if(onlineresource.indexOf("?")>-1){if(onlineresource.charAt(onlineresource.length-1)=="?"){nextvalue="";}else if(onlineresource.charAt(onlineresource.length-1)=="&"){nextvalue="";}else{nextvalue="&";}}
+if(onlineresource.indexOf("?")==-1){nextvalue="?";}
+return nextvalue;}
+function mb_moveWmsById(mapObj_ind,wms_id,toIndex){return mb_wmsMoveByIndex(mapObj_ind,getWMSIndexById(mapObj_ind,wms_id),toIndex);}
+function mb_wmsMoveByIndex(mapObj_ind,fromIndex,toIndex){if(fromIndex!=toIndex&&fromIndex>=0&&fromIndex<mb_mapObj[mapObj_ind].wms.length&&toIndex>=0&&toIndex<mb_mapObj[mapObj_ind].wms.length){var changed=false;if(fromIndex>toIndex){for(var i=fromIndex;i>toIndex;i--){var result=mb_swapWmsByIndex(mapObj_ind,i-1,i);if(result==true)changed=true;}}
+else{for(var i=fromIndex;i<toIndex;i++){var result=mb_swapWmsByIndex(mapObj_ind,i,i+1);if(result==true)changed=true;}}
+return changed;}
+else{return false;}}
+function mb_swapWmsById(mapObj_ind,wms1_id,wms2_id){return mb_swapWmsByIndex(mapObj_ind,getWMSIndexById(mapObj_ind,wms1_id),getWMSIndexById(mapObj_ind,wms2_id));}
+function mb_swapWmsByIndex(mapObj_ind,indexA,indexB){if(indexA!=indexB&&indexA>=0&&indexA<mb_mapObj[mapObj_ind].wms.length&&indexB>=0&&indexB<mb_mapObj[mapObj_ind].wms.length){upper=mb_mapObj[mapObj_ind].wms[indexA];mb_mapObj[mapObj_ind].wms[indexA]=mb_mapObj[mapObj_ind].wms[indexB];mb_mapObj[mapObj_ind].wms[indexB]=upper;var upperLayers=mb_mapObj[mapObj_ind].layers[indexA];var upperStyles=mb_mapObj[mapObj_ind].styles[indexA];var upperQuerylayers=mb_mapObj[mapObj_ind].querylayers[indexA];mb_mapObj[mapObj_ind].layers[indexA]=mb_mapObj[mapObj_ind].layers[indexB];mb_mapObj[mapObj_ind].styles[indexA]=mb_mapObj[mapObj_ind].styles[indexB];mb_mapObj[mapObj_ind].querylayers[indexA]=mb_mapObj[mapObj_ind].querylayers[indexB];mb_mapObj[mapObj_ind].layers[indexB]=upperLayers;mb_mapObj[mapObj_ind].styles[indexB]=upperStyles;mb_mapObj[mapObj_ind].querylayers[indexB]=upperQuerylayers;return true;}
+else{return false;}}
+function mb_moveUpWmsByIndex(mapObj_ind,index){if(index>0&&index<wms.length){return mb_swapWmsByIndex(mapObj_ind,index-1,index);}
+else{return false;}}
+function mb_moveDownWmsByIndex(mapObj_ind,index){if(index>=0&&index<wms.length-1){return mb_swapWmsByIndex(mapObj_ind,index,index+1);}
+else{return false;}}
+function mb_mapObjaddWMS(obj){var cnt_layers=0;var cnt_querylayers=0;var styles="";var layers="";var querylayers="";var ind=getMapObjIndexByName(obj);for(var i=0;i<(wms.length-1);i++){if(parseInt(wms[i].wms_id)>=parseInt(wms[wms.length-1].wms_id)){wms[wms.length-1].wms_id=parseInt(mb_mapObj[ind].wms[i].wms_id)+1;}}
+mb_mapObj[ind].wms[mb_mapObj[ind].wms.length]=wms[wms.length-1];mb_mapObj[ind].layers[mb_mapObj[ind].layers.length]=layers;mb_mapObj[ind].styles[mb_mapObj[ind].styles.length]=styles;mb_mapObj[ind].querylayers[mb_mapObj[ind].querylayers.length]=querylayers;mb_execloadWmsSubFunctions();return true;}
+function mb_mapObjaddWMSwithLayers(obj,layers,querylayers){var cnt_layers=0;var cnt_querylayers=0;var styles="";var ind=getMapObjIndexByName(obj);mb_mapObj[ind].wms[mb_mapObj[ind].wms.length]=wms[wms.length-1];mb_mapObj[ind].layers[mb_mapObj[ind].layers.length]=layers;mb_mapObj[ind].styles[mb_mapObj[ind].styles.length]=styles;mb_mapObj[ind].querylayers[mb_mapObj[ind].querylayers.length]=querylayers;}
+function mb_mapObjremoveWMS(objind,wmsind){var wms_ID=null;var new_wmsarray=[];var new_layerarray=[];var new_querylayerarray=[];var new_stylesarray=[];var new_mapURLarray=[];for(var i=0;i<mb_mapObj[objind].wms.length;i++){if(i!=wmsind){new_wmsarray[new_wmsarray.length]=mb_mapObj[objind].wms[i];new_layerarray[new_layerarray.length]=mb_mapObj[objind].layers[i];new_querylayerarray[new_querylayerarray.length]=mb_mapObj[objind].querylayers[i];new_stylesarray[new_stylesarray.length]=mb_mapObj[objind].styles[i];new_mapURLarray[new_mapURLarray.length]=mb_mapObj[objind].mapURL[i]}
+else{wms_ID=mb_mapObj[objind].wms[i].wms_id;}}
+mb_mapObj[objind].wms=new_wmsarray;mb_mapObj[objind].layers=new_layerarray;mb_mapObj[objind].querylayers=new_querylayerarray;mb_mapObj[objind].styles=new_stylesarray;mb_mapObj[objind].mapURL=new_mapURLarray;var another_new_wmsarray=[];for(var i=0;i<wms.length;i++){if(wms[i].wms_id!=wms_ID){another_new_wmsarray[another_new_wmsarray.length]=wms[i];}}
+wms=another_new_wmsarray;}
+function setExtent(width,height,epsg){for(var i=0;i<wms[0].gui_epsg.length;i++){if(wms[0].gui_epsg[i]==epsg){var bbox_minx=parseFloat(wms[0].gui_minx[i]);var bbox_miny=parseFloat(wms[0].gui_miny[i]);var bbox_maxx=parseFloat(wms[0].gui_maxx[i]);var bbox_maxy=parseFloat(wms[0].gui_maxy[i]);var extenty=bbox_maxy-bbox_miny;var extentx=bbox_maxx-bbox_minx;var relation_px_x=width/height;var relation_px_y=height/width;var relation_bbox_x=extentx/extenty;var centerx=bbox_minx+(extentx/2);var centery=bbox_miny+(extenty/2);if(relation_bbox_x<=relation_px_x){bbox_minx=centerx-relation_px_x*extenty/2;bbox_maxx=centerx+relation_px_x*extenty/2;}
+if(relation_bbox_x>relation_px_x){bbox_miny=centery-relation_px_y*extentx/2;bbox_maxy=centery+relation_px_y*extentx/2;}
+return bbox_minx+","+bbox_miny+","+bbox_maxx+","+bbox_maxy;}}}
+function setMapRequest(frameName){var functionName='setMapRequest';var ts=mb_timestamp();for(var i=0;i<mb_MapRequestPreFunctions.length;i++){var ret=eval(mb_MapRequestPreFunctions[i]);if(ret==false){return true;}}
+for(var i=0;i<mb_mapObj.length;i++){var newMapRequest="";if(mb_mapObj[i].frameName==frameName){for(var ii=0;ii<mb_mapObj[i].wms.length;ii++){if(mb_mapObj[i].wms[ii].gui_wms_visible>0){var myDivId="div_"+ii;var myMapId="map_"+ii;var str_LayerStyles=mb_checkScale(frameName,i,ii);if(mb_mapObj[i].layers[ii]!=""&&str_LayerStyles[0]!=''){var newMapURL="";if(mb_mapObj[i].wms[ii].gui_wms_mapopacity!=1){var cadenaOpacity="opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity+"; Filter: Alpha(Opacity="+mb_mapObj[i].wms[ii].gui_wms_mapopacity*100+"); -moz-opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity+" ; -khtml-opacity:"+mb_mapObj[i].wms[ii].gui_wms_mapopacity;newMapRequest+="<div id='"+myDivId+"' style=\"position:absolute; top:0px; left:0px; z-index:"+ii+";"+cadenaOpacity+"\">";}
+else{newMapRequest+="<div id='"+myDivId+"' style='position:absolute; top:0px; left:0px; z-index:'"+ii+"'>";}
+newMapRequest+="<img id='"+myMapId+"' name='mapimage' src='";newMapURL+=mb_mapObj[i].wms[ii].wms_getmap;newMapURL+=mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getmap);if(mb_mapObj[i].wms[ii].wms_version=="1.0.0"){newMapURL+="WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=map&";}
+if(mb_mapObj[i].wms[ii].wms_version!="1.0.0"){newMapURL+="VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetMap&SERVICE=WMS&";}
+newMapURL+="LAYERS="+str_LayerStyles[0]+"&";newMapURL+="STYLES="+str_LayerStyles[1]+"&";newMapURL+="SRS="+mb_mapObj[i].epsg+"&";newMapURL+="BBOX="+mb_mapObj[i].extent+"&";newMapURL+="WIDTH="+mb_mapObj[i].width+"&";newMapURL+="HEIGHT="+mb_mapObj[i].height+"&";newMapURL+="FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";newMapURL+="BGCOLOR=0xffffff&";if(mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/gif/i)>-1||mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/png/i)>-1){newMapURL+="TRANSPARENT=TRUE&";}
+newMapURL+="EXCEPTIONS="+mb_mapObj[i].wms[ii].gui_wms_exceptionformat;for(var v=0;v<mb_vendorSpecific.length;v++){var vendorSpecificString=eval(mb_vendorSpecific[v]);if(typeof(vendorSpecificString)!="undefined"){newMapURL+="&"+vendorSpecificString;}}
+if(mb_mapObj[i].wms[ii].wms_filter!=""){var tmp=mb_mapObj[i].wms[ii].wms_filter+"?id="+mb_styleID;var temp="&SLD="+tmp+"&";newMapURL+=temp;}
+if(mb_log){var tmp=eval(mb_log+"('"+newMapURL+"','"+ts+"')");}
+newMapRequest+=newMapURL;mb_mapObj[i].mapURL[ii]=newMapURL;mb_mapObj[i].wms[ii].mapURL=newMapURL;newMapRequest+="' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'></div>";}
+else{mb_mapObj[i].mapURL[ii]=false;mb_mapObj[i].wms[ii].mapURL=false;newMapRequest+="<div id='"+myDivId+"' style='position:absolute; top:0px; left:0px; z-index:"+ii+"'>";newMapRequest+="<img id='"+myMapId+"' name='mapimage' src='"+mb_trans.src;newMapRequest+="' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";newMapRequest+="</div>";}}}
+writeTag(mb_mapObj[i].frameName,mb_mapObj[i].elementName,newMapRequest);}}
+for(var i=0;i<mb_MapRequestSubFunctions.length;i++){eval(mb_MapRequestSubFunctions[i]);}}
+function setSingleMapRequest(frameName,wms_id){var functionName='setSingleMapRequest';var ts=mb_timestamp();for(var i=0;i<mb_MapRequestPreFunctions.length;i++){eval(mb_MapRequestPreFunctions[i]);}
+for(var i=0;i<mb_mapObj.length;i++){var newMapRequest="";if(mb_mapObj[i].frameName==frameName){for(var ii=0;ii<mb_mapObj[i].wms.length;ii++){var myDivId="div_"+ii;var myMapId="map_"+ii;if(mb_mapObj[i].wms[ii].wms_id==wms_id){var newMapURL="";newMapRequest+="<img id='"+myMapId+"' name='mapimage' src='";newMapURL+=mb_mapObj[i].wms[ii].wms_getmap;newMapURL+=mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getmap);if(mb_mapObj[i].wms[ii].wms_version=="1.0.0"){newMapURL+="WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=map&";}
+if(mb_mapObj[i].wms[ii].wms_version!="1.0.0"){newMapURL+="VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetMap&SERVICE=WMS&";}
+var str_LayerStyles=mb_checkScale(frameName,i,ii);newMapURL+="LAYERS="+str_LayerStyles[0]+"&";newMapURL+="STYLES="+str_LayerStyles[1]+"&";newMapURL+="SRS="+mb_mapObj[i].epsg+"&";newMapURL+="BBOX="+mb_mapObj[i].extent+"&";newMapURL+="WIDTH="+mb_mapObj[i].width+"&";newMapURL+="HEIGHT="+mb_mapObj[i].height+"&";newMapURL+="FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";newMapURL+="BGCOLOR=0xffffff&";if(mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/gif/i)>-1||mb_mapObj[i].wms[ii].gui_wms_mapformat.search(/png/i)>-1){newMapURL+="TRANSPARENT=TRUE&";}
+newMapURL+="EXCEPTIONS="+mb_mapObj[i].wms[ii].gui_wms_exceptionformat;for(var v=0;v<mb_vendorSpecific.length;v++){var vendorSpecificString=eval(mb_vendorSpecific[v]);if(typeof(vendorSpecificString)!="undefined"){newMapURL+="&"+vendorSpecificString;}}
+if(mb_mapObj[i].wms[ii].wms_filter!=""){var tmp=mb_mapObj[i].wms[ii].wms_filter+"?id="+mb_styleID;var temp="&SLD="+tmp+"&";newMapURL+=temp;}
+if(mb_mapObj[i].layers[ii]!=""&&str_LayerStyles[0]!=""){newMapRequest+=newMapURL;mb_mapObj[i].mapURL[ii]=newMapURL;mb_mapObj[i].wms[ii].mapURL=newMapURL;newMapRequest+="' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";}
+else{mb_mapObj[i].mapURL[ii]=false;mb_mapObj[i].wms[ii].mapURL=false;newMapRequest="<img id='"+myMapId+"' name='mapimage' src='"+mb_trans.src;newMapRequest+="' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";}
+if(mb_log){var tmp=eval(mb_log+"('"+newMapURL+"','"+ts+"')");}
+writeTag(mb_mapObj[i].frameName,myDivId,newMapRequest);}}}}
+for(var i=0;i<mb_MapRequestSubFunctions.length;i++){eval(mb_MapRequestSubFunctions[i]);}}
+function mb_restateLayers(frameName,wms_id){var ind=getMapObjIndexByName(frameName);for(var i=0;i<mb_mapObj[ind].wms.length;i++){if(mb_mapObj[ind].wms[i].wms_id==wms_id){var cnt_layers=0;var cnt_querylayers=0;var layers="";var styles="";var querylayers="";for(var ii=0;ii<mb_mapObj[ind].wms[i].objLayer.length;ii++){if(mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_visible==1&&ii>0){if(cnt_layers>0){layers+=",";styles+=",";}
+layers+=mb_mapObj[ind].wms[i].objLayer[ii].layer_name;styles+="";cnt_layers++;}
+if(mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_querylayer==1&&ii>0){if(cnt_querylayers>0){querylayers+=",";}
+querylayers+=mb_mapObj[ind].wms[i].objLayer[ii].layer_name;cnt_querylayers++;}
+mb_mapObj[ind].layers[i]=layers;mb_mapObj[ind].querylayers[i]=querylayers;mb_mapObj[ind].styles[i]=styles;}}}}
+function mb_checkScale(frameName,mObj,wmsObj){var thisLayer=mb_mapObj[mObj].layers[wmsObj].split(",");var thisScale=mb_getScale(frameName);var str_layer="";var str_styles="";var str_titles="";var str_legendurls="";var str_parent="";var cnt_layer=0;for(var i=0;i<mb_mapObj[mObj].wms[wmsObj].objLayer.length;i++){var myLayername=mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_name;var myMinscale=mb_mapObj[mObj].wms[wmsObj].objLayer[i].gui_layer_minscale;var myMaxscale=mb_mapObj[mObj].wms[wmsObj].objLayer[i].gui_layer_maxscale;for(var ii=0;ii<thisLayer.length;ii++){var minscaleOK=false;var maxscaleOK=false;if(thisLayer[ii]==myLayername){if(myMinscale==0||thisScale>=myMinscale){minscaleOK=true;}
+if(myMaxscale==0||thisScale<=myMaxscale){maxscaleOK=true;}
+if(maxscaleOK==true&&minscaleOK==true){if(cnt_layer>0){str_layer+=",";str_styles+=",";str_titles+=",";str_parent+=",";str_legendurls+=",";}
+str_layer+=thisLayer[ii];str_styles+="";str_titles+=mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_title;str_parent+=mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_parent;if(mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_style.length>0){str_legendurls+=mb_mapObj[mObj].wms[wmsObj].objLayer[i].layer_style[0]["legendurl"];}
+cnt_layer++;}}}}
+var str_layerstyles=[];str_layerstyles[0]=str_layer;str_layerstyles[1]=str_styles;str_layerstyles[2]=str_titles;str_layerstyles[3]=str_legendurls;str_layerstyles[4]=str_parent;return str_layerstyles;}
+function setFeatureInfoRequest(fName,x,y,path){var functionName='setFeatureInfoRequest';var ts=mb_timestamp();for(var i=0;i<mb_FeatureInfoPreFunctions.length;i++){eval(mb_FeatureInfoPreFunctions[i]);}
+var cnt_fi=0;for(var i=0;i<mb_mapObj.length;i++){if(mb_mapObj[i].frameName==fName){for(var ii=0;ii<mb_mapObj[i].wms.length;ii++){var newfeatureInfoRequest="";var requestParams="";var validation=false;newfeatureInfoRequest+=mb_mapObj[i].wms[ii].wms_getfeatureinfo;newfeatureInfoRequest+=mb_getConjunctionCharacter(mb_mapObj[i].wms[ii].wms_getfeatureinfo);if(mb_mapObj[i].wms[ii].wms_version=="1.0.0"){requestParams+="WMTVER="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=feature_info&";}
+if(mb_mapObj[i].wms[ii].wms_version!="1.0.0"){requestParams+="VERSION="+mb_mapObj[i].wms[ii].wms_version+"&REQUEST=GetFeatureInfo&SERVICE=WMS&";}
+requestParams+="SRS="+mb_mapObj[i].epsg+"&";requestParams+="BBOX="+mb_mapObj[i].extent+"&";requestParams+="WIDTH="+mb_mapObj[i].width+"&";requestParams+="HEIGHT="+mb_mapObj[i].height+"&";requestParams+="LAYERS="+mb_mapObj[i].layers[ii]+"&";requestParams+="STYLES="+mb_mapObj[i].styles[ii]+"&";requestParams+="FORMAT="+mb_mapObj[i].wms[ii].gui_wms_mapformat+"&";requestParams+="INFO_FORMAT="+mb_mapObj[i].wms[ii].gui_wms_featureinfoformat+"&";requestParams+="EXCEPTIONS=application/vnd.ogc.se_xml&";if(mb_feature_count>0){requestParams+="FEATURE_COUNT="+mb_feature_count+"&";}
+requestParams+="QUERY_LAYERS="+mb_mapObj[i].querylayers[ii]+"&";requestParams+="X="+x+"&";requestParams+="Y="+y;if(mb_mapObj[i].querylayers[ii]!=""&&mb_mapObj[i].layers[ii]!=""){validation=true;}
+for(var v=0;v<mb_vendorSpecific.length;v++){var vendorSpecificString=eval(mb_vendorSpecific[v]);requestParams+="&"+vendorSpecificString;}
+if(mb_log&&validation){var tmp=eval(mb_log+"('"+newfeatureInfoRequest+requestParams+"','"+ts+"')");}
+if(document.getElementById("FeatureInfoRedirect")&&validation){newfeatureInfoRequest+=requestParams;if(path){window.frames["FeatureInfoRedirect"].document.getElementById(mb_mapObj[i].wms[ii].wms_id).src=path+"?url="+escape(newfeatureInfoRequest)+"&"+mb_nr;}
+else{window.frames["FeatureInfoRedirect"].document.getElementById(mb_mapObj[i].wms[ii].wms_id).src=newfeatureInfoRequest;}
+cnt_fi++;}
+else if(path&&validation){newfeatureInfoRequest+=requestParams
+window.open(path+"?url="+escape(newfeatureInfoRequest)+"&"+mb_nr,"","width=300,height=400,scrollbars=yes,resizable=yes");cnt_fi++;}
+else if(validation){newfeatureInfoRequest+=requestParams;window.open(newfeatureInfoRequest,"","width=300,height=400,scrollbars=yes,resizable=yes");cnt_fi++;}}}}
+if(cnt_fi==0){alert(unescape("Please select a layer! \n Bitte waehlen Sie eine Ebene zur Abfrage aus!"));}}
+function writeTag(frameName,elName,tagSource){if(frameName&&frameName!=""){window.frames[frameName].document.getElementById(elName).innerHTML=tagSource;}
+else if(!frameName||frameName==""){document.getElementById(elName).innerHTML=tagSource;}}
+function zoom(frameName,in_,factor,x,y){var x=parseFloat(x);var y=parseFloat(y);var ind=getMapObjIndexByName(frameName);var arrayBBox=mb_mapObj[ind].extent.split(",");var xtentx=parseFloat(arrayBBox[2])-parseFloat(arrayBBox[0]);var xtenty=parseFloat(arrayBBox[3])-parseFloat(arrayBBox[1]);var centerx=parseFloat(arrayBBox[0])+xtentx/2;var centery=parseFloat(arrayBBox[1])+xtenty/2;var factor=parseFloat(factor);if(x){centerx=x;centery=y;}
+if(!in_){factor=1/factor;}
+var new_xtentx=xtentx/factor;var new_xtenty=xtenty/factor;var minx=centerx-new_xtentx/2;var miny=centery-new_xtenty/2;var maxx=centerx+new_xtentx/2;var maxy=centery+new_xtenty/2;mb_mapObj[ind].extent=minx+","+miny+","+maxx+","+maxy;setMapRequest(frameName);}
+function mb_panMap(frameName,dir){var ind=getMapObjIndexByName(frameName);var arrayBBox=mb_mapObj[ind].extent.split(",");var minx=parseFloat(arrayBBox[0]);var miny=parseFloat(arrayBBox[1]);var maxx=parseFloat(arrayBBox[2]);var maxy=parseFloat(arrayBBox[3]);var xtentx=parseFloat(arrayBBox[2])-parseFloat(arrayBBox[0]);var xtenty=parseFloat(arrayBBox[3])-parseFloat(arrayBBox[1]);if(dir=="NW"){minx=minx-(xtentx/2);maxx=maxx-(xtentx/2);miny=miny+(xtenty/2);maxy=maxy+(xtenty/2);}
+if(dir=="N"){miny=miny+(xtenty/2);maxy=maxy+(xtenty/2);}
+if(dir=="NE"){minx=minx+(xtentx/2);maxx=maxx+(xtentx/2);miny=miny+(xtenty/2);maxy=maxy+(xtenty/2);}
+if(dir=="W"){minx=minx-(xtentx/2);maxx=maxx-(xtentx/2);}
+if(dir=="E"){minx=minx+(xtentx/2);maxx=maxx+(xtentx/2);}
+if(dir=="SW"){minx=minx-(xtentx/2);maxx=maxx-(xtentx/2);miny=miny-(xtenty/2);maxy=maxy-(xtenty/2);}
+if(dir=="S"){miny=miny-(xtenty/2);maxy=maxy-(xtenty/2);}
+if(dir=="SE"){minx=minx+(xtentx/2);maxx=maxx+(xtentx/2);miny=miny-(xtenty/2);maxy=maxy-(xtenty/2);}
+mb_mapObj[ind].extent=minx+","+miny+","+maxx+","+maxy;setMapRequest(frameName);}
+function handleSelectedLayer(frameName,wms_title,layerName,type,status){for(var i=0;i<mb_mapObj.length;i++){if(mb_mapObj[i].frameName==frameName){var cnt_layer=0;var str_layer="";var myMapObj=i;for(var ii=0;ii<mb_mapObj[i].wms.length;ii++){if(mb_mapObj[i].wms[ii].wms_title==wms_title){var myWMS=ii;if(type=="visible"){var arrayLayer=mb_mapObj[i].layers[ii].split(",");}
+if(type=="querylayer"){var arrayLayer=mb_mapObj[i].querylayers[ii].split(",");}
+for(var iii=1;iii<mb_mapObj[i].wms[ii].objLayer.length;iii++){var layer_name=mb_mapObj[i].wms[ii].objLayer[iii].layer_name;if(type=="querylayer"){if(layer_name==layerName&&status==1&&mb_mapObj[i].wms[ii].objLayer[iii].layer_queryable==1){if(cnt_layer>0){str_layer+=",";}
+str_layer+=layer_name;cnt_layer++;}}
+else if(type=="visible"){if(layer_name==layerName&&status==1){if(cnt_layer>0){str_layer+=",";}
+str_layer+=layer_name;cnt_layer++;}}
+for(var iiii=0;iiii<arrayLayer.length;iiii++){if(layer_name==arrayLayer[iiii]&&layer_name!=layerName){if(cnt_layer>0){str_layer+=",";}
+str_layer+=layer_name;cnt_layer++;}}}}}}}
+if(type=="visible"){mb_mapObj[myMapObj].layers[myWMS]=str_layer;var array_str_layer=str_layer.split(",");var str_styles="";for(var cnt=0;cnt<array_str_layer.length;cnt++){if(cnt>0){str_styles+=",";}
+str_styles+="";}
+mb_mapObj[myMapObj].styles[myWMS]=str_styles;}
+if(type=="querylayer"){mb_mapObj[myMapObj].querylayers[myWMS]=str_layer;}}
+function handleSelectedLayer_array(mapObj,array_wms,array_layer,type,status){var ind=getMapObjIndexByName(mapObj);for(var j=0;j<array_wms.length;j++){for(var i=0;i<mb_mapObj[ind].wms.length;i++){if(mb_mapObj[ind].wms[i].wms_id==array_wms[j]){var check=false;for(var ii=0;ii<mb_mapObj[ind].wms[i].objLayer.length;ii++){if(mb_mapObj[ind].wms[i].wms_id==array_wms[j]&&mb_mapObj[ind].wms[i].objLayer[ii].layer_name==array_layer[j]){if(type=="visible"){mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_visible=parseInt(status);check=true;}
+if(type=="querylayer"&&(mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_queryable=="1"||mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_queryable==1)){mb_mapObj[ind].wms[i].objLayer[ii].gui_layer_querylayer=parseInt(status);}}}
+mb_restateLayers(mapObj,array_wms[j]);if(check==true){if(mb_mapObj[ind].wms[i].gui_wms_visible==1){setSingleMapRequest(mapObj,mb_mapObj[ind].wms[i].wms_id);}}}}}}
+function makeClickPos2RealWorldPos(frameName,myClickX,myClickY){var ind=getMapObjIndexByName(frameName);var width=parseInt(mb_mapObj[ind].width);var height=parseInt(mb_mapObj[ind].height);var arrayBBox=mb_mapObj[ind].extent.split(",");var minX=parseFloat(arrayBBox[0]);var minY=parseFloat(arrayBBox[1]);var maxX=parseFloat(arrayBBox[2]);var maxY=parseFloat(arrayBBox[3]);var deltaX=(maxX-minX)/width;var deltaY=(maxY-minY)/height;if(deltaX>0){var roundx=1/Math.pow(10,(Math.round(Math.log(deltaX)/Math.log(10))));}
+else{var roundx=Math.pow(10,(Math.round(Math.log(deltaX)/Math.log(10))));}
+if(deltaY>0){var roundy=1/Math.pow(10,(Math.round(Math.log(deltaY)/Math.log(10))));}
+else{var roundy=Math.pow(10,(Math.round(Math.log(deltaY)/Math.log(10))));}
+var xtentx=maxX-minX;var xtenty=maxY-minY;var posX=parseFloat(minX+(myClickX/width)*xtentx);var posY=parseFloat(maxY-(myClickY/height)*xtenty);posX=Math.round(posX*roundx)/roundx;posY=Math.round(posY*roundy)/roundy;return new Array(posX,posY);}
+function makeRealWorld2mapPos(frameName,rw_posx,rw_posy){var ind=getMapObjIndexByName(frameName);var arrayBBox=mb_mapObj[ind].extent.split(",");var minX=parseFloat(arrayBBox[0]);var minY=parseFloat(arrayBBox[1]);var maxX=parseFloat(arrayBBox[2]);var maxY=parseFloat(arrayBBox[3]);var xtentx=parseFloat(arrayBBox[2])-parseFloat(arrayBBox[0]);var xtenty=parseFloat(arrayBBox[3])-parseFloat(arrayBBox[1]);var width=mb_mapObj[ind].width;var height=mb_mapObj[ind].height;pixPos_x=Math.round(parseFloat(((rw_posx-minX)/xtentx)*width));pixPos_y=Math.round(parseFloat(((maxY-rw_posy)/xtenty)*height));return new Array(pixPos_x,pixPos_y);}
+function mb_arrangeElement(frameName,elName,left,top){if(frameName!=""){window.frames[frameName].document.getElementById(elName).style.top=top;window.frames[frameName].document.getElementById(elName).style.left=left;}
+else{document.getElementById(elName).style.top=top;document.getElementById(elName).style.left=left;}}
+function mb_getMousePos(e,fName){if(fName){if(ie){clickX=window.frames[fName].event.clientX;clickY=window.frames[fName].event.clientY;}
+else{clickX=e.pageX;clickY=e.pageY;}}
+else{if(ie){clickX=event.clientX;clickY=event.clientY;}
+else{clickX=e.pageX;clickY=e.pageY;}}
+var pos=new Array(clickX,clickY);return pos;}
+function getMapObjIndexByName(frameName){for(var i=0;i<mb_mapObj.length;i++){if(mb_mapObj[i].frameName==frameName){return i;}}}
+function mb_getLayerTitleByName(map_index,wms_index,myLayer_name){for(var i=0;i<mb_mapObj[map_index].wms[wms_index].objLayer.length;i++){if(mb_mapObj[map_index].wms[wms_index].objLayer[i].layer_name==myLayer_name){return mb_mapObj[map_index].wms[wms_index].objLayer[i].layer_title;}}}
+function getWMSIDByTitle(frameName,wms_title){var ind=getMapObjIndexByName(frameName);for(var i=0;i<mb_mapObj[ind].wms.length;i++){if(mb_mapObj[ind].wms[i].wms_title==wms_title){return mb_mapObj[ind].wms[i].wms_id;}}}
+function getWMSIndexByTitle(frameName,wms_title){var ind=getMapObjIndexByName(frameName);for(var i=0;i<mb_mapObj[ind].wms.length;i++){if(mb_mapObj[ind].wms[i].wms_title==wms_title){return i;}}}
+function getWMSIndexById(frameName,wms_id){var ind=getMapObjIndexByName(frameName);for(var i=0;i<mb_mapObj[ind].wms.length;i++){if(mb_mapObj[ind].wms[i].wms_id==wms_id){return i;}}}
+function mb_getScale(frameName){for(var i=0;i<mb_GetScalePreFunctions.length;i++){var myScale=eval(mb_GetScalePreFunctions[i]);}
+if(myScale){var Y_str=myScale;}
+else{var ind=getMapObjIndexByName(frameName);var arrayBBox=mb_mapObj[ind].extent.split(",");var xtenty=parseFloat(arrayBBox[3])-parseFloat(arrayBBox[1]);var scaleY=(xtenty/mb_mapObj[ind].height)*(mb_resolution*100);if(scaleY<1){var Y_str=scaleY;}else{var Y_str=Math.round(scaleY);}}
+return Y_str;}
+function mb_repaintScale(frameName,x,y,scale){var ind=getMapObjIndexByName(frameName);if(x==null&&y==null){var arrayBBox=mb_mapObj[ind].extent.split(",");x=parseFloat(arrayBBox[0])+((parseFloat(arrayBBox[2])-parseFloat(arrayBBox[0]))/2);y=parseFloat(arrayBBox[1])+((parseFloat(arrayBBox[3])-parseFloat(arrayBBox[1]))/2);}
+var minx=parseFloat(x)-(mb_mapObj[ind].width/(mb_resolution*100*2)*scale);var miny=parseFloat(y)-(mb_mapObj[ind].height/(mb_resolution*100*2)*scale);var maxx=parseFloat(x)+(mb_mapObj[ind].width/(mb_resolution*100*2)*scale);var maxy=parseFloat(y)+(mb_mapObj[ind].height/(mb_resolution*100*2)*scale);mb_repaint(frameName,minx,miny,maxx,maxy);}
+function mb_repaint(frameName,minx,miny,maxx,maxy){var ind=getMapObjIndexByName(frameName);mb_mapObj[ind].extent=minx+","+miny+","+maxx+","+maxy;setMapRequest(frameName);}
+function mb_calculateExtent(frameName,minx,miny,maxx,maxy){var ind=getMapObjIndexByName(frameName);var extenty=parseFloat(maxy)-parseFloat(miny);var extentx=parseFloat(maxx)-parseFloat(minx);var relation_px_x=mb_mapObj[ind].width/mb_mapObj[ind].height;var relation_px_y=mb_mapObj[ind].height/mb_mapObj[ind].width;var relation_bbox_x=extentx/extenty;var centerx=parseFloat(minx)+(extentx/2);var centery=parseFloat(miny)+(extenty/2);if(relation_bbox_x<=relation_px_x){minx=centerx-relation_px_x*extenty/2;maxx=centerx+relation_px_x*extenty/2;}
+if(relation_bbox_x>relation_px_x){miny=centery-relation_px_y*extentx/2;maxy=centery+relation_px_y*extentx/2;}
+mb_mapObj[ind].extent=minx+","+miny+","+maxx+","+maxy;}
+function mb_showHighlight(frameName,x,y){var pos=makeRealWorld2mapPos(frameName,x,y);mb_arrangeElement(frameName,"highlight",pos[0]-7,pos[1]-7);window.frames[frameName].document.getElementById("highlight").style.visibility='visible';}
+function mb_hideHighlight(frameName){mb_arrangeElement(frameName,"highlight",-20,-20);mb_arrangeElement(frameName,"highlight",-20,-20);window.frames[frameName].document.getElementById("highlight").style.visibility='hidden';}
+function mb_permanentHighlight(frameName,x,y){var pos=makeRealWorld2mapPos(frameName,x,y);mb_arrangeElement(frameName,"permanent",pos[0]-7,pos[1]-7);window.frames[frameName].document.getElementById("permanent").style.visibility='visible';}
+function mb_markResult(frameName,geom,col){var x="";var y="";var tmp=[];var ind=getMapObjIndexByName(frameName);for(var i=0;i<geom.length;i++){if(i>0){x+=":";y+=":";}
+tmp=geom[i].split(",");for(var ii=0;ii<tmp.length;ii+=2){var pos=makeRealWorld2mapPos(frameName,tmp[ii],tmp[ii+1]);if(ii>0){x+=",";y+=",";}
+x+=pos[0];y+=pos[1];}}
+var source="<img src='../extensions/markResult.php?x="+x+"&y="+y+"&width="+mb_mapObj[ind].width+"&height="+mb_mapObj[ind].height+"&color="+col+"'>";writeTag(frameName,"markResult",source);}
+function mb_disableResult(frameName){writeTag(frameName,"markResult","");}
+function mb_registerGML(frameName,obj){var ind=getMapObjIndexByName(frameName);mb_mapObj[ind].geom=obj;}
+function mb_timestamp(){var d=new Date();var ts=Math.round(Date.parse(d)/1000);return ts;}
+function mb_getlayerposbyname(objInd,wmsInd,lname){var t=mb_mapObj[objInd].wms[wmsInd];for(var i=0;i<t.objLayer.length;i++){if(t.objLayer[i].layer_name==lname){return t.objLayer[i].layer_pos;}}}
+function mb_getLayerObjByName(fname,wms_id,layer_name){var ind=getMapObjIndexByName(fname);var wmsInd=getWMSIndexById(fname,wms_id);var t=mb_mapObj[ind].wms[wmsInd];for(var i=0;i<t.objLayer.length;i++){if(t.objLayer[i].layer_name==layer_name){return t.objLayer[i];}}}
+function mb_getchildsbyname(objInd,wmsInd,lname){var t=mb_mapObj[objInd].wms[wmsInd];var pos=mb_getlayerposbyname(objInd,wmsInd,lname);var l=[];l["name"]=[];l["title"]=[];l["legendurl"]=[];for(var i=0;i<t.objLayer.length;i++){if(t.objLayer[i].layer_parent==pos){l["name"][l["name"].length]=t.objLayer[i].layer_name;l["title"][l["title"].length]=t.objLayer[i].layer_title;if(t.objLayer[i].layer_style.length>0){l["legendurl"][l["legendurl"].length]=t.objLayer[i].layer_style[0]["legendurl"];}else{l["legendurl"][l["legendurl"].length]=0;}}}
+if(l["name"].length>0){return l;}
+else{return false;}}
+function DivTag(aTagName,aFrameName,aStyle){this.exists=function(){return(rootNode.getElementById(tagName))?true:false;};this.getTag=function(){return rootNode.getElementById(tagName);};var determineRootNode=function(){node=document;if(frameName!==""){if(checkFrame()){node=window.frames[frameName].document;}
+else{var e=new Mb_exception("frame "+frameName+" doesn't exist.");}}
+return node;};var toCamelCase=function(aString){var newString="";for(var i=0;i<aString.length;i++){if(aString.substr(i,1)!="-"){newString+=aString.substr(i,1);}
+else{i++;newString+=aString.substr(i,1).toUpperCase();}}
+return newString;}
+var setStyle=function(){if(that.exists()){var node=rootNode.getElementById(tagName);node.setAttribute("style","");for(var attr in tagStyle){if(typeof(tagStyle[attr])!="function"&&typeof(tagStyle[attr])!="object"){var evalString="node.style."+toCamelCase(attr)+" = \""+tagStyle[attr]+"\";";eval(evalString);}}}}
+var create=function(){if(!that.exists()){var divTag=rootNode.createElement("div");var divTagAppended=rootNode.getElementsByTagName("body")[0].appendChild(divTag);divTagAppended.id=tagName;}
+else{that.clean();}
+setStyle();};var checkFrame=function(){if(frameName!==""){return(typeof(window.frames[frameName])!='undefined');}
+return true;};var that=this;var tagName=aTagName;var frameName=aFrameName;var rootNode=determineRootNode();var tagStyle=aStyle;create();}
+DivTag.prototype.write=function(someText){if(this.exists()){this.getTag().innerHTML=someText;}};DivTag.prototype.clean=function(){this.write("");};var Mb_log=function(){var that=this;var levelArray=global_log_levels.split(",");var log_level=global_mb_log_level;var log_js=global_mb_log_js;var indexOfLevel=function(aLevel){for(var i=0;i<levelArray.length;i++){if(aLevel==levelArray[i]){return i;}}
+return false;};var isValidLevel=function(aLevel){var isNotOff=typeof(log_js)!='undefined'&&log_js!="off";var levelIndex=indexOfLevel(aLevel);var isAppropriate=(typeof(levelIndex)=='number'&&levelIndex<indexOfLevel(log_level));return(isNotOff&&isAppropriate);};this.throwException=function(message,level){if(isValidLevel(level)){if(log_js=="on"){try{mb_ajaxWrap_post('../php/mb_js_exception.php',{level:level,text:message});}
+catch(e){alert(e+": "+message);}}
+else if(log_js=="alert"){alert(message);}
+else if(log_js=="console"){if(level=="warning"){console.warn("%s",message);}
+else if(level=="error"){console.error("%s",message);}
+else{console.log("%s",message);}}}};}
+function Mb_exception(message){var level="error";this.throwException(message,level);}
+Mb_exception.prototype=new Mb_log();function Mb_warning(message){var level="warning";this.throwException(message,level);}
+Mb_warning.prototype=new Mb_log();function Mb_notice(message){var level="notice";this.throwException(message,level);}
+Mb_notice.prototype=new Mb_log();function mb_ajax_get(url,param,callback){try{mb_ajaxWrap_get(url,param,callback);}
+catch(e){var error=new Mb_exception('map.php: mb_ajax_get:'+e);}}
+function mb_ajax_post(url,param,callback){try{mb_ajaxWrap_post(url,param,callback);}
+catch(e){var error=new Mb_exception('map.php: mb_ajax_post:'+e);}}
+function mb_ajax_json(url,param,callback){try{mb_ajaxWrap_json(url,param,callback);}
+catch(e){var error=new Mb_exception('map.php: mb_ajax_json:'+e);}}
+var mb_button=[];function mb_regButton_frame(wii,frameName,param){var ind=mb_button.length;mb_button[ind]=new mb_conButton(wii,ind);if(frameName==null){if(param==null){eval(wii+"("+ind+")");}
+else{eval(wii+"("+ind+", "+param+")");}}
+else if(param==null){eval("window.frames['"+frameName+"']."+wii+"("+ind+")");}
+else{eval("window.frames['"+frameName+"']."+wii+"("+ind+", "+param+")");}
+mb_button[ind].prev=mb_button[ind].src;mb_button[ind].src=mb_button[ind].img_off;mb_button[ind].onmouseover=new Function("mb_button_over("+ind+")");mb_button[ind].onmouseout=new Function("mb_button_out("+ind+")");mb_button[ind].onclick=new Function("mb_button_click("+ind+")");if(frameName==null){mb_button[ind].frameName="";}
+else{mb_button[ind].frameName=frameName;}}
+function mb_regButton(wii){mb_regButton_frame(wii,null,null);}
+function mb_conButton(wii,ind){this.wii=wii;return true;}
+function mb_button_over(ind){if(mb_button[ind].status==0){mb_button[ind].prev=mb_button[ind].src;mb_button[ind].src=mb_button[ind].img_over;}}
+function mb_button_out(ind){mb_button[ind].src=mb_button[ind].prev;}
+function mb_button_click(ind){var mbStatus=mb_button[ind].status;if(mbStatus==0){mb_disableButton(mb_button[ind].elName);mb_button[ind].prev=mb_button[ind].img_on;mb_button[ind].src=mb_button[ind].img_on;mb_button[ind].status=1;if(mb_button[ind].frameName!=""){window.frames[mb_button[ind].frameName].document.getElementById(mb_button[ind].elName).go();}
+else{document.getElementById(mb_button[ind].elName).go();}}
+else{mb_button[ind].prev=mb_button[ind].img_off;mb_button[ind].src=mb_button[ind].img_off;mb_button[ind].status=0;if(mb_button[ind].frameName!=""){window.frames[mb_button[ind].frameName].document.getElementById(mb_button[ind].elName).stop();}
+else{document.getElementById(mb_button[ind].elName).stop();}}}
+function mb_disableButton(elName){for(var i=0;i<mb_button.length;i++){if(mb_button[i].elName!=elName&&mb_button[i].status==1){mb_button[i].status=0;if(mb_button[i].frameName!=""){window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).src=mb_button[i].img_off;window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).stop();}
+else{document.getElementById(mb_button[i].elName).src=mb_button[i].img_off;document.getElementById(mb_button[i].elName).stop();}
+return true;}}}
+function mb_disableThisButton(elName){for(var i=0;i<mb_button.length;i++){if(mb_button[i].elName==elName&&mb_button[i].status==1){mb_button[i].status=0;if(mb_button[i].frameName!=""){window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).src=mb_button[i].img_off;window.frames[mb_button[i].frameName].document.getElementById(mb_button[i].elName).stop();}
+else{document.getElementById(mb_button[i].elName).src=mb_button[i].img_off;document.getElementById(mb_button[i].elName).stop();}
+return true;}}}
+function cloneObject(someObject){var clone=[];for(attribute in someObject){var currentElement=someObject[attribute];if(typeof(currentElement)=="object"){clone[attribute]=cloneObject(currentElement);}
+else{clone[attribute]=currentElement;}}
+return clone;}
+var List=function(){this.count=function(){return this.list.length;};this.del=function(i){i=this.getIndex(i);for(var z=i;z<this.count()-1;z++){this.list[z]=this.list[z+1];}
+this.list.length-=1;};this.empty=function(){while(this.list!=null&&this.count()>0){this.list.pop();}}
+this.get=function(i){i=this.getIndex(i);if(i!==false){return this.list[i];}
+return false;};this.add=function(item){this.list.push(item);};this.addCopy=function(item){this.list.push(cloneObject(item));};this.union=function(aList){for(var i=0;i<aList.count();i++){this.addCopy(aList.get(i));}};this.getIndex=function(i){if((i>=0&&i<this.list.length)||(i*(-1)>0&&i*(-1)<=this.list.length)){if(i>=0){return i;}else{return this.list.length+i;}}
+else{var e=new Mb_exception("class List: function getIndex: member index "+i+" is not valid");return false;}};this.toString=function(){var str="";for(var i=0;i<this.count();i++){str+=this.get(i).toString();}
+return str;};this.list=null;};var mb_MapRequestSubFunctions=[];var mb_WfsReadSubFunctions=[];var mb_WfsWriteSubFunctions=[];var mb_MapRequestPreFunctions=[];var mb_FeatureInfoPreFunctions=[];var mb_InitFunctions=[];var mb_MapObjectSubFunctions=[];var mb_GetScalePreFunctions=[];var mb_loadWmsSubFunctions=[];function mb_registerInitFunctions(stringFunction){mb_InitFunctions[mb_InitFunctions.length]=stringFunction;}
+function mb_registerPreFunctions(stringFunction){mb_MapRequestPreFunctions[mb_MapRequestPreFunctions.length]=stringFunction;}
+function mb_registerFeatureInfoPreFunctions(stringFunction){mb_FeatureInfoPreFunctions[mb_FeatureInfoPreFunctions.length]=stringFunction;}
+function mb_registerSubFunctions(stringFunction){mb_MapRequestSubFunctions[mb_MapRequestSubFunctions.length]=stringFunction;}
+function mb_registerMapObjectSubFunctions(stringFunction){mb_MapObjectSubFunctions[mb_MapObjectSubFunctions.length]=stringFunction;}
+function mb_registerGetScalePreFunctions(stringFunction){mb_GetScalePreFunctions[mb_GetScalePreFunctions.length]=stringFunction;}
+function mb_registerloadWmsSubFunctions(stringFunction){mb_loadWmsSubFunctions[mb_loadWmsSubFunctions.length]=stringFunction;}
+function mb_registerWfsReadSubFunctions(stringFunction){mb_WfsReadSubFunctions[mb_WfsReadSubFunctions.length]=stringFunction;}
+function mb_registerWfsWriteSubFunctions(stringFunction){mb_WfsWriteSubFunctions[mb_WfsWriteSubFunctions.length]=stringFunction;}
+function mb_removeFunctionFromArray(arrayname,stringFunction){var length=eval(arrayname+".length");for(var i=0;i<length;i++){if(eval(arrayname+"["+i+"]")==stringFunction){var newArray1=eval(arrayname+".slice(0, "+(i-1)+")");var newArray2=eval(arrayname+".slice("+(i+1)+", "+length+")");eval(arrayname+" = newArray1.concat(newArray2)");i--;length--;}}}
+function mb_execloadWmsSubFunctions(){for(var i=0;i<mb_loadWmsSubFunctions.length;i++){eval(mb_loadWmsSubFunctions[i]);}}
+function mb_execWfsReadSubFunctions(geom){for(var i=0;i<mb_WfsReadSubFunctions.length;i++){mb_WfsReadSubFunctions[i](geom);}}
+function mb_execWfsWriteSubFunctions(){for(var i=0;i<mb_WfsWriteSubFunctions.length;i++){mb_WfsWriteSubFunctions[i]();}}
+function mb_checkTag(frameName,tagName,elementId,appendAtTagName,attributes){var oldElement;var newElement;var prefix;if(frameName&&frameName!=""){prefix=window.frames[frameName].document;}
+else if(!frameName||frameName==""){prefix=document;}
+oldElement=prefix.getElementById(elementId);if(oldElement==null){newElement=prefix.createElement(tagName);newElement=prefix.getElementsByTagName(appendAtTagName)[0].appendChild(newElement);}
+else{if(oldElement.nodeName.toLowerCase()==tagName.toLowerCase()){for(var i=0;i<attributes.length;i++){oldElement.setAttribute(attributes[i][0],attributes[i][1]);}
+return oldElement;}
+else{return false;}}
+var newElementAttributeNode=document.createAttribute("id");newElementAttributeNode.value=elementId;newElement.setAttributeNode(newElementAttributeNode);for(var i=0;i<attributes.length;i++){newElement.setAttribute(attributes[i][0],attributes[i][1]);}
+return newElement;}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/javascripts/map.php
===================================================================
--- tags/2.4.2/http/javascripts/map.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/javascripts/map.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -19,6 +19,11 @@
 
 ob_start();
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+// see http://trac.osgeo.org/mapbender/ticket/79
+ini_set('session.bug_compat_42',0); 
+ini_set('session.bug_compat_warn',0);
+
 session_start();
 header('Content-type: application/x-javascript');
 

Modified: tags/2.4.3_rc1/http/javascripts/map_obj.js
===================================================================
--- tags/2.4.2/http/javascripts/map_obj.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/javascripts/map_obj.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,219 +1,10 @@
-/* 
-* $Id$
-* COPYRIGHT: (C) 2001 by ccgis. This program is free software under the GNU General Public
-* License (>=v2). Read the file gpl.txt that comes with Mapbender for details. 
-*/
-
-//global variables
-var wms = new Array();
-var wms_layer_count = 0;
-//list of all wms-objects
-function add_wms(
-			wms_id,
-			wms_version,
-			wms_title,
-			wms_abstract,
-			wms_getmap,
-			wms_getfeatureinfo,
-			wms_getlegendurl,
-			wms_filter,
-			gui_wms_mapformat,
-			gui_wms_featureinfoformat,
-			gui_wms_exceptionformat,
-			gui_wms_epsg,
-			gui_wms_visible){
-					wms[wms.length] = new wms_const( 
-					wms_id,
-					wms_version,
-					wms_title,
-					wms_abstract,
-					wms_getmap,
-					wms_getfeatureinfo,
-					wms_getlegendurl,
-					wms_filter,
-					gui_wms_mapformat,
-					gui_wms_featureinfoformat,
-					gui_wms_exceptionformat,
-					gui_wms_epsg,
-					gui_wms_visible);
-					wms_layer[wms.length - 1] = new Array();
-}
-//the wms constructor
-function wms_const(  
-			wms_id,
-			wms_version,
-			wms_title,
-			wms_abstract,
-			wms_getmap,
-			wms_getfeatureinfo,
-		    wms_getlegendurl,
-			wms_filter,
-			gui_wms_mapformat,
-			gui_wms_featureinfoformat,
-			gui_wms_exceptionformat,
-			gui_wms_epsg,
-			gui_wms_visible){
-   
-	if (!wms_id) {
-		var id_ok = false;
-		while (id_ok == false) {
-			wms_id = "a"+Math.round(10000*Math.random());
-			id_ok = true;
-			for (var i=0; i < wms.length && id_ok == true; i++) {
-				if (wms_id == wms[i].wms_id) id_ok = false;
-			}
-		}
-	}
-	
-	this.wms_id = wms_id;
-	this.wms_version = wms_version;
-	this.wms_title = wms_title;
-	this.wms_abstract = wms_abstract;
-	this.wms_getmap = wms_getmap;
-	this.wms_getfeatureinfo = wms_getfeatureinfo;
-	this.wms_getlegendurl = wms_getlegendurl;
-	this.wms_filter = wms_filter;
-	this.data_type = new Array();
-	this.data_format = new Array();
-	this.objLayer = new Array();
-	this.gui_wms_mapformat = gui_wms_mapformat;
-	this.gui_wms_featureinfoformat = gui_wms_featureinfoformat;
-	this.gui_wms_exceptionformat = gui_wms_exceptionformat;
-	this.gui_wms_epsg = gui_wms_epsg;
-	this.gui_wms_visible = gui_wms_visible;
-	this.gui_epsg = new Array();
-	this.gui_minx = new Array();
-	this.gui_miny = new Array();
-	this.gui_maxx = new Array();
-	this.gui_maxy = new Array();
-
-// opacity version 
-	this.gui_wms_mapopacity = 1;      
-}
-function wms_add_data_type_format(datatype,dataformat){
-	var insertDataFormat = true;
-	for (var i = 0 ; i < wms[wms.length-1].data_type.length ; i ++) {
-		if (wms[wms.length-1].data_type[i] == datatype && wms[wms.length-1].data_format[i] == dataformat) {
-			insertDataFormat = false;
-		}
-	}
-	if (insertDataFormat == true) {
-		wms[wms.length-1].data_type[wms[wms.length-1].data_type.length] = datatype;
-		wms[wms.length-1].data_format[wms[wms.length-1].data_format.length] = dataformat;
-	}
-}
-function wms_addSRS(epsg,minx,miny,maxx,maxy){
-	wms[wms.length-1].gui_epsg[wms[wms.length-1].gui_epsg.length] = epsg;
-	wms[wms.length-1].gui_minx[wms[wms.length-1].gui_minx.length] = minx;
-	wms[wms.length-1].gui_miny[wms[wms.length-1].gui_miny.length] = miny;
-	wms[wms.length-1].gui_maxx[wms[wms.length-1].gui_maxx.length] = maxx;
-	wms[wms.length-1].gui_maxy[wms[wms.length-1].gui_maxy.length] = maxy;
-}
-function wms_addLayerStyle(styleName, styleTitle, count, layerCount, styleLegendUrl, styleLegendUrlFormat){
-	if (wms[wms.length-1].objLayer[layerCount]) {
-		wms[wms.length-1].objLayer[layerCount].layer_style[count] = new Array();
-		wms[wms.length-1].objLayer[layerCount].layer_style[count]["name"] = styleName;
-		wms[wms.length-1].objLayer[layerCount].layer_style[count]["title"] = styleTitle;
-		wms[wms.length-1].objLayer[layerCount].layer_style[count]["legendurl"] = styleLegendUrl;
-		wms[wms.length-1].objLayer[layerCount].layer_style[count]["legendurlformat"] = styleLegendUrlFormat;
-	}
-}
-
-
-//layer
-function wms_add_layer(
-			layer_parent,
-			layer_uid,
-			layer_name,
-			layer_title,
-			layer_dataurl_href,
-			layer_pos,
-			layer_queryable,
-			layer_minscale,
-			layer_maxscale,
-			layer_metadataurl,
-			gui_layer_wms_id,
-			gui_layer_status,
-			gui_layer_selectable,
-			gui_layer_visible,
-			gui_layer_queryable,
-			gui_layer_querylayer,
-			gui_layer_minscale,
-			gui_layer_maxscale,
-			gui_layer_wfs_featuretype){
-                      
-	wms[wms.length-1].objLayer[wms[wms.length-1].objLayer.length] = new wms_layer(
-											layer_parent,
-											layer_uid,
-											layer_name,
-											layer_title,
-											layer_dataurl_href,
-											layer_pos,
-											layer_queryable,
-											layer_minscale,
-											layer_maxscale,
-											layer_metadataurl,
-											gui_layer_wms_id,
-											gui_layer_status,
-											gui_layer_selectable,
-											gui_layer_visible,
-											gui_layer_queryable,
-											gui_layer_querylayer,
-											gui_layer_minscale,
-											gui_layer_maxscale,
-											gui_layer_wfs_featuretype );
-}
-function layer_addEpsg(epsg,minx,miny,maxx,maxy){
-	var j=wms[wms.length-1].objLayer.length-1;
-	var k=wms[wms.length-1].objLayer[j].layer_epsg.length;
-	wms[wms.length-1].objLayer[j].layer_epsg[k]=new Array();
-	wms[wms.length-1].objLayer[j].layer_epsg[k]["epsg"]=epsg;
-	wms[wms.length-1].objLayer[j].layer_epsg[k]["minx"]=minx;
-	wms[wms.length-1].objLayer[j].layer_epsg[k]["miny"]=miny;
-	wms[wms.length-1].objLayer[j].layer_epsg[k]["maxx"]=maxx;
-	wms[wms.length-1].objLayer[j].layer_epsg[k]["maxy"]=maxy;
-}
-function wms_layer(
-			layer_parent,
-			wms_layer_uid,
-			layer_name,
-			layer_title,
-			layer_dataurl_href,
-			layer_pos,
-			layer_queryable,
-			layer_minscale,
-			layer_maxscale,
-			layer_metadataurl,
-			gui_layer_wms_id,
-			gui_layer_status,
-			gui_layer_selectable,
-			gui_layer_visible,
-			gui_layer_queryable,
-			gui_layer_querylayer,
-			gui_layer_minscale,
-			gui_layer_maxscale,
-			gui_layer_wfs_featuretype){
-	this.layer_id = wms_layer_count;
-	this.layer_uid = wms_layer_uid;
-	this.layer_parent = layer_parent;
-	this.layer_name = layer_name;
-	this.layer_title = layer_title;
-	this.layer_dataurl_href = layer_dataurl_href;
-	this.layer_pos = layer_pos;
-	this.layer_queryable = layer_queryable;
-	this.layer_minscale = layer_minscale;
-	this.layer_maxscale = layer_maxscale;
-	this.layer_metadataurl = layer_metadataurl;
-	this.layer_epsg = new Array();
-	this.gui_layer_wms_id = gui_layer_wms_id;
-	this.gui_layer_status = gui_layer_status;
-	this.gui_layer_selectable = gui_layer_selectable;
-	this.gui_layer_visible = gui_layer_visible;
-	this.gui_layer_queryable = gui_layer_queryable;
-	this.gui_layer_querylayer = gui_layer_querylayer;
-	this.gui_layer_minscale = gui_layer_minscale;
-	this.gui_layer_maxscale = gui_layer_maxscale;
-	this.gui_layer_wfs_featuretype = gui_layer_wfs_featuretype;
-	this.layer_style = new Array();
-	wms_layer_count++;
-}
\ No newline at end of file
+var wms=new Array();var wms_layer_count=0;function add_wms(wms_id,wms_version,wms_title,wms_abstract,wms_getmap,wms_getfeatureinfo,wms_getlegendurl,wms_filter,gui_wms_mapformat,gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible){wms[wms.length]=new wms_const(wms_id,wms_version,wms_title,wms_abstract,wms_getmap,wms_getfeatureinfo,wms_getlegendurl,wms_filter,gui_wms_mapformat,gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible);wms_layer[wms.length-1]=new Array();}
+function wms_const(wms_id,wms_version,wms_title,wms_abstract,wms_getmap,wms_getfeatureinfo,wms_getlegendurl,wms_filter,gui_wms_mapformat,gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible){if(!wms_id){var id_ok=false;while(id_ok==false){wms_id="a"+Math.round(10000*Math.random());id_ok=true;for(var i=0;i<wms.length&&id_ok==true;i++){if(wms_id==wms[i].wms_id)id_ok=false;}}}
+this.wms_id=wms_id;this.wms_version=wms_version;this.wms_title=wms_title;this.wms_abstract=wms_abstract;this.wms_getmap=wms_getmap;this.wms_getfeatureinfo=wms_getfeatureinfo;this.wms_getlegendurl=wms_getlegendurl;this.wms_filter=wms_filter;this.data_type=new Array();this.data_format=new Array();this.objLayer=new Array();this.gui_wms_mapformat=gui_wms_mapformat;this.gui_wms_featureinfoformat=gui_wms_featureinfoformat;this.gui_wms_exceptionformat=gui_wms_exceptionformat;this.gui_wms_epsg=gui_wms_epsg;this.gui_wms_visible=gui_wms_visible;this.gui_epsg=new Array();this.gui_minx=new Array();this.gui_miny=new Array();this.gui_maxx=new Array();this.gui_maxy=new Array();this.gui_wms_mapopacity=1;}
+function wms_add_data_type_format(datatype,dataformat){var insertDataFormat=true;for(var i=0;i<wms[wms.length-1].data_type.length;i++){if(wms[wms.length-1].data_type[i]==datatype&&wms[wms.length-1].data_format[i]==dataformat){insertDataFormat=false;}}
+if(insertDataFormat==true){wms[wms.length-1].data_type[wms[wms.length-1].data_type.length]=datatype;wms[wms.length-1].data_format[wms[wms.length-1].data_format.length]=dataformat;}}
+function wms_addSRS(epsg,minx,miny,maxx,maxy){wms[wms.length-1].gui_epsg[wms[wms.length-1].gui_epsg.length]=epsg;wms[wms.length-1].gui_minx[wms[wms.length-1].gui_minx.length]=minx;wms[wms.length-1].gui_miny[wms[wms.length-1].gui_miny.length]=miny;wms[wms.length-1].gui_maxx[wms[wms.length-1].gui_maxx.length]=maxx;wms[wms.length-1].gui_maxy[wms[wms.length-1].gui_maxy.length]=maxy;}
+function wms_addLayerStyle(styleName,styleTitle,count,layerCount,styleLegendUrl,styleLegendUrlFormat){if(wms[wms.length-1].objLayer[layerCount]){wms[wms.length-1].objLayer[layerCount].layer_style[count]=new Array();wms[wms.length-1].objLayer[layerCount].layer_style[count]["name"]=styleName;wms[wms.length-1].objLayer[layerCount].layer_style[count]["title"]=styleTitle;wms[wms.length-1].objLayer[layerCount].layer_style[count]["legendurl"]=styleLegendUrl;wms[wms.length-1].objLayer[layerCount].layer_style[count]["legendurlformat"]=styleLegendUrlFormat;}}
+function wms_add_layer(layer_parent,layer_uid,layer_name,layer_title,layer_dataurl_href,layer_pos,layer_queryable,layer_minscale,layer_maxscale,layer_metadataurl,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_wfs_featuretype){wms[wms.length-1].objLayer[wms[wms.length-1].objLayer.length]=new wms_layer(layer_parent,layer_uid,layer_name,layer_title,layer_dataurl_href,layer_pos,layer_queryable,layer_minscale,layer_maxscale,layer_metadataurl,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_wfs_featuretype);}
+function layer_addEpsg(epsg,minx,miny,maxx,maxy){var j=wms[wms.length-1].objLayer.length-1;var k=wms[wms.length-1].objLayer[j].layer_epsg.length;wms[wms.length-1].objLayer[j].layer_epsg[k]=new Array();wms[wms.length-1].objLayer[j].layer_epsg[k]["epsg"]=epsg;wms[wms.length-1].objLayer[j].layer_epsg[k]["minx"]=minx;wms[wms.length-1].objLayer[j].layer_epsg[k]["miny"]=miny;wms[wms.length-1].objLayer[j].layer_epsg[k]["maxx"]=maxx;wms[wms.length-1].objLayer[j].layer_epsg[k]["maxy"]=maxy;}
+function wms_layer(layer_parent,wms_layer_uid,layer_name,layer_title,layer_dataurl_href,layer_pos,layer_queryable,layer_minscale,layer_maxscale,layer_metadataurl,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_wfs_featuretype){this.layer_id=wms_layer_count;this.layer_uid=wms_layer_uid;this.layer_parent=layer_parent;this.layer_name=layer_name;this.layer_title=layer_title;this.layer_dataurl_href=layer_dataurl_href;this.layer_pos=layer_pos;this.layer_queryable=layer_queryable;this.layer_minscale=layer_minscale;this.layer_maxscale=layer_maxscale;this.layer_metadataurl=layer_metadataurl;this.layer_epsg=new Array();this.gui_layer_wms_id=gui_layer_wms_id;this.gui_layer_status=gui_layer_status;this.gui_layer_selectable=gui_layer_selectable;this.gui_layer_visible=gui_layer_visible;this.gui_layer_queryable=gui_layer_queryable;this.gui_layer_querylayer=gui_layer_querylayer;this.gui_layer_minscale=gui_layer_minscale;this.gui_layer_maxscale=gui_layer_maxscale;this.gui_layer_wfs_featuretype=gui_layer_wfs_featuretype;this.layer_style=new Array();wms_layer_count++;}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/javascripts/point.js
===================================================================
--- tags/2.4.2/http/javascripts/point.js	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/javascripts/point.js	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,174 +1,23 @@
-/* 
-* $Id$
-* COPYRIGHT: (C) 2001 by ccgis. This program is free software under the GNU General Public
-* License (>=v2). Read the file gpl.txt that comes with Mapbender for details. 
-*/
-//http://www.mapbender.org/index.php/point.js
-
-/**
- * @class A class representing a two-dimensional point.
- *
- * @constructor
- * @param {Float} x x value of the {@link Point}
- * @param {Float} y y value of the {@link Point}
- */
- function Point(x, y){
- 	/**
- 	 * x value of the {@link Point}
- 	 *
-	 * @type Float
-	 */
-	this.x = parseFloat(x);
- 	/**
- 	 * y value of the {@link Point}
-	 *
-	 * @type Float
-	 */
-	this.y = parseFloat(y);
-}
-/**
- * computes the distance between a {@link Point} p and this {@link Point}
- *
- * @param {Point} p the distance between this {@link Point} and the {@link Point} p is computed.
- * @return {Float} the distance between the two {@link Point} objects.
- */
-Point.prototype.dist = function(p){
-	return Math.sqrt(Math.pow(this.y-p.y,2) + Math.pow(this.x-p.x,2)) ;
-}
-/**
- * checks if the coordinates of this {@link Point} match the coordinates of a {@link Point} p
- *
- * @param {Point} p 
- * @return {Boolean} true if the two points are equal; elso false
- */
-Point.prototype.equals = function(p){
-	if (this.x == p.x && this.y == p.y) {return true;}
-	return false;
-}
-/**
- * subtracts a {@link Point} p from this {@link Point}
- *
- * @param {Point} p 
- * @return a new {@link Point} with the difference of the two points
- */
-Point.prototype.minus = function(p){
-	return new Point(this.x-p.x, this.y-p.y);
-}
-/**
- * adds this {@link Point} to a {@link Point} p
- *
- * @param {Point} p 
- * @return a new {@link Point} with the sum of the two points
- */
-Point.prototype.plus = function(p){
-	return new Point(this.x+p.x, this.y+p.y);
-}
-/**
- * divides this {@link Point} by a scalar c
- *
- * @param {Float} c divisor
- * @return a new {@link Point} divided by c
- */
-Point.prototype.dividedBy = function(c){
-	if (c != 0) {
-		return new Point(this.x/c, this.y/c);
-	}
-	var e = new Mb_exception("Point.dividedBy: Division by zero");
-	return false;
-}
-/**
- * multiplies this {@link Point} by a scalar c
- *
- * @param {Float} c factor
- * @return a new {@link Point} multiplied by c
- */
-Point.prototype.times = function(c){
-	return new Point(this.x*c, this.y*c);
-}
-/**
- * rounds the coordinates to numOfDigits digits
- *
- * @param numOfDigits the coordinate will be rounded to numOfDigits digits
- * @return a new {@link Point} rounded to numOfDigits digits
- * @type Point
- */
-Point.prototype.round = function(numOfDigits){
-	return new Point(roundToDigits(this.x, numOfDigits), roundToDigits(this.y, numOfDigits));
-}
-/**
- * @returns a {String} representation of this Point
- * @type String
- */
-Point.prototype.toString = function(){
-	return "(" + this.x + ", " + this.y + ")";
-}
-
-
-//------------------------------------------------------------------------
-// possible improvement: point has flag: map OR real. additional functions: toReal, toMap
-/**
- * @ignore
- */
-function mapToReal(frameName, aPoint) {
-	var v;
-	if (typeof(mb_mapObj) == 'object') v = makeClickPos2RealWorldPos(frameName, aPoint.x, aPoint.y);
-	else if (typeof(parent.mb_mapObj) == 'object') v = parent.makeClickPos2RealWorldPos(frameName, aPoint.x, aPoint.y);
-	else alert('where am i?');
-	return new Point(v[0], v[1]);
-}
-/**
- * @ignore
- */
-function realToMap(frameName, aPoint) {
-	var v;
-	if (typeof(mb_mapObj) == 'object') {
-		v = makeRealWorld2mapPos(frameName, aPoint.x, aPoint.y);
-	}
-	else if (typeof(parent.mb_mapObj) == 'object') {
-		v = parent.makeRealWorld2mapPos(frameName, aPoint.x, aPoint.y);
-	}
-	else {
-		var e = new Mb_exception('Point.realToMap:where am i?');
-	}
-	return new Point(v[0], v[1]);
-}
-/**
- * @ignore
- */
-function mb_calcExtent(frameName, min, max) {
-	var ind;
-	if (typeof(mb_mapObj) == 'object') {
-		ind = getMapObjIndexByName(frameName);
-	}
-	else if (typeof(parent.mb_mapObj) == 'object') {
-		ind = parent.getMapObjIndexByName(frameName);
-	}
-	else {
-		var e = new Mb_exception('Point.mb_calcExtent: function getMapObjIndexByName not found');
-	}
-	var extent = max.minus(min);
-	var center = extent.dividedBy(2).plus(min);
-	
-	var relation_px_x = mb_mapObj[ind].width / mb_mapObj[ind].height;
-	var relation_px_y = mb_mapObj[ind].height / mb_mapObj[ind].width;
-	var relation_bbox_x = extent.x / extent.y;     
-	
-	var new_min;
-	var new_max;
-	
-	if(relation_bbox_x <= relation_px_x){                
-		new_min = new Point(center.x - relation_px_x * extent.y / 2, min.y);
-		new_max = new Point(center.x + relation_px_x * extent.y / 2, max.y);
-	}
-	else if(relation_bbox_x > relation_px_x){                
-		new_min = new Point(min.x, center.y - relation_px_y * extent.x / 2);
-		new_max = new Point(max.x, center.y + relation_px_y * extent.x / 2);
-	}
-	mb_mapObj[ind].extent = new_min.x +","+ new_min.y +","+ new_max.x  +","+ new_max.y;
-}
-/**
- * @ignore
- */
-function roundToDigits(aFloat, numberOfDigits) {
-	return Math.round(aFloat*Math.pow(10, parseInt(numberOfDigits)))/Math.pow(10, parseInt(numberOfDigits));
-}
+function Point(x,y){this.x=parseFloat(x);this.y=parseFloat(y);}
+Point.prototype.dist=function(p){return Math.sqrt(Math.pow(this.y-p.y,2)+Math.pow(this.x-p.x,2));}
+Point.prototype.equals=function(p){if(this.x==p.x&&this.y==p.y){return true;}
+return false;}
+Point.prototype.minus=function(p){return new Point(this.x-p.x,this.y-p.y);}
+Point.prototype.plus=function(p){return new Point(this.x+p.x,this.y+p.y);}
+Point.prototype.dividedBy=function(c){if(c!=0){return new Point(this.x/c,this.y/c);}
+var e=new Mb_exception("Point.dividedBy: Division by zero");return false;}
+Point.prototype.times=function(c){return new Point(this.x*c,this.y*c);}
+Point.prototype.round=function(numOfDigits){return new Point(roundToDigits(this.x,numOfDigits),roundToDigits(this.y,numOfDigits));}
+Point.prototype.toString=function(){return"("+this.x+", "+this.y+")";}
+function mapToReal(frameName,aPoint){var v;if(typeof(mb_mapObj)=='object')v=makeClickPos2RealWorldPos(frameName,aPoint.x,aPoint.y);else if(typeof(parent.mb_mapObj)=='object')v=parent.makeClickPos2RealWorldPos(frameName,aPoint.x,aPoint.y);else alert('where am i?');return new Point(v[0],v[1]);}
+function realToMap(frameName,aPoint){var v;if(typeof(mb_mapObj)=='object'){v=makeRealWorld2mapPos(frameName,aPoint.x,aPoint.y);}
+else if(typeof(parent.mb_mapObj)=='object'){v=parent.makeRealWorld2mapPos(frameName,aPoint.x,aPoint.y);}
+else{var e=new Mb_exception('Point.realToMap:where am i?');}
+return new Point(v[0],v[1]);}
+function mb_calcExtent(frameName,min,max){var ind;if(typeof(mb_mapObj)=='object'){ind=getMapObjIndexByName(frameName);}
+else if(typeof(parent.mb_mapObj)=='object'){ind=parent.getMapObjIndexByName(frameName);}
+else{var e=new Mb_exception('Point.mb_calcExtent: function getMapObjIndexByName not found');}
+var extent=max.minus(min);var center=extent.dividedBy(2).plus(min);var relation_px_x=mb_mapObj[ind].width/mb_mapObj[ind].height;var relation_px_y=mb_mapObj[ind].height/mb_mapObj[ind].width;var relation_bbox_x=extent.x/extent.y;var new_min;var new_max;if(relation_bbox_x<=relation_px_x){new_min=new Point(center.x-relation_px_x*extent.y/2,min.y);new_max=new Point(center.x+relation_px_x*extent.y/2,max.y);}
+else if(relation_bbox_x>relation_px_x){new_min=new Point(min.x,center.y-relation_px_y*extent.x/2);new_max=new Point(max.x,center.y+relation_px_y*extent.x/2);}
+mb_mapObj[ind].extent=new_min.x+","+new_min.y+","+new_max.x+","+new_max.y;}
+function roundToDigits(aFloat,numberOfDigits){return Math.round(aFloat*Math.pow(10,parseInt(numberOfDigits)))/Math.pow(10,parseInt(numberOfDigits));}
\ No newline at end of file

Modified: tags/2.4.3_rc1/http/php/mb_listWMCs.php
===================================================================
--- tags/2.4.2/http/php/mb_listWMCs.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/php/mb_listWMCs.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -24,6 +24,7 @@
 $wmcId = $_GET["wmc_id"];
 
 $delWmcId = $_POST["del_wmc_id"];
+$clientFilename = $_FILES['local_wmc_filename']['tmp_name'];
 
 $form_target = $_SERVER["PHP_SELF"] . "?" . SID;
 
@@ -51,7 +52,7 @@
 
 <?php
 function mb_listWMCs($wmcIdArray, $form_target){
-	$display = "<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>Ma</font><font color='#0000CE'>p</font><font color='#C00000'>b</font><font color='#000000'>ender WMC list</font></h2>";
+	$display = "<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from list</font></h2>";
 	$display .= "<table width='90%' style='font-family: Arial, Helvetica, sans-serif;font-size : 12px;color: #808080;' border='1' cellpadding='3' rules='rows'><tr style='background-color:#F0F0F0;' width='80px'><td ><b>WMC name</b></td><td><b>last update</b></td><td colspan=5></td></tr>";
 
 	if (count($wmcIdArray) > 0) {
@@ -118,9 +119,20 @@
 	}
 }
 
+function loadFile($filename) {
+	$handle = fopen($filename, "r");
+	$cnt = 0;
+	while (!feof($handle)) {
+    	$buffer .= fgets($handle, 4096);
+	}
+	fclose ($handle);
+	return $buffer;
+}
+
 $admin = new administration();
 $wmcIdArray = $admin->getWmcByOwner($user_id);
 
+// wmc is being deleted
 if (!empty($delWmcId)) {
 	$result = $admin->deleteWmc($delWmcId, $user_id);
 	if (!$result) {
@@ -129,7 +141,36 @@
 		echo "</script>";
 	}
 }
+// wmc is being loaded from file
+elseif ($clientFilename) {
+	$serverFilename = "../tmp/wmc" . time() . ".xml";
+	copy($clientFilename, $serverFilename);
+	
+	$wmc = new wmc();
+	$wmc->createObjFromWMC_xml(loadFile($serverFilename));
+	
+	$mytarget = getTarget($gui_id);
+	$js = $wmc->createJsObjFromWMC("window.opener.", $mytarget, "load");
+	echo "<script language='javascript'>";
+	echo $js;
+	if ($wmc->getTitle()) {
+		$title = "'" . $wmc->getTitle() . "' ";
+	}
+	echo "alert(\"WMC " . $title . ": load successful.\");\n";
+	echo "window.close();";
+	echo "</script>";
+}
 
+// load a WMC from file
+?>
+<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from file</font></h2>
+<form enctype="multipart/form-data" action="<?php echo $form_target;?>" method=POST target="_self"> 
+<input type='file' name='local_wmc_filename'>
+<input type='submit' value='load'>
+</form>
+<?php
+
+// load a WMC from list
 echo mb_listWMCs($wmcIdArray, $form_target);
 		
 if ($wmcId && in_array($wmcId, $wmcIdArray)){

Modified: tags/2.4.3_rc1/http/php/mod_editGuiWms.php
===================================================================
--- tags/2.4.2/http/php/mod_editGuiWms.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/php/mod_editGuiWms.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -39,7 +39,10 @@
 
 function toImage($text) {
 	$angle = 90;
-	return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+	if (extension_loaded("gd2")) {
+		return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+	}
+	return $text;
 }
 ?>
 
@@ -278,7 +281,7 @@
 			$myKey = explode("___", $key);
 			if($myKey[1]!="layer_parent" && $myKey[1]!='layer_id' ){
 				$sql = "UPDATE gui_layer SET ".$myKey[1]." = $1 WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
-				$v = array($val,$this_gui,str_replace("L_","",$myKey[0]));
+				$v = array($val,$this_gui,preg_replace("/L_/","",$myKey[0]));
 				$t = array('i','s','i');
 				if(!$res = db_prep_query($sql,$v,$t)){
 					echo "FEHLER in ZEILE 249";

Modified: tags/2.4.3_rc1/http/php/mod_map1.php
===================================================================
--- tags/2.4.2/http/php/mod_map1.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/php/mod_map1.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -64,7 +64,7 @@
 </head>
 <body leftmargin='0' topmargin='0' onload="init_mod_map1()" bgcolor='#ffffff'>
 <div id='markResult' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:26'> </div>
-<div id='maps' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px;'> </div>
+<div id='maps' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:2;'> </div>
 
 <div id='highlight' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:3;visibility:visible"><img src="../img/redball.gif"/></div>
 <div id='l_right' name='l_right' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:10;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>

Modified: tags/2.4.3_rc1/http/php/mod_wfs_conf.php
===================================================================
--- tags/2.4.2/http/php/mod_wfs_conf.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/php/mod_wfs_conf.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -74,6 +74,15 @@
 $aWFS = new wfs_conf();
 $aWFS->getallwfs();
 
+
+function toImage($text) {
+	$angle = 90;
+	if (extension_loaded("gd2")) {
+		return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+	}
+	return $text;
+}
+
 /* save wfs_conf properties */
 
 if(isset($_REQUEST["save"])){
@@ -124,22 +133,20 @@
                 if(!empty($_REQUEST["f_mandatory".$i])){
                 	$sql .= "'1'";
                 }else{$sql .= "'0'";}
+//                $sql .= ", ";
+//                $sql .= "'".addslashes($_REQUEST["f_auth_varname".$i]);
+//				$sql .= "'";
                 $sql .= "); ";
 
                 $res = db_query($sql);
-     
         }
-        $sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_geom = 1";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_geom"].";";
-		$res = db_query($sql);
+        if (isset($_REQUEST["f_geom"])) {
+	        $sql = "UPDATE wfs_conf_element SET ";
+	        $sql .= "f_geom = 1";
+	        $sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_geom"].";";
+			$res = db_query($sql);
+        }
 		
-
-        $sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_gid = 1";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_gid"].";";
-		$res = db_query($sql);
-		
 		echo "<script language='javascript'>";
 		echo "document.location.href = 'mod_wfs_edit.php?gaz=".$wfsID."';";
 		echo "</script>";
@@ -204,11 +211,6 @@
 
 /* end select featuretype */
 
-function toImage($text) {
-	$angle = 90;
-	return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
-}
-
 /* configure elements */
 if(isset($_REQUEST["featuretype"])){
 
@@ -236,7 +238,7 @@
         /* set element options */
         $aWFS->getelements($_REQUEST["featuretype"]);
         echo "<table border='1'>";
-        echo "<tr>";
+        echo "<tr valign = bottom>";
                 echo "<td>" . toImage('ID') . "</td>";
                 echo "<td>" . toImage('name / type') . "</td>";
                 echo "<td>" . toImage('geom') . "</td>";
@@ -251,28 +253,26 @@
                 echo "<td>" . toImage('mandatory') . "</td>";
                 echo "<td>" . toImage('edit') . "</td>";
                 echo "<td>" . toImage('html') . "</td>";
+//                echo "<td>" . toImage('auth') . "</td>";
         echo "</tr>";
 
         for($i=0; $i<count($aWFS->elements->element_id); $i++){
                 echo "<tr>";
                 echo "<td>".$aWFS->elements->element_id[$i]."<input type='hidden' name='f_id".$i."' value='".$aWFS->elements->element_id[$i]."'></td>";
-                echo "<td>".$aWFS->elements->element_name[$i]."<br>";
-				if ($aWFS->elements->element_type[$i]) {
-					echo "<div style='font-size:10'>(" . $aWFS->elements->element_type[$i].")";
-				}
-				echo "</td>";
+                echo "<td>".$aWFS->elements->element_name[$i]."<br><div style='font-size:10'>".$aWFS->elements->element_type[$i]."</div></td>";
                 echo "<td><input name='f_geom' type='radio' value='".$aWFS->elements->element_id[$i]."'></td>";
                 echo "<td><input name='f_search".$i."' type='checkbox'></td>";
-                echo "<td><input name='f_pos".$i."' type='text' size='2' value='0'></td>";
+                echo "<td><input name='f_pos".$i."' type='text' size='1' value='0'></td>";
                 echo "<td><input name='f_style_id".$i."' type='text' size='2' value='0'></td>";
                 echo "<td><input name='f_toupper".$i."' type='checkbox'></td>";
-                echo "<td><input name='f_label".$i."' type='text' size='10'></td>";
+                echo "<td><input name='f_label".$i."' type='text' size='4'></td>";
                 echo "<td><input name='f_label_id".$i."' type='text' size='2'  value='0'></td>";
                 echo "<td><input name='f_show".$i."' type='checkbox'></td>";
-                echo "<td><input name='f_respos".$i."' type='text' size='4' value='0'></td>";
+                echo "<td><input name='f_respos".$i."' type='text' size='1' value='0'></td>";
                 echo "<td><input name='f_mandatory".$i."' type='checkbox'></td>";
                 echo "<td><input name='f_edit".$i."' type='checkbox'></td>";
-                echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
+                echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' ></textarea></td>";
+//                echo "<td><input name='f_auth_varname".$cnt."' type='text' size='8' value='".$row["f_auth_varname"]."'></td>";
                 echo "</tr>";
         }
         echo "</table>";

Modified: tags/2.4.3_rc1/http/php/mod_wfs_edit.php
===================================================================
--- tags/2.4.2/http/php/mod_wfs_edit.php	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/http/php/mod_wfs_edit.php	2007-09-24 09:37:58 UTC (rev 1676)
@@ -74,29 +74,26 @@
         
         $res = db_query($sql);
 		        
-        $sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_geom = 1";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_geom"].";";
-		$res = db_query($sql);
+		if (isset($_REQUEST["f_geom"])) {
+	        $sql = "UPDATE wfs_conf_element SET ";
+	        $sql .= "f_geom = 1";
+	        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_geom"].";";
+			$res = db_query($sql);
+			
+			$sql = "UPDATE wfs_conf_element SET ";
+	        $sql .= "f_geom = 0";
+	        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id <>  ".$_REQUEST["f_geom"].";";
+			$res = db_query($sql);
+		}
+		else {
+			$sql = "UPDATE wfs_conf_element SET ";
+	        $sql .= "f_geom = 0";
+	        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"].";";
+			$res = db_query($sql);
+		}
 		
-		$sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_geom = 0";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id <>  ".$_REQUEST["f_geom"].";";
-		$res = db_query($sql);
-
-        $sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_gid = 1";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_gid"].";";
-		$res = db_query($sql);
-		
-		$sql = "UPDATE wfs_conf_element SET ";
-        $sql .= "f_gid = 0";
-        $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id <> ".$_REQUEST["f_gid"].";";
-		$res = db_query($sql);
-		
-		
-		
         for($i=0; $i<$_REQUEST["num"]; $i++){
+        	
                 $sql = "UPDATE wfs_conf_element SET ";
                 $sql .= "f_search = '";
                 if(!empty($_REQUEST["f_search".$i])){
@@ -160,7 +157,10 @@
 
 function toImage($text) {
 	$angle = 90;
-	return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+	if (extension_loaded("gd2")) {
+		return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+	}
+	return $text;
 }
 
 /* configure elements */
@@ -187,7 +187,7 @@
         /* set element options */
         $sql = "SELECT * FROM wfs_conf_element ";
         $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
-        $sql .= "WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"];
+        $sql .= "WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." ORDER BY f_id";
 
         $res = db_query($sql);
 		

Modified: tags/2.4.3_rc1/resources/db/mysql/iso/mysql_data.sql
===================================================================
--- tags/2.4.2/resources/db/mysql/iso/mysql_data.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/mysql/iso/mysql_data.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,7 +1,7 @@
 -- mysql data iso
 -- 
--- Mapbender (Version: 2.4.2)
--- 2007-07-30
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
 
 SET FOREIGN_KEY_CHECKS=0;
 

Modified: tags/2.4.3_rc1/resources/db/mysql/mysql_schema.sql
===================================================================
--- tags/2.4.2/resources/db/mysql/mysql_schema.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/mysql/mysql_schema.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,7 +1,7 @@
 
 SET FOREIGN_KEY_CHECKS=0;
 --
--- Datenbank: mb2.4.2
+-- Datenbank: mb2.4.3
 --
 
 -- --------------------------------------------------------
@@ -30,6 +30,7 @@
   e_pos tinyint(4) unsigned zerofill default NULL,
   e_public tinyint(1) unsigned zerofill default NULL,
   e_comment text,
+  e_title varchar(255),
   e_element varchar(255) NOT NULL default '',
   e_src varchar(255) default NULL,
   e_attributes longtext,
@@ -397,6 +398,7 @@
   f_form_element_html TEXT NULL,
   f_edit int4,
   f_mandatory int4,
+  f_auth_varname VARCHAR(50),
   PRIMARY KEY  (wfs_conf_element_id),
   KEY fkey_wfs_conf_id (fkey_wfs_conf_id)
 ) TYPE=InnoDB;
@@ -479,7 +481,7 @@
 CREATE TABLE wms_format (
   fkey_wms_id int(11) NOT NULL default '0',
   data_type varchar(50) NOT NULL default '',
-  data_format varchar(50) NOT NULL default '',
+  data_format varchar(100) NOT NULL default '',
   KEY wms_index (fkey_wms_id)
 ) TYPE=InnoDB;
 

Modified: tags/2.4.3_rc1/resources/db/mysql/utf8/mysql_data.sql
===================================================================
--- tags/2.4.2/resources/db/mysql/utf8/mysql_data.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/mysql/utf8/mysql_data.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,8 +1,8 @@
 --  
 -- mysql data utf8
 -- 
--- Mapbender (Version: 2.4.2)
--- 2007-07-30
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
 
 SET FOREIGN_KEY_CHECKS=0;
 

Modified: tags/2.4.3_rc1/resources/db/postgresql/iso/pgsql_data.sql
===================================================================
--- tags/2.4.2/resources/db/postgresql/iso/pgsql_data.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/postgresql/iso/pgsql_data.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,8 +1,8 @@
 --  
 -- postgresql data iso
 -- 
--- Mapbender (Version: 2.4.2)
--- 2007-07-30
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
 
 UPDATE pg_catalog.pg_class SET reltriggers = 0;
 

Modified: tags/2.4.3_rc1/resources/db/postgresql/pgsql_schema.sql
===================================================================
--- tags/2.4.2/resources/db/postgresql/pgsql_schema.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/postgresql/pgsql_schema.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,5 +1,5 @@
 --
--- PostgreSQL database dump Mapbender 2.4.2
+-- PostgreSQL database dump Mapbender 2.4.3
 --
 
 
@@ -24,6 +24,7 @@
     e_pos integer,
     e_public integer,
     e_comment text,
+    e_title character varying(255),    
     e_element character varying(255) DEFAULT ''::character varying NOT NULL,
     e_src character varying(255),
     e_attributes text,
@@ -355,6 +356,7 @@
 );
 
 
+
 --
 -- TOC entry 1262 (class 1259 OID 47913270)
 -- Dependencies: 4
@@ -419,7 +421,8 @@
     f_respos integer,
     f_form_element_html TEXT NULL,
     f_edit int4,
-    f_mandatory int4
+    f_mandatory int4,
+    f_auth_varname character varying(255)
 );
 
 
@@ -513,7 +516,7 @@
 CREATE TABLE wms_format (
     fkey_wms_id integer DEFAULT 0 NOT NULL,
     data_type character varying(50) DEFAULT ''::character varying NOT NULL,
-    data_format character varying(50) DEFAULT ''::character varying NOT NULL
+    data_format character varying(100) DEFAULT ''::character varying NOT NULL
 );
 
 
@@ -1075,4 +1078,3 @@
 ALTER TABLE mb_monitor ADD CONSTRAINT pk_mb_monitor PRIMARY KEY  (upload_id,fkey_wms_id);
 
 ALTER TABLE mb_log ADD CONSTRAINT pk_mb_log PRIMARY KEY  (id); 
-

Modified: tags/2.4.3_rc1/resources/db/update/update_guis_iso.sql
===================================================================
--- tags/2.4.2/resources/db/update/update_guis_iso.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/update/update_guis_iso.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -3,8 +3,8 @@
 --
 -- gui / gui1 / gui2 / gui_digitize
 --
--- Mapbender (Version: 2.4.2)
--- 2007-07-30
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
 
 
 Delete from gui_element where fkey_gui_id ='gui';

Modified: tags/2.4.3_rc1/resources/db/update/update_guis_utf8.sql
===================================================================
--- tags/2.4.2/resources/db/update/update_guis_utf8.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/update/update_guis_utf8.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -3,8 +3,8 @@
 --
 -- gui / gui1 / gui2 / gui_digitize
 --
--- Mapbender (Version: 2.4.2)
--- 2007-07-30
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
 
 
 Delete from gui_element where fkey_gui_id ='gui';

Modified: tags/2.4.3_rc1/resources/db/update/update_mysql_db.sql
===================================================================
--- tags/2.4.2/resources/db/update/update_mysql_db.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/update/update_mysql_db.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,4 +1,9 @@
 --
--- no changes in version 2.4.2
+-- database changes in version 2.4.3
 --
 
+--
+-- table wms_format: http://trac.osgeo.org/mapbender/ticket/53 
+--
+ALTER TABLE wms_format CHANGE data_format data_format VARCHAR(100);
+

Modified: tags/2.4.3_rc1/resources/db/update/update_postgresql_db.sql
===================================================================
--- tags/2.4.2/resources/db/update/update_postgresql_db.sql	2007-09-24 07:38:39 UTC (rev 1675)
+++ tags/2.4.3_rc1/resources/db/update/update_postgresql_db.sql	2007-09-24 09:37:58 UTC (rev 1676)
@@ -1,3 +1,9 @@
 --
--- no changes in version 2.4.2
---
\ No newline at end of file
+-- database changes in version 2.4.3
+--
+
+--
+-- table wms_format: http://trac.osgeo.org/mapbender/ticket/53 
+--
+ALTER TABLE wms_format ALTER COLUMN data_format TYPE varchar(100);
+



More information about the Mapbender_commits mailing list