if(typeof jQuery=="undefined")jQuery=function(){};if(typeof jQuery.classBehaviours=="undefined")jQuery.classBehaviours=function(){};if(typeof jQuery.classBehaviours.handlers=="undefined")jQuery.classBehaviours.handlers=function(){};jQuery.classBehaviours.handlers.displayOnValue={name:"displayOnValue",index:0,start:function(c){var a=this;referedIds=jQuery.classBehaviours.utilities.getClassParameter(c,"id","").split(",");for(var d=0;d<referedIds.length;d++)if(referedIds[d]!=""){referedField=document.getElementById(referedIds[d]);if(referedField==null)return;referedObjs=referedField.type=="radio"?document.getElementsByName(referedField.name):new Array(referedField);for(var b=0;b<referedObjs.length;b++)if(referedObjs[b].type=="radio"){referedObjs[b].onclick=a.changed;referedObjs[b].onchange=a.changed}else{referedObjs[b].onfocus=a.changed;referedObjs[b].onchange=a.changed}a.update(c);c.id=c.id?c.id:a.name+a.index++;setTimeout('jQuery.classBehaviours.handlers.displayOnValue.update(document.getElementById("'+c.id+'"))',256)}},update:function(b){var c="undefined";compareIds=jQuery.classBehaviours.utilities.getClassParameter(b,"id",c).split(",");compareValues=jQuery.classBehaviours.utilities.getClassParameter(b,"value",c).split(",");compareDisplay=true;for(var a=0;a<compareIds.length;a++)if(compareIds[a]!=""){compareObj=document.getElementById(compareIds[a]);compareValue=compareObj.value;compareChecked=typeof compareObj.checked!=c?compareObj.checked:compareValue==compareValues[a];compareDisplay=compareChecked&&compareDisplay}b.style.display=compareDisplay?jQuery.classBehaviours.utilities.getVisibleState(b):"none"},changed:function(d){var c=typeof this.nodeName=="undefined"?d:this,b=jQuery.classBehaviours.handlers.displayOnValue;rootNode=jQuery.classBehaviours.utilities.rootNode(c,"FIELDSET");allNodes=jQuery.classBehaviours.utilities.getElementsByClassName(b.name,rootNode);for(var a=0;a<allNodes.length;a++)b.update(allNodes[a])}};jQuery.classBehaviours.handlers.displayIfChecked={name:"displayIfChecked",index:0,start:function(a){var b=this;if(a.type=="radio"){a.onclick=b.changed;a.onchange=b.changed}else{a.onfocus=b.changed;a.onchange=b.changed}setTimeout('jQuery.classBehaviours.handlers.displayIfChecked.changed(document.getElementById("'+a.id+'"))',256)},changed:function(e){var b="undefined",d=typeof this.nodeName==b?e:this,f=jQuery.classBehaviours.handlers.displayIfChecked;allPeerNodes=jQuery.classBehaviours.utilities.getElementsByClassName(f.name,null);for(var a=0;a<allPeerNodes.length;a++){targetIds=jQuery.classBehaviours.utilities.getClassParameter(allPeerNodes[a],"id",b).split(",");sourceValue=jQuery.classBehaviours.utilities.getClassParameter(allPeerNodes[a],"value",b);compareDisplay=typeof allPeerNodes[a].checked!=b?allPeerNodes[a].checked:compareObj.value==sourceValue;for(var c=0;c<targetIds.length;c++)document.getElementById(targetIds[c]).style.display=compareDisplay?jQuery.classBehaviours.utilities.getVisibleState(d):"none"}}};if(typeof jQuery.fn!="undefined"){jQuery.fn.displayOnValue=function(){return this.each(function(){jQuery.classBehaviours.handlers.displayOnValue.start(this)})};jQuery.fn.displayIfChecked=function(){return this.each(function(){jQuery.classBehaviours.handlers.displayIfChecked.start(this)})};$(document).ready(function(){$(".displayOnValue").displayOnValue();$(".displayIfChecked").displayIfChecked()})}