document.writeln('<style>');document.writeln('.hide-target-hidden{display:none;}');document.writeln('.hide-noscript{display:none;}');document.writeln('</style>');function HidePair(tri,tar){this.trigger=tri;this.target=tar;this.getTrigger=function(){return this.trigger;}
this.setTriggerClass=function(newclass){this.trigger.className=newclass;}
this.getTarget=function(){return this.target;}
this.setTargetClass=function(newclass){this.target.className=newclass;}}
function HideGroup(name){this.GroupName=name;this.Pairs=new Array();this.Active=new String();this.getName=function(){return this.GroupName;}
this.setName=function(str){this.GroupName=str;}
this.getActive=function(){return this.Active;}
this.setActive=function(str){this.Active=str;}
this.addPair=function(trigger,target){newp=new HidePair(trigger,target)
this.Pairs.push(newp);}
this.hideAll=function(){for(var i=0;i<this.Pairs.length;i++){this.Pairs[i].setTriggerClass(cssTriggerRoot+'-'+this.GroupName);if(this.Pairs[i].getTarget()&&(this.Pairs[i].getTarget()!='')){this.Pairs[i].setTargetClass(cssTargetHidden);}else{hide_debug("ERROR: Can't HIDE target for trigger: '"+this.Pairs[i].getTrigger().id+"' it doesn't exist.");}}}}
function HideOptPair(token,value){this.Token=token;this.Val=value;this.setValue=function(value){this.Val=value;}
this.getPair=function(){return this;}
this.getToken=function(){return this.Token}
this.getValue=function(){return this.Val}
this.toString=function(){var s=new String(this.Token+':'+this.Val);hide_debug("HideOptPair.toString(): "+s);return s;}}
function HideGroupOptions(name){this.GroupName=name;this.GroupOpts=new Array();this.getName=function(){return this.GroupName;}
this.getOptions=function(){return this.GroupOpts;}
this.setOption=function(token,value){found=-1;for(i=0;i<this.GroupOpts.length;i++){if(this.GroupOpts[i].getToken()==token){found=i;this.GroupOpts[i].setValue(value);break;}}
if(found<0){this.GroupOpts.push(new HideOptPair(token,value));}}
this.getOption=function(token){value=null;for(i=0;i<this.GroupOpts.length;i++){if(this.GroupOpts[i].getToken()==token){value=this.GroupOpts[i].getValue();break;}}
return value;}
this.toString=function(){var s=new String();for(i=0;i<this.GroupOpts.length;i++){s=s.concat(this.GroupName+"=>"+this.GroupOpts[i].toString()+"\n");}
hide_debug("HideGroupOptions.toString(): "+s);return s;}}
function hide_GetOptionsGroup(group){var index=hide_LookupOptionsGroup(group);if(index<0){hide_Options.push(new HideGroupOptions(group));outGroup=hide_Options[hide_Options.length-1];}else{outGroup=hide_Options[index];}
return outGroup;}
function hide_LookupOptionsGroup(group){var found=-1;for(var i=0;i<hide_Options.length;i++){if(hide_Options[i].getName()==group){found=i;break;}}
return found;}
function hide_GetOption(group,token){var found=null;optindex=hide_LookupOptionsGroup(group);if(optindex>=0){found=hide_Options[optindex].getOption(token);}
return found;}
function hide_SetOption(group,token,value){hide_debug('HideSetOption(): group: '+group+' token: '+token+' value: '+value);OptGroup=hide_GetOptionsGroup(group);OptGroup.setOption(token,value);}
function hide_ShowOptions(){var s=new String("hide.js options\n[Group Name]=>[token]:[value]\n");s=s.concat("--------------------\n");for(i=0;i<hide_Options.length;i++){hide_debug("hide_ShowOptions(): "+i);s=s.concat(hide_Options[i].toString());}
alert(s);}
var triggerKey=new String('hide-id-trigger-');var targetKey=new String('hide-id-target-');var cssTriggerRoot=new String('hide-trigger');var cssTargetShown=new String('hide-target-shown');var cssTargetHidden=new String('hide-target-hidden');var hide_Groups=new Array();var hide_Options=new Array();function hide_debug(s){try{debug(s);}catch(error){}}
function hide_ShowClassInfo(){var s=new String("hide.js css trigger classes\n[Group Name]\n[inactive]:[active]\n");s=s.concat("--------------------\n");for(var i=0;i<hide_Groups.length;i++){g=hide_Groups[i].getName();s=s.concat("Group: '"+g+"'\n");s=s.concat(cssTriggerRoot+"-"+g+":"+cssTriggerRoot+"-"+g+"-"+"active\n\n");}
alert(s);}
function hide_DoClick(argTrigger,history,hide_active){var trigger=argTrigger;hide_debug("hide_DoClick(): trigger = '"+trigger.id+"', "+history+","+hide_active);trigger.blur();var temp_sGroup=hide_ParseGroup(trigger.id,triggerKey);var temp_sPairID=hide_ParsePairID(trigger.id,triggerKey);thisGroup=hide_GetGroup(temp_sGroup);hide_debug("  -> Corresponding target = '"+targetKey+temp_sGroup+"-"+temp_sPairID);thisGroup.hideAll();if((thisGroup.getActive()!=trigger.id)||!hide_active){target=document.getElementById(targetKey+temp_sGroup+"-"+temp_sPairID);if(target){target.className=cssTargetShown;}else{hide_debug("  -> ERROR: Can't SHOW target for trigger: '"+trigger.id+"'");}
trigger.className=cssTriggerRoot+'-'+thisGroup.getName()+'-active';thisGroup.setActive(trigger.id);}else if((thisGroup.getActive()==trigger.id)&&hide_active){thisGroup.setActive('');}
if(history){hide_debug("  -> update history");hide_setHash();}
return false;}
function hide_GetGroup(group){var index=hide_LookupGroup(group);if(index<0){hide_Groups.push(new HideGroup(group));outGroup=hide_Groups[hide_Groups.length-1];}else{outGroup=hide_Groups[index];}
return outGroup;}
function hide_LookupGroup(group){var found;found=-1;for(var i=0;i<hide_Groups.length;i++){if(hide_Groups[i].getName()==group){found=i;}}
return found;}
function hide_InitActive(){hide_debug("hide_InitActive():");var htriggers=cdc.util.getFromHash()['hide_v3'];htriggers=new String(htriggers);hide_debug(" --> cdc.util.getFromHash(): '"+htriggers+"'");htriggers=htriggers.split("+");for(var i=0;i<htriggers.length;i++){hide_debug(" --> hash triggers["+i+"] : '"+htriggers[i]+"'");if(htriggers[i]!=''){if(trigger=document.getElementById(htriggers[i])){hide_DoClick(trigger,false,false);}}}}
function hide_setHash(){var newhash=new String();var active;for(var i=0;i<hide_Groups.length;i++){newhash=newhash.concat("+"+hide_Groups[i].getActive());}
cdc.util.setToHash('hide_v3',newhash);hide_debug("  -> Set Active Trigger cdc.util.setToHash(): '"+newhash+"'");}
function hide_ParseGroup(id,key){var info=id.substr(key.length,id.length);var out=info.split("-")[0];return out;}
function hide_ParsePairID(id,key){var info=id.substr(key.length,id.length);var out=info.split("-")[1];return out;}
function hide_Init(){var nTriggers=0;var nTriggerErrors=0;var group;var index;hide_debug("hide_Init():");hide_debug("  -> Finding Triggers");var pageLinks=document.getElementsByTagName('a');var numlinks=pageLinks.length;hide_debug("  -> Links in page: "+numlinks+"<br />");for(var i=0;i<numlinks;i++){var trigger=pageLinks[i];var triggerID=trigger.id;if(triggerID.indexOf(triggerKey)!=-1){hide_debug("Trigger found, id: '"+triggerID+"'");nTriggers++;gname=hide_ParseGroup(triggerID,triggerKey);var ghist=hide_GetOption(gname,'history');var ghideall=hide_GetOption(gname,'allow_hideall');if(ghist==null){ghist=true;}
if(ghideall==null){ghideall=true;}
trigger.onclick=new Function("{ return hide_DoClick(this, "+ghist+", "+ghideall+"); }");hide_debug("  -> onclick set: hide_DoClick(this, "+ghist+", "+ghideall+");");index=hide_ParsePairID(triggerID,triggerKey);Group=hide_GetGroup(gname);hide_debug("  -> GetGroup returned: "+Group.getName());targetID=targetKey+gname+'-'+index;target=document.getElementById(targetID);if(!target){hide_debug("  -> ERROR: Hideable Trigger without Target: id: '"+triggerID+"'");nTriggerErrors++;Group.addPair(trigger,null);}else{csstriggeractive=cssTriggerRoot+'-'+gname+'-active'
hide_debug("  -> target found: "+target.id);hide_debug("  -> trigger class: '"+trigger.className+"': looking for "+csstriggeractive);if(trigger.className==csstriggeractive){target.className=cssTargetShown;}else{trigger.className=cssTriggerRoot+'-'+gname;target.className=cssTargetHidden;}
hide_debug("  -> target classnmae set: classname="+target.className);Group.addPair(trigger,target);}
hide_debug("");}}
hide_debug("Summary:");s='';for(i=0;i<hide_Groups.length;i++){s+="'"+hide_Groups[i].getName()+"', ";}
hide_debug("Total Hideable Triggers: "+nTriggers+" / "+nTriggerErrors+" Error(s)");hide_debug("Total Hideable Groups: "+hide_Groups.length+": "+s+"<br />");hide_InitActive();hide_debug("hide_Init(): Complete ---------------------------");}
$(document).ready(hide_Init);