
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - cssQuery.js - */
// http://www.muchomasquecoches.com/portal_javascripts/cssQuery.js?original=1
var cssQuery=function(){var version="2.0.2";var $COMMA=/\s*,\s*/;var cssQuery=function($selector,$$from){try{var $match=[];var $useCache=arguments.callee.caching&&!$$from;var $base=($$from)?($$from.constructor==Array)?$$from:[$$from]:[document];var $$selectors=parseSelector($selector).split($COMMA),i;for(i=0;i<$$selectors.length;i++){$selector=_toStream($$selectors[i]);if(isMSIE&&$selector.slice(0,3).join("")==" *#"){$selector=$selector.slice(2);$$from=_msie_selectById([],$base,$selector[1])} else $$from=$base;var j=0,$token,$filter,$arguments,$cacheSelector="";while(j<$selector.length){$token=$selector[j++];$filter=$selector[j++];$cacheSelector+=$token+$filter;$arguments="";if($selector[j]=="("){while($selector[j++]!=")"&&j<$selector.length){$arguments+=$selector[j]}
$arguments=$arguments.slice(0,-1);$cacheSelector+="("+$arguments+")"}
$$from=($useCache&&cache[$cacheSelector])?cache[$cacheSelector]:select($$from,$token,$filter,$arguments);if($useCache) cache[$cacheSelector]=$$from}
$match=$match.concat($$from)}
delete cssQuery.error;return $match} catch($error){cssQuery.error=$error;return []}};cssQuery.toString=function(){return "function cssQuery() {\n  [version "+version+"]\n}"};var cache={};cssQuery.caching=false;cssQuery.clearCache=function($selector){if($selector){$selector=_toStream($selector).join("");delete cache[$selector]} else cache={}};var modules={};var loaded=false;cssQuery.addModule=function($name,$script){if(loaded) eval("$script="+String($script));modules[$name]=new $script()};cssQuery.valueOf=function($code){return $code?eval($code):this};var selectors={};var pseudoClasses={};var AttributeSelector={match:/\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/};var attributeSelectors=[];selectors[" "]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=getElementsByTagName($from[i],$tagName,$namespace);for(j=0;($element=$subset[j]);j++){if(thisElement($element)&&compareNamespace($element,$namespace))
$results.push($element)}}};selectors["#"]=function($results,$from,$id){var $element,j;for(j=0;($element=$from[j]);j++) if($element.id==$id) $results.push($element)};selectors["."]=function($results,$from,$className){$className=new RegExp("(^|\\s)"+$className+"(\\s|$)");var $element,i;for(i=0;($element=$from[i]);i++)
if($className.test($element.className)) $results.push($element)};selectors[":"]=function($results,$from,$pseudoClass,$arguments){var $test=pseudoClasses[$pseudoClass],$element,i;if($test) for(i=0;($element=$from[i]);i++)
if($test($element,$arguments)) $results.push($element)};pseudoClasses["link"]=function($element){var $document=getDocument($element);if($document.links) for(var i=0;i<$document.links.length;i++){if($document.links[i]==$element) return true}};pseudoClasses["visited"]=function($element){};var thisElement=function($element){return($element&&$element.nodeType==1&&$element.tagName!="!")?$element:null};var previousElementSibling=function($element){while($element&&($element=$element.previousSibling)&&!thisElement($element)) continue;return $element};var nextElementSibling=function($element){while($element&&($element=$element.nextSibling)&&!thisElement($element)) continue;return $element};var firstElementChild=function($element){return thisElement($element.firstChild)||nextElementSibling($element.firstChild)};var lastElementChild=function($element){return thisElement($element.lastChild)||previousElementSibling($element.lastChild)};var childElements=function($element){var $childElements=[];$element=firstElementChild($element);while($element){$childElements.push($element);$element=nextElementSibling($element)}
return $childElements};var isMSIE=true;var isXML=function($element){var $document=getDocument($element);return(typeof $document.mimeType=="unknown")?/\.xml$/i.test($document.URL):Boolean($document.mimeType=="XML Document")};var getDocument=function($element){return $element.ownerDocument||$element.document};var getElementsByTagName=function($element,$tagName){return($tagName=="*"&&$element.all)?$element.all:$element.getElementsByTagName($tagName)};var compareTagName=function($element,$tagName,$namespace){if($tagName=="*") return thisElement($element);if(!compareNamespace($element,$namespace)) return false;if(!isXML($element)) $tagName=$tagName.toUpperCase();return $element.tagName==$tagName};var compareNamespace=function($element,$namespace){return!$namespace||($namespace=="*")||($element.scopeName==$namespace)};var getTextContent=function($element){return $element.innerText};
function _msie_selectById($results,$from,id){var $match,i,j;for(i=0;i<$from.length;i++){if($match=$from[i].all.item(id)){if($match.id==id) $results.push($match);else if($match.length!=null){for(j=0;j<$match.length;j++){if($match[j].id==id) $results.push($match[j])}}}}
return $results};if(![].push) Array.prototype.push=function(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i]}
return this.length};var $NAMESPACE=/\|/;
function select($$from,$token,$filter,$arguments){if($NAMESPACE.test($filter)){$filter=$filter.split($NAMESPACE);$arguments=$filter[0];$filter=$filter[1]}
var $results=[];if(selectors[$token]){selectors[$token]($results,$$from,$filter,$arguments)}
return $results};var $STANDARD_SELECT=/^[^\s>+~]/;var $$STREAM=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;
function _toStream($selector){if($STANDARD_SELECT.test($selector)) $selector=" "+$selector;return $selector.match($$STREAM)||[]};var $WHITESPACE=/\s*([\s>+~(),]|^|$)\s*/g;var $IMPLIED_ALL=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var parseSelector=function($selector){return $selector.replace($WHITESPACE,"$1").replace($IMPLIED_ALL,"$1*$2")};var Quote={toString: function(){return "'"},match:/^('[^']*')|("[^"]*")$/,test: function($string){return this.match.test($string)},add: function($string){return this.test($string)?$string:this+$string+this},remove: function($string){return this.test($string)?$string.slice(1,-1):$string}};var getText=function($text){return Quote.remove($text)};var $ESCAPE=/([\/()[\]?{}|*+-])/g;
function regEscape($string){return $string.replace($ESCAPE,"\\$1")};cssQuery.addModule("css-standard", function(){isMSIE=eval("false;/*@cc_on@if(@\x5fwin32)isMSIE=true@end@*/");if(!isMSIE){getElementsByTagName=function($element,$tagName,$namespace){return $namespace?$element.getElementsByTagNameNS("*",$tagName):$element.getElementsByTagName($tagName)};compareNamespace=function($element,$namespace){return!$namespace||($namespace=="*")||($element.prefix==$namespace)};isXML=document.contentType? function($element){return/xml/i.test(getDocument($element).contentType)}: function($element){return getDocument($element).documentElement.tagName!="HTML"};getTextContent=function($element){return $element.textContent||$element.innerText||_getTextContent($element)};
function _getTextContent($element){var $textContent="",$node,i;for(i=0;($node=$element.childNodes[i]);i++){switch($node.nodeType){case 11:case 1:$textContent+=_getTextContent($node);break;case 3:$textContent+=$node.nodeValue;break}}
return $textContent}}});cssQuery.addModule("css-level2", function(){selectors[">"]=function($results,$from,$tagName,$namespace){var $element,i,j;for(i=0;i<$from.length;i++){var $subset=childElements($from[i]);for(j=0;($element=$subset[j]);j++)
if(compareTagName($element,$tagName,$namespace))
$results.push($element)}};selectors["+"]=function($results,$from,$tagName,$namespace){for(var i=0;i<$from.length;i++){var $element=nextElementSibling($from[i]);if($element&&compareTagName($element,$tagName,$namespace))
$results.push($element)}};selectors["@"]=function($results,$from,$attributeSelectorID){var $test=attributeSelectors[$attributeSelectorID].test;var $element,i;for(i=0;($element=$from[i]);i++)
if($test($element)) $results.push($element)};pseudoClasses["first-child"]=function($element){return!previousElementSibling($element)};pseudoClasses["lang"]=function($element,$code){$code=new RegExp("^"+$code,"i");while($element&&!$element.getAttribute("lang")) $element=$element.parentNode;return $element&&$code.test($element.getAttribute("lang"))};AttributeSelector.NS_IE=/\\:/g;AttributeSelector.PREFIX="@";AttributeSelector.tests={};AttributeSelector.replace=function($match,$attribute,$namespace,$compare,$value){var $key=this.PREFIX+$match;if(!attributeSelectors[$key]){$attribute=this.create($attribute,$compare||"",$value||"");attributeSelectors[$key]=$attribute;attributeSelectors.push($attribute)}
return attributeSelectors[$key].id};AttributeSelector.parse=function($selector){$selector=$selector.replace(this.NS_IE,"|");var $match;while($match=$selector.match(this.match)){var $replace=this.replace($match[0],$match[1],$match[2],$match[3],$match[4]);$selector=$selector.replace(this.match,$replace)}
return $selector};AttributeSelector.create=function($propertyName,$test,$value){var $attributeSelector={};$attributeSelector.id=this.PREFIX+attributeSelectors.length;$attributeSelector.name=$propertyName;$test=this.tests[$test];$test=$test?$test(this.getAttribute($propertyName),getText($value)):false;$attributeSelector.test=new Function("e","return "+$test);return $attributeSelector};AttributeSelector.getAttribute=function($name){switch($name.toLowerCase()){case "id":return "e.id";case "class":return "e.className";case "for":return "e.htmlFor";case "href":if(isMSIE){return "String((e.outerHTML.match(/href=\\x22?([^\\s\\x22]*)\\x22?/)||[])[1]||'')"}}
return "e.getAttribute('"+$name.replace($NAMESPACE,":")+"')"};AttributeSelector.tests[""]=function($attribute){return $attribute};AttributeSelector.tests["="]=function($attribute,$value){return $attribute+"=="+Quote.add($value)};AttributeSelector.tests["~="]=function($attribute,$value){return "/(^| )"+regEscape($value)+"( |$)/.test("+$attribute+")"};AttributeSelector.tests["|="]=function($attribute,$value){return "/^"+regEscape($value)+"(-|$)/.test("+$attribute+")"};var _parseSelector=parseSelector;parseSelector=function($selector){return _parseSelector(AttributeSelector.parse($selector))}});cssQuery.addModule("css-level3", function(){selectors["~"]=function($results,$from,$tagName,$namespace){var $element,i;for(i=0;($element=$from[i]);i++){while($element=nextElementSibling($element)){if(compareTagName($element,$tagName,$namespace))
$results.push($element)}}};pseudoClasses["contains"]=function($element,$text){$text=new RegExp(regEscape(getText($text)));return $text.test(getTextContent($element))};pseudoClasses["root"]=function($element){return $element==getDocument($element).documentElement};pseudoClasses["empty"]=function($element){var $node,i;for(i=0;($node=$element.childNodes[i]);i++){if(thisElement($node)||$node.nodeType==3) return false}
return true};pseudoClasses["last-child"]=function($element){return!nextElementSibling($element)};pseudoClasses["only-child"]=function($element){$element=$element.parentNode;return firstElementChild($element)==lastElementChild($element)};pseudoClasses["not"]=function($element,$selector){var $negated=cssQuery($selector,getDocument($element));for(var i=0;i<$negated.length;i++){if($negated[i]==$element) return false}
return true};pseudoClasses["nth-child"]=function($element,$arguments){return nthChild($element,$arguments,previousElementSibling)};pseudoClasses["nth-last-child"]=function($element,$arguments){return nthChild($element,$arguments,nextElementSibling)};pseudoClasses["target"]=function($element){return $element.id==location.hash.slice(1)};pseudoClasses["checked"]=function($element){return $element.checked};pseudoClasses["enabled"]=function($element){return $element.disabled===false};pseudoClasses["disabled"]=function($element){return $element.disabled};pseudoClasses["indeterminate"]=function($element){return $element.indeterminate};AttributeSelector.tests["^="]=function($attribute,$value){return "/^"+regEscape($value)+"/.test("+$attribute+")"};AttributeSelector.tests["$="]=function($attribute,$value){return "/"+regEscape($value)+"$/.test("+$attribute+")"};AttributeSelector.tests["*="]=function($attribute,$value){return "/"+regEscape($value)+"/.test("+$attribute+")"};
function nthChild($element,$arguments,$traverse){switch($arguments){case "n":return true;case "even":$arguments="2n";break;case "odd":$arguments="2n+1"}
var $$children=childElements($element.parentNode);
function _checkIndex($index){var $index=($traverse==nextElementSibling)?$$children.length-$index:$index-1;return $$children[$index]==$element};if(!isNaN($arguments)) return _checkIndex($arguments);$arguments=$arguments.split("n");var $multiplier=parseInt($arguments[0]);var $step=parseInt($arguments[1]);if((isNaN($multiplier)||$multiplier==1)&&$step==0) return true;if($multiplier==0&&!isNaN($step)) return _checkIndex($step);if(isNaN($step)) $step=0;var $count=1;while($element=$traverse($element)) $count++;if(isNaN($multiplier)||$multiplier==1)
return($traverse==nextElementSibling)?($count<=$step):($step>=$count);return($count%$multiplier)==$step}});loaded=true;return cssQuery}();

