
function parseCookie(myCookie) {
	var myVariables = myCookie.split(";");
	var returnvalue = new Array();
	for(var i = 0; i <= myVariables.length; i++) {
		if (myVariables[i]) {
			thisValues = myVariables[i].split("=");
			thisVar = trim(thisValues[0].toLowerCase());
			thisVal = trim(thisValues[1]);
			returnvalue[thisVar]= thisVal;
		}
	}
	return returnvalue;
}
var ccErrorNo = 0;
var ccErrors = new Array ()
ccErrors [0] = "Unknown card type";
ccErrors [1] = "No card number provided";
ccErrors [2] = "Credit card number is in invalid format";
ccErrors [3] = "Credit card number is invalid";
ccErrors [4] = "Credit card number has an inappropriate number of digits";
function checkCreditCard (cardnumber, cardname) {
  var cards = new Array();
  cards [0] = {name: "Visa",
               length: "13,16",
               prefixes: "4",
               checkdigit: true};
  cards [1] = {name: "MasterCard",
               length: "16",
               prefixes: "51,52,53,54,55",
               checkdigit: true};
  cards [2] = {name: "DinersClub",
               length: "14,16",
               prefixes: "300,301,302,303,304,305,36,38,55",
               checkdigit: true};
  cards [3] = {name: "CarteBlanche",
               length: "14",
               prefixes: "300,301,302,303,304,305,36,38",
               checkdigit: true};
  cards [4] = {name: "AmEx",
               length: "15",
               prefixes: "34,37",
               checkdigit: true};
  cards [5] = {name: "Discover",
               length: "16",
               prefixes: "6011,650",
               checkdigit: true};
  cards [6] = {name: "JCB",
               length: "15,16",
               prefixes: "3,1800,2131",
               checkdigit: true};
  cards [7] = {name: "enRoute",
               length: "15",
               prefixes: "2014,2149",
               checkdigit: true};
  cards [8] = {name: "Solo",
               length: "16,18,19",
               prefixes: "6334, 6767",
               checkdigit: true};
  cards [9] = {name: "Switch",
               length: "16,18,19",
               prefixes: "4903,4905,4911,4936,564182,633110,6333,6759",
               checkdigit: true};
  cards [10] = {name: "Maestro",
               length: "16",
               prefixes: "5020,6",
               checkdigit: true};
  cards [11] = {name: "VisaElectron",
               length: "16",
               prefixes: "417500,4917,4913",
               checkdigit: true};
  var cardType = -1;
  for (var i=0; i<cards.length; i++) {
    if (cardname.toLowerCase () == cards[i].name.toLowerCase()) {
      cardType = i;
      break;
    }
  }
  if (cardType == -1) {
     ccErrorNo = 0;
     return false;
  }
  if (cardnumber.length == 0)  {
     ccErrorNo = 1;
     return false;
  }
  cardnumber = cardnumber.replace (/\s/g, "");
  var cardNo = cardnumber
  var cardexp = /^[0-9]{13,19}$/;
  if (!cardexp.exec(cardNo))  {
     ccErrorNo = 2;
     return false;
  }
  if (cards[cardType].checkdigit) {
    var checksum = 0;                                  // running checksum total
    var mychar = "";                                   // next char to process
    var j = 1;                                         // takes value of 1 or 2
    var calc;
    for (i = cardNo.length - 1; i >= 0; i--) {
      calc = Number(cardNo.charAt(i)) * j;
      if (calc > 9) {
        checksum = checksum + 1;
        calc = calc - 10;
      }

      // Add the units element to the checksum total
      checksum = checksum + calc;

      // Switch the value of j
      if (j ==1) {j = 2} else {j = 1};
    }

    // All done - if checksum is divisible by 10, it is a valid modulus 10.
    // If not, report an error.
    if (checksum % 10 != 0)  {
     ccErrorNo = 3;
     return false;
    }
  }

  // The following are the card-specific checks we undertake.
  var LengthValid = false;
  var PrefixValid = false;
  var undefined;

  // We use these for holding the valid lengths and prefixes of a card type
  var prefix = new Array ();
  var lengths = new Array ();

  // Load an array with the valid prefixes for this card
  prefix = cards[cardType].prefixes.split(",");

  // Now see if any of them match what we have in the card number
  for (i=0; i<prefix.length; i++) {
    var exp = new RegExp ("^" + prefix[i]);
    if (exp.test (cardNo)) PrefixValid = true;
  }

  // If it isn't a valid prefix there's no point at looking at the length
  if (!PrefixValid) {
     ccErrorNo = 3;
     return false;
  }

  // See if the length is valid for this card
  lengths = cards[cardType].length.split(",");
  for (j=0; j<lengths.length; j++) {
    if (cardNo.length == lengths[j]) LengthValid = true;
  }

  // See if all is OK by seeing if the length was valid. We only check the
  // length if all else was hunky dory.
  if (!LengthValid) {
     ccErrorNo = 4;
     return false;
  };

  // The credit card is in the required format.
  return true;
}
function refreshFrames (pageId) {
	if (parent.frames.pageinfo && pageId > 0)  {
		try	{
			parent.frames.pageinfo.location.href="/admin/cms/modCms.cfm?action=pageinfo&page=" + pageId;
			parent.frames.footer.location.href="/cms/cmsAdmin/system/openEditModeElementFooter.cfm?page=" + pageId;
		}
		catch (e) {}
	}
}
function updateWMTT(e) {
	try {
		x=(document.all) ? window.event.x + document.documentElement.scrollLeft + document.getElementsByTagName("div")[1].scrollLeft: e.pageX;
		y=(document.all) ? window.event.y + document.documentElement.scrollTop + document.getElementsByTagName("div")[1].scrollTop: e.pageY;
		if (wmtt != null) {
			wmtt.style.left=(x - 150) + "px";
			wmtt.style.top=(y + 20) + "px";
		}
	}
	catch(e) { }
}
function showTT(id) {
	wmtt=document.getElementById(id);
	wmtt.style.display="block"
}
function hideTT() {
	wmtt.style.display="none";
}
function cms_showpic(file,width,height,scrollbar) {
	var scroll = "no";
	if(!cms_showpic.arguments[1]) {
		width="";
	}
	if(!cms_showpic.arguments[2]) {
		height="";
	}
	if(cms_showpic.arguments[1] || cms_showpic.arguments[2]) {
		scroll="yes";
	}
	//Scrollbars "yes" OR "no"
	if(cms_showpic.arguments[3]) {
		var scroll = scrollbar;
	}
	//Bildgrösse bekannt
	lenWidth = width.replace(/\r/g, " ");
	lenHeight = height.replace(/\r/g, " ");
	//Bildpfad speichern
	path = "http://www.moby.ch/cms/cmsAdmin/modules/popup.cfm?picfile="+escape(file);
	//Breite und Höhe wird übergeben, sofern vorhanden
	if (lenWidth != '' && lenHeight != '') {
		path = path+"&width="+width+"&height="+height;
	}
	var picwindow=window.open(path, "picwindow", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=yes,top=50,left=50");
  picwindow.focus();
}
function trim(item)	{
  item = item.replace(/\r/g, " ");
  item = item.replace(/[^ A-Za-z0-9`~!@#\$%\^&\*\(\)-_=\+\\\|\]\[\}\{'";:\?\/\.>,<]/g, "");
  item = item.replace(/'/g, "");
  item = item.replace(/ +/g, " ");
  item = item.replace(/^\s/g, "");
  item = item.replace(/\s$/g, "");
  if (item.value == ' ') {
		item.value = '';
	}
	return item
}
function isdate(datum) {
	date = trim(datum);
	if (date.length > 0) {
		if (date.search(/\d\d.\d\d.\d\d/) != -1 || date.search(/\d\d.\d\d.\d\d\d\d/) != -1 || date.search(/\d.\d.\d\d/) != -1 || date.search(/\d.\d.\d\d\d\d/) != -1 || date.search(/\d\d.\d.\d\d/) != -1 || date.search(/\d\d.\d.\d\d\d\d/) != -1 || date.search(/\d.\d\d.\d\d/) != -1 || date.search(/\d.\d\d.\d\d\d\d/) != -1) {
			aDate = date.split(".");
			iDay = 1 * aDate[0];
			iMonth = 1 * aDate[1];
			iYear = 1 * aDate[2];
			sYear = "" + iYear;
			if (sYear.length != 4 && iYear >= 51 && iYear <= 99) {
				iYear = 1900 + iYear;
			}
			else if (sYear.length != 4 && iYear >= 0 && iYear <= 50) {
				iYear = 2000 + iYear;
			}
			else if (sYear.length != 4 && iYear > 99) {
				iDay = 99;
				iMonth = 99;
			}
			else if (sYear.length == 4 && iYear < 1951) {
				iDay = 99;
				iMonth = 99;
			}
			if (iYear == "2000") {
				isLeapyear = false;
			}
			else {
				leapyear = Math.ceil(iYear / 4);
				calc = 4 * leapyear;
				if (calc == iYear) {
					isLeapyear = true;
				}
				else {
					isLeapyear = false;
				}
			}
			iDayCount = 0;
			switch(iMonth) {
				case 1:
					iDayCount = 31;
				break;
				case 2:
					if (isLeapyear == true) {
						iDayCount = 29;
					}
					else {
						iDayCount = 28;
					}
				break;
				case 3:
					iDayCount = 31;
				break;
				case 4:
					iDayCount = 30;
				break;
				case 5:
					iDayCount = 31;
				break;
				case 6:
					iDayCount = 30;
				break;
				case 7:
					iDayCount = 31;
				break;
				case 8:
					iDayCount = 31;
				break;
				case 9:
					iDayCount = 30;
				break;
				case 10:
					iDayCount = 31;
				break;
				case 11:
					iDayCount = 30;
				break;
				case 12:
					iDayCount = 31;
				break;
			}
			if (iDay >= 1 && iDay <= iDayCount) {
				return true;
			}
			else {
				return false;
			}
		}
		else {
			return false;
		}
	}
	else {
		return false;
	}
}
function ismail(mail) {
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(mail)) {
		return true;
	}
	else {
		return false;
	}
}

function cms_reload() {
	location.reload();
}
function cms_popup(Ziel,Breite,Hoehe,Status,Toolbar,Location,Menu) {
	popup=window.open(Ziel,"PopUp","status=" + Status + ",toolbar=" + Toolbar + ",location=" + Location + ",menu=" + Menu + ",width=" + Breite + ",height=" + Hoehe + ",left=" + (screen.width - Breite) / 2 +	",top=" + (screen.height - Hoehe) / 2);
	popup.focus();
}
function cm_bwcheck(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase()
	this.dom=document.getElementById?1:0
	this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera
  this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera
  this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
  this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
  this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6)
	this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6)
  this.ie = (this.ie4 || this.ie5 || this.ie6)
	this.mac=(this.agent.indexOf("mac")>-1)
	this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ns4=(!this.dom && document.layers)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
  this.usedom= this.ns6//Use dom creation
  this.reuse = this.ie||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
	return this
}
var bw=new cm_bwcheck();
function bildwechsel(name, image) {
	document.images[name].src = image;
}
<!--
/**
 * FlashObject v1.2.3: Flash detection and embed - http://blog.deconcept.com/flashobject/
 *
 * FlashObject is (c) 2005 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "undefined") com.deconcept = new Object();
if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();
if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();
com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){
   this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
   this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);
   this.params = new Object();
   this.variables = new Object();
   this.attributes = new Array();

   if(swf) this.setAttribute('swf', swf);
   if(id) this.setAttribute('id', id);
   if(w) this.setAttribute('width', w);
   if(h) this.setAttribute('height', h);
   if(ver) this.setAttribute('version', new com.deconcept.PlayerVersion(ver.toString().split(".")));
   if(c) this.addParam('bgcolor', c);
   //var q = quality ? quality : 'high';
   this.addParam('quality', quality);
   this.setAttribute('redirectUrl', '');
   if(redirectUrl) this.setAttribute('redirectUrl', redirectUrl);
   if(useExpressInstall) {
   // check to see if we need to do an express install
   var expressInstallReqVer = new com.deconcept.PlayerVersion([6,0,65]);
   var installedVer = com.deconcept.FlashObjectUtil.getPlayerVersion();
      if (installedVer.versionIsValid(expressInstallReqVer) && !installedVer.versionIsValid(this.getAttribute('version'))) {
         this.setAttribute('doExpressInstall', true);
      }
   } else {
      this.setAttribute('doExpressInstall', false);
   }
}
com.deconcept.FlashObject.prototype.setAttribute = function(name, value){
	this.attributes[name] = value;
}
com.deconcept.FlashObject.prototype.getAttribute = function(name){
	return this.attributes[name];
}
com.deconcept.FlashObject.prototype.getAttributes = function(){
	return this.attributes;
}
com.deconcept.FlashObject.prototype.addParam = function(name, value){
	this.params[name] = value;
}
com.deconcept.FlashObject.prototype.getParams = function(){
	return this.params;
}
com.deconcept.FlashObject.prototype.getParam = function(name){
	return this.params[name];
}
com.deconcept.FlashObject.prototype.addVariable = function(name, value){
	this.variables[name] = value;
}
com.deconcept.FlashObject.prototype.getVariable = function(name){
	return this.variables[name];
}
com.deconcept.FlashObject.prototype.getVariables = function(){
	return this.variables;
}
com.deconcept.FlashObject.prototype.getParamTags = function(){
   var paramTags = ""; var key; var params = this.getParams();
   for(key in params) {
        paramTags += '<param name="' + key + '" value="' + params[key] + '" />';
    }
   return paramTags;
}
com.deconcept.FlashObject.prototype.getVariablePairs = function(){
	var variablePairs = new Array();
	var key;
	var variables = this.getVariables();
	for(key in variables){
		variablePairs.push(key +"="+ variables[key]);
	}
	return variablePairs;
}
com.deconcept.FlashObject.prototype.getHTML = function() {
    var flashHTML = "";
    if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
        flashHTML += '<embed type="application/x-shockwave-flash" wmode="transparent" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"';
		var params = this.getParams();
        for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; }
		pairs = this.getVariablePairs().join("&");
        if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; }
        flashHTML += '></embed>';
    } else { // PC IE
        if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); }
        flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">';
        flashHTML += '<param name="wmode" value="transparent" /><param name="movie" value="' + this.getAttribute('swf') + '" />';
		var tags = this.getParamTags();
        if(tags.length > 0){ flashHTML += tags; }
		var pairs = this.getVariablePairs().join("&");
        if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; }
				//flashHTML += '<param name="wmode" value="transparent" />';
        flashHTML += '</object>';
    }
		//alert(flashHTML);
    return flashHTML;
}
com.deconcept.FlashObject.prototype.write = function(elementId){
	if(this.skipDetect || this.getAttribute('doExpressInstall') || com.deconcept.FlashObjectUtil.getPlayerVersion().versionIsValid(this.getAttribute('version'))){
		if(document.getElementById){
		   if (this.getAttribute('doExpressInstall')) {
		      this.addVariable("MMredirectURL", escape(window.location));
		      document.title = document.title.slice(0, 47) + " - Flash Player Installation";
		      this.addVariable("MMdoctitle", document.title);
		   }
			document.getElementById(elementId).innerHTML = this.getHTML();
		}
	}else{
		if(this.getAttribute('redirectUrl') != "") {
			document.location.replace(this.getAttribute('redirectUrl'));
		}
	}
}
/* ---- detection functions ---- */
com.deconcept.FlashObjectUtil.getPlayerVersion = function(){
   var PlayerVersion = new com.deconcept.PlayerVersion(0,0,0);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new com.deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (window.ActiveXObject){
	   try {
   	   var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
   		PlayerVersion = new com.deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
	   } catch (e) {}
	}
	return PlayerVersion;
}
com.deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) || 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
com.deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
com.deconcept.util.getRequestParameter = function(param){
	var q = document.location.search || document.location.href.hash;
	if(q){
		var startIndex = q.indexOf(param +"=");
		var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
		if (q.length > 1 && startIndex > -1) {
			return q.substring(q.indexOf("=", startIndex)+1, endIndex);
		}
	}
	return "";
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use / backwards compatibility */
var getQueryParamValue = com.deconcept.util.getRequestParameter;
var FlashObject = com.deconcept.FlashObject;
//-->
/* --------------------------------------------------------------------------------------------------------------*	API:			JSMX (JavaScript MX) - This is a ColdFusion api for AJAX, using no XML but instead returning raw JavaScript.*	AUTHOR: 		Todd Kingham*	EMAIL: 			todd@lalabird.com*	CREATED:		8.21.2005*	VERSION:		2.0.1*	DESCRIPTION:	This API uses XMLHttpRequest to post/get data from a ColdFusion interface.*					The CFC's/CFM's will return a string representation of a JS variable: response_param.*					The "onreadystatechange event handler" will eval() the string into a JS variable*					and pass the value back to the "return function". To Download a full copy of the sample					application visit: http://www.lalabird.com/JSMX/?fa=JSMX.downloads***	LICENSE:		THIS IS A OPEN SOURCE API. YOU ARE FREE TO USE THIS API IN ANY APPLICATION,*               	TO COPY IT OR MODIFY THE FUNCTIONS FOR YOUR OWN NEEDS, AS LONG THIS HEADER INFORMATION*              	 	REMAINS IN TACT AND YOU DON'T CHARGE ANY MONEY FOR IT. USE THIS API AT YOUR OWN*               	RISK. NO WARRANTY IS EXPRESSED OR IMPLIED, AND NO LIABILITY ASSUMED FOR THE RESULT OF*               	USING THIS API.**               	THIS API IS LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION-SHAREALIKE LICENSE.*               	FOR THE FULL LICENSE TEXT PLEASE VISIT: http://creativecommons.org/licenses/by-sa/2.5/*-----------------------------------------------------------------------------------------------------------------*//* UNCOMMENT THE FOLLOWING LINE IF YOU WILL BE RETURNING QUERY OBJECTS. (note: you may need to point the SRC to an alerternate location.*///document.writeln('<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="/CFIDE/scripts/wddx.js"></SCRIPT>');// perform the XMLHttpRequest();function http(mthd,url,rm,qry) {    //reference our arguments	return_method = rm;	if(!qry) qry = '';	qryStr = toQueryString(qry);	try{//this should work for most modern browsers excluding: IE Mac		req = ( window.XMLHttpRequest ) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ;		req.onreadystatechange = processReqChange;		req.open(mthd, noCache(url), true);			if(mthd.toLowerCase() == 'post')			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		req.send(qryStr);	}catch(e){//a browser not equiped to handle XMLHttp		//alert("There was a problem retrieving the data:");	}}// handle onreadystatechange event of req objectfunction processReqChange(){ 	switch(req.readyState){		case 1: break;		case 2: break;		case 3: break;		case 4:			if (req.status == 200) {// only if "OK"				return_method(response2Obj(req.responseText));				} else				alert("There was a problem retrieving the data:\n" + req.statusText);	        break;	}}// HELPER FUNCTIONSfunction response2Obj(str){	eval("var "+str);	return eval(firstWord(str));}function firstWord(str){	return str.substring(str.search(/\S/g)).split(' ')[0];}function toQueryString(obj){	//determine the variable type	if(typeof(obj) == 'string')		return obj;	if(typeof(obj) == 'object'){		if(typeof(obj.elements) == 'undefined')//It's an Object()!			return object2queryString(obj);		else //It's a form!			return form2queryString(obj);	}}function object2queryString(obj){	var ar = new Array();	for(x in obj) ar[ar.length] = x+'='+obj[x];	return ar.join('&');}function form2queryString(form){	var obj = new Object();	var ar = new Array();	for(var i=0;i<form.elements.length;i++){		try {			elm = form.elements[i];			nm = elm.name;			if(nm != ''){				switch(elm.type.split('-')[0]){					case "select":						for(var s=0;s<elm.options.length;s++){							if(elm.options[s].selected){								if(typeof(obj[nm]) == 'undefined') obj[nm] = new Array();								obj[nm][obj[nm].length] = escape(elm.options[s].value);							}						}						break;					case "radio":						if(elm.checked){							if(typeof(obj[nm]) == 'undefined') obj[nm] = new Array();							obj[nm][obj[nm].length] = escape(elm.value);						}						break;					case "checkbox":						if(elm.checked){							if(typeof(obj[nm]) == 'undefined') obj[nm] = new Array();							obj[nm][obj[nm].length] = escape(elm.value);						}						break;					default:						if(typeof(obj[nm]) == 'undefined') obj[nm] = new Array();						obj[nm][obj[nm].length] = escape(elm.value);						break;				}			}		}catch(e){}	}	for(x in obj) ar[ar.length] = x+'='+obj[x].join(',');return ar.join('&');}//IE likes to cache so we will fix it's wagon!function noCache(url){	var qs = new Array();	var arr = url.split('?');	var scr = arr[0];	if(arr[1]) qs = arr[1].split('&');	qs[qs.length]='nocache='+new Date().getTime();return scr+'?'+qs.join('&');}
// init 1=ganzes Feld loeschen, init 0=Feld nicht loeschen, Einträge hinzufuegen
function fillSelect(myObj, ziel, init, color){
	if (init == 1) {
		deleteSelectOptions(ziel);
	}
	for (i=0; i < myObj.length; i++)	{
		//Existiert "active"
		if (!myObj[i].active) {
			myObj[i].active = 0;
		}
		//Existiert "color"
		if (!color) {
			color = "#000000";
		}
		addSelectOption(ziel, myObj[i].text, myObj[i].id, myObj[i].active, color);
	}
}
function deleteSelectOptions(feld) {
	var laenge = feld.length;
	for (i=0; i < laenge; i++) {
		feld.options[feld.length-1] = null;
	}
}
function addSelectOption(selectionElement, text, value, active, color) {
	var option = document.createElement("option");
	var Text = document.createTextNode(text);
	option.appendChild(Text);
	option.value = value;
	if (active == 0) {
		option.style.color = color;
	}
	selectionElement.appendChild(option);
}
function setSelectedValue(selectField, wert) {
	for(i=0; i < selectField.length; i++) {
  	if(selectField.options[i].value == wert) {
     selectField.options[i].selected = true;
		}
	}
}
function debugOutput(obj) {
	for (i=0; i < obj.qgettype.length; i++) {
		inhalt = inhalt + obj.qgettype[i].id + "." + obj.qgettype[i].text + " ";
	}
	inhalt = inhalt + "AAAAA   ";
	for (i=0; i < obj.qgetclass.length; i++) {
		inhalt = inhalt + obj.qgetclass[i].id + "." + obj.qgetclass[i].text + " ";
	}
	inhalt = inhalt + "BBBBB   ";
	for (i=0; i < obj.qgetproducttype.length; i++) {
		inhalt = inhalt + obj.qgetproducttype[i].id + "." + obj.qgetproducttype[i].text + " ";
	}
 alert(inhalt);
 inhalt = "";
}