/* - dynamicoptionlist.js - */
// http://www.muchomasquecoches.com/portal_javascripts/dynamicoptionlist.js?original=1
var dynamicOptionListCount=0;var dynamicOptionListObjects=new Array();
function initDynamicOptionLists(){for(var i=0;i<dynamicOptionListObjects.length;i++){var dol=dynamicOptionListObjects[i];if(dol.formName!=null){dol.form=document.forms[dol.formName]}
else if(dol.formIndex!=null){dol.form=document.forms[dol.formIndex]}
else{var name=dol.fieldNames[0][0];for(var f=0;f<document.forms.length;f++){if(typeof(document.forms[f][name])!="undefined"){dol.form=document.forms[f];break}}
if(dol.form==null){alert("ERROR: Couldn't find form element "+name+" in any form on the page! Init aborted");return}}
for(var j=0;j<dol.fieldNames.length;j++){for(var k=0;k<dol.fieldNames[j].length-1;k++){var selObj=dol.form[dol.fieldNames[j][k]];if(typeof(selObj)=="undefined"){alert("Select box named "+dol.fieldNames[j][k]+" could not be found in the form. Init aborted");return}
if(k==0){if(selObj.options!=null){for(l=0;l<selObj.options.length;l++){var sopt=selObj.options[l];var m=dol.findMatchingOptionInArray(dol.options,sopt.text,sopt.value,false);if(m!=null){var reselectForNN6=sopt.selected;var m2=new Option(sopt.text,sopt.value,sopt.defaultSelected,sopt.selected);m2.selected=sopt.selected;m2.defaultSelected=sopt.defaultSelected;m2.DOLOption=m;selObj.options[l]=m2;selObj.options[l].selected=reselectForNN6}}}}
if(selObj.onchange==null){selObj.onchange=new Function("dynamicOptionListObjects["+dol.index+"].change(this)")}}}}
resetDynamicOptionLists()}
function resetDynamicOptionLists(theform){for(var i=0;i<dynamicOptionListObjects.length;i++){var dol=dynamicOptionListObjects[i];if(typeof(theform)=="undefined"||theform==null||theform==dol.form){for(var j=0;j<dol.fieldNames.length;j++){dol.change(dol.form[dol.fieldNames[j][0]],true)}}}}
function DOLOption(text,value,defaultSelected,selected){this.text=text;this.value=value;this.defaultSelected=defaultSelected;this.selected=selected;this.options=new Array();return this}
function DynamicOptionList(){this.form=null;this.options=new Array();this.longestString=new Array();this.numberOfOptions=new Array();this.currentNode=null;this.currentField=null;this.currentNodeDepth=0;this.fieldNames=new Array();this.formIndex=null;this.formName=null;this.fieldListIndexes=new Object();this.fieldIndexes=new Object();this.selectFirstOption=true;this.numberOfOptions=new Array();this.longestString=new Array();this.values=new Object();this.forValue=DOL_forValue;this.forText=DOL_forText;this.forField=DOL_forField;this.forX=DOL_forX;this.addOptions=DOL_addOptions;this.addOptionsTextValue=DOL_addOptionsTextValue;this.setDefaultOptions=DOL_setDefaultOptions;this.setValues=DOL_setValues;this.setValue=DOL_setValues;this.setFormIndex=DOL_setFormIndex;this.setFormName=DOL_setFormName;this.printOptions=DOL_printOptions;this.addDependentFields=DOL_addDependentFields;this.change=DOL_change;this.child=DOL_child;this.selectChildOptions=DOL_selectChildOptions;this.populateChild=DOL_populateChild;this.change=DOL_change;this.addNewOptionToList=DOL_addNewOptionToList;this.findMatchingOptionInArray=DOL_findMatchingOptionInArray;if(arguments.length>0){for(var i=0;i<arguments.length;i++){this.fieldListIndexes[arguments[i].toString()]=this.fieldNames.length;this.fieldIndexes[arguments[i].toString()]=i}
this.fieldNames[this.fieldNames.length]=arguments}
this.index=window.dynamicOptionListCount++;window["dynamicOptionListObjects"][this.index]=this}
function DOL_findMatchingOptionInArray(a,text,value,exactMatchRequired){if(a==null||typeof(a)=="undefined"){return null}
var value_match=null;var text_match=null;for(var i=0;i<a.length;i++){var opt=a[i];if(opt.value==value&&opt.text==text){return opt}
if(!exactMatchRequired){if(value_match==null&&value!=null&&opt.value==value){value_match=opt}
if(text_match==null&&text!=null&&opt.text==text){text_match=opt}}}
return(value_match!=null)?value_match:text_match}
function DOL_forX(s,type){if(this.currentNode==null){this.currentNodeDepth=0}
var useNode=(this.currentNode==null)?this:this.currentNode;var o=this.findMatchingOptionInArray(useNode["options"],(type=="text")?s:null,(type=="value")?s:null,false);if(o==null){o=new DOLOption(null,null,false,false);o[type]=s;useNode.options[useNode.options.length]=o}
this.currentNode=o;this.currentNodeDepth++;return this}
function DOL_forValue(s){return this.forX(s,"value")}
function DOL_forText(s){return this.forX(s,"text")}
function DOL_forField(f){this.currentField=f;return this}
function DOL_addNewOptionToList(a,text,value,defaultSelected){var o=new DOLOption(text,value,defaultSelected,false);if(a==null){a=new Array()}
for(var i=0;i<a.length;i++){if(a[i].text==o.text&&a[i].value==o.value){if(o.selected){a[i].selected=true}
if(o.defaultSelected){a[i].defaultSelected=true}
return a}}
a[a.length]=o}
function DOL_addOptions(){if(this.currentNode==null){this.currentNode=this}
if(this.currentNode["options"]==null){this.currentNode["options"]=new Array()}
for(var i=0;i<arguments.length;i++){var text=arguments[i];this.addNewOptionToList(this.currentNode.options,text,text,false);if(typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined"){this.numberOfOptions[this.currentNodeDepth]=0}
if(this.currentNode.options.length>this.numberOfOptions[this.currentNodeDepth]){this.numberOfOptions[this.currentNodeDepth]=this.currentNode.options.length}
if(typeof(this.longestString[this.currentNodeDepth])=="undefined"||(text.length>this.longestString[this.currentNodeDepth].length)){this.longestString[this.currentNodeDepth]=text}}
this.currentNode=null;this.currentNodeDepth=0}
function DOL_addOptionsTextValue(){if(this.currentNode==null){this.currentNode=this}
if(this.currentNode["options"]==null){this.currentNode["options"]=new Array()}
for(var i=0;i<arguments.length;i++){var text=arguments[i++];var value=arguments[i];this.addNewOptionToList(this.currentNode.options,text,value,false);if(typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined"){this.numberOfOptions[this.currentNodeDepth]=0}
if(this.currentNode.options.length>this.numberOfOptions[this.currentNodeDepth]){this.numberOfOptions[this.currentNodeDepth]=this.currentNode.options.length}
if(typeof(this.longestString[this.currentNodeDepth])=="undefined"||(text.length>this.longestString[this.currentNodeDepth].length)){this.longestString[this.currentNodeDepth]=text}}
this.currentNode=null;this.currentNodeDepth=0}
function DOL_child(obj){var listIndex=this.fieldListIndexes[obj.name];var index=this.fieldIndexes[obj.name];if(index<(this.fieldNames[listIndex].length-1)){return this.form[this.fieldNames[listIndex][index+1]]}
return null}
function DOL_setDefaultOptions(){if(this.currentNode==null){this.currentNode=this}
for(var i=0;i<arguments.length;i++){var o=this.findMatchingOptionInArray(this.currentNode.options,null,arguments[i],false);if(o!=null){o.defaultSelected=true}}
this.currentNode=null}
function DOL_setValues(){if(this.currentField==null){alert("Can't call setValues() without using forField() first!");return}
if(typeof(this.values[this.currentField])=="undefined"){this.values[this.currentField]=new Object()}
for(var i=0;i<arguments.length;i++){this.values[this.currentField][arguments[i]]=true}
this.currentField=null}
function DOL_setFormIndex(i){this.formIndex=i}
function DOL_setFormName(n){this.formName=n}
function DOL_printOptions(name){if((navigator.appName=='Netscape')&&(parseInt(navigator.appVersion)<=4)){var index=this.fieldIndexes[name];var ret="";if(typeof(this.numberOfOptions[index])!="undefined"){for(var i=0;i<this.numberOfOptions[index];i++){ret+="<OPTION>"}}
ret+="<OPTION>";if(typeof(this.longestString[index])!="undefined"){for(var i=0;i<this.longestString[index].length;i++){ret+="_"}}
document.writeln(ret)}}
function DOL_addDependentFields(){for(var i=0;i<arguments.length;i++){this.fieldListIndexes[arguments[i].toString()]=this.fieldNames.length;this.fieldIndexes[arguments[i].toString()]=i}
this.fieldNames[this.fieldNames.length]=arguments}
function DOL_change(obj,usePreselected){if(usePreselected==null||typeof(usePreselected)=="undefined"){usePreselected=false}
var changedListIndex=this.fieldListIndexes[obj.name];var changedIndex=this.fieldIndexes[obj.name];var child=this.child(obj);if(child==null){return}
if(obj.type=="select-one"){if(child.options!=null){child.options.length=0}
if(obj.options!=null&&obj.options.length>0&&obj.selectedIndex>=0){var o=obj.options[obj.selectedIndex];this.populateChild(o.DOLOption,child,usePreselected);this.selectChildOptions(child,usePreselected)}}
else if(obj.type=="select-multiple"){var currentlySelectedOptions=new Array();if(!usePreselected){for(var i=0;i<child.options.length;i++){var co=child.options[i];if(co.selected){this.addNewOptionToList(currentlySelectedOptions,co.text,co.value,co.defaultSelected)}}}
child.options.length=0;if(obj.options!=null){var obj_o=obj.options;for(var i=0;i<obj_o.length;i++){if(obj_o[i].selected){this.populateChild(obj_o[i].DOLOption,child,usePreselected)}}
var atLeastOneSelected=false;if(!usePreselected){for(var i=0;i<child.options.length;i++){var m=this.findMatchingOptionInArray(currentlySelectedOptions,child.options[i].text,child.options[i].value,true);if(m!=null){child.options[i].selected=true;atLeastOneSelected=true}}}
if(!atLeastOneSelected){this.selectChildOptions(child,usePreselected)}}}
this.change(child,usePreselected)}
function DOL_populateChild(dolOption,childSelectObj,usePreselected){if(dolOption!=null&&dolOption.options!=null){for(var j=0;j<dolOption.options.length;j++){var srcOpt=dolOption.options[j];if(childSelectObj.options==null){childSelectObj.options=new Array()}
var duplicate=false;var preSelectedExists=false;for(var k=0;k<childSelectObj.options.length;k++){var csi=childSelectObj.options[k];if(csi.text==srcOpt.text&&csi.value==srcOpt.value){duplicate=true;break}}
if(!duplicate){var newopt=new Option(srcOpt.text,srcOpt.value,false,false);newopt.selected=false;newopt.defaultSelected=false;newopt.DOLOption=srcOpt;childSelectObj.options[childSelectObj.options.length]=newopt}}}}
function DOL_selectChildOptions(obj,usePreselected){var values=this.values[obj.name];var preselectedExists=false;if(usePreselected&&values!=null&&typeof(values)!="undefined"){for(var i=0;i<obj.options.length;i++){var v=obj.options[i].value;if(v!=null&&values[v]!=null&&typeof(values[v])!="undefined"){preselectedExists=true;break}}}
var atLeastOneSelected=false;for(var i=0;i<obj.options.length;i++){var o=obj.options[i];if(preselectedExists&&o.value!=null&&values[o.value]!=null&&typeof(values[o.value])!="undefined"){o.selected=true;atLeastOneSelected=true}
else if(!preselectedExists&&o.DOLOption!=null&&o.DOLOption.defaultSelected){o.selected=true;atLeastOneSelected=true}
else{o.selected=false}}
if(this.selectFirstOption&&!atLeastOneSelected&&obj.options.length>0){obj.options[0].selected=true}
else if(!atLeastOneSelected&&obj.type=="select-one"){obj.selectedIndex=-1}}


