var cssmw={intializeMenu:function(id){if(navigator.appName=='Microsoft Internet Explorer'&&cssmw.ieVersion()<=7){var ul=document.getElementById(id);var topOffset=ul.offsetHeight;var lis=ul.childNodes;for(var i=0;i<lis.length;i++){if(lis[i].tagName&&lis[i].tagName.toLowerCase()=='li'){var uls=lis[i].childNodes;for(var j=0;j<uls.length;j++){if(uls[j].tagName&&uls[j].tagName.toLowerCase()=='ul'){uls[j].style.top=topOffset+'px';}}}}}
if(navigator.appName=='Microsoft Internet Explorer'&&cssmw.ieVersion()<7){var lis=document.getElementById(id).getElementsByTagName('li');for(var i=0;i<lis.length;i++){var li=lis[i];li.className='link';var uls=li.getElementsByTagName('ul');for(var u=0;u<uls.length;u++){uls[u].style.display='none';}
var span=li.getElementsByTagName('span')[0];if(span)span.className='link';var a=(span)?span.getElementsByTagName('a')[0]:false;if(a)a.className='link';li.onmouseover=function(e){this.className='hover';var ul=this.getElementsByTagName('ul')[0];if(ul)ul.style.display='block';var span=this.getElementsByTagName('span')[0];if(span)span.className='hover';var a=(span)?span.getElementsByTagName('a')[0]:false;if(a)a.className='hover';}
li.onmouseout=function(e){this.className='link';var ul=this.getElementsByTagName('ul')[0];if(ul)ul.style.display='none';var span=this.getElementsByTagName('span')[0];if(span)span.className='link';var a=(span)?span.getElementsByTagName('a')[0]:false;if(a)a.className='link';}}}},ieVersion:function(){var ua=navigator.userAgent.toLowerCase();var offset=ua.indexOf("msie ");return(offset==-1)?0:parseFloat(ua.substring(offset+5,ua.indexOf(";",offset)));}};jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+options.path:'';var domain=options.domain?'; domain='+options.domain:'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};;;(function($){$.extend($.fn,{swapClass:function(c1,c2){var c1Elements=this.filter('.'+c1);this.filter('.'+c2).removeClass(c2).addClass(c1);c1Elements.removeClass(c1).addClass(c2);return this;},replaceClass:function(c1,c2){return this.filter('.'+c1).removeClass(c1).addClass(c2).end();},hoverClass:function(className){className=className||"hover";return this.hover(function(){$(this).addClass(className);},function(){$(this).removeClass(className);});},heightToggle:function(animated,callback){animated?this.animate({height:"toggle"},animated,callback):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(callback)callback.apply(this,arguments);});},heightHide:function(animated,callback){if(animated){this.animate({height:"hide"},animated,callback);}else{this.hide();if(callback)this.each(callback);}},prepareBranches:function(settings){if(!settings.prerendered){this.filter(":last-child:not(ul)").addClass(CLASSES.last);this.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").find(">ul").hide();}return this.filter(":has(>ul)");},applyClasses:function(settings,toggler){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event){toggler.apply($(this).next());}).add($("a",this)).hoverClass();if(!settings.prerendered){this.filter(":has(>ul:hidden)").addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable);this.not(":has(>ul:hidden)").addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable);this.prepend("<div class=\""+CLASSES.hitarea+"\"/>").find("div."+CLASSES.hitarea).each(function(){var classes="";$.each($(this).parent().attr("class").split(" "),function(){classes+=this+"-hitarea ";});$(this).addClass(classes);});}this.find("div."+CLASSES.hitarea).click(toggler);},treeview:function(settings){settings=$.extend({cookieId:"treeview"},settings);if(settings.add){return this.trigger("add",[settings.add]);}if(settings.toggle){var callback=settings.toggle;settings.toggle=function(){return callback.apply($(this).parent()[0],arguments);};}function treeController(tree,control){function handler(filter){return function(){toggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){return filter?$(this).parent("."+filter).length:true;}));return false;};}$("a:eq(0)",control).click(handler(CLASSES.collapsable));$("a:eq(1)",control).click(handler(CLASSES.expandable));$("a:eq(2)",control).click(handler());}function toggler(){$(this).parent().find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightToggle(settings.animated,settings.toggle);if(settings.unique){$(this).parent().siblings().find(">.hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightHide(settings.animated,settings.toggle);}}function serialize(){function binary(arg){return arg?1:0;}var data=[];branches.each(function(i,e){data[i]=$(e).is(":has(>ul:visible)")?1:0;});$.cookie(settings.cookieId,data.join(""));}function deserialize(){var stored=$.cookie(settings.cookieId);if(stored){var data=stored.split("");branches.each(function(i,e){$(e).find(">ul")[parseInt(data[i])?"show":"hide"]();});}}this.addClass("treeview");var branches=this.find("li").prepareBranches(settings);switch(settings.persist){case"cookie":var toggleCallback=settings.toggle;settings.toggle=function(){serialize();if(toggleCallback){toggleCallback.apply(this,arguments);}};deserialize();break;case"location":var current=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase();});if(current.length){current.addClass("selected").parents("ul, li").add(current.next()).show();}break;}branches.applyClasses(settings,toggler);if(settings.control){treeController(this,settings.control);$(settings.control).show();}return this.bind("add",function(event,branches){$(branches).prev().removeClass(CLASSES.last).removeClass(CLASSES.lastCollapsable).removeClass(CLASSES.lastExpandable).find(">.hitarea").removeClass(CLASSES.lastCollapsableHitarea).removeClass(CLASSES.lastExpandableHitarea);$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings,toggler);});}});var CLASSES=$.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};$.fn.Treeview=$.fn.treeview;})(jQuery);;function ChangeFontSize(amt){var minSize=8;var maxSize=24;var currentSize=getClassProperty("adjustableFont","fontSize");currentSize=currentSize.replace("pt","");var newSize=parseInt(currentSize)+amt;if(newSize>=minSize&&newSize<=maxSize){changeClassProperty("adjustableFont","fontSize",newSize+"pt");}}
function getClassProperty(sClassName,sProperty){sClassName="."+sClassName;var sheets=document.styleSheets;var rules;var styleObj;for(i=0;i<sheets.length;i++){rules=sheets[i].cssRules||sheets[i].rules;for(var j=0;j<rules.length;j++){if(rules[j].selectorText&&rules[j].selectorText==sClassName){styleObj=rules[j].style;return styleObj[sProperty];}}}}
function changeClassProperty(sClassName,sProperty,sValue){sClassName="."+sClassName;var sheets=document.styleSheets;var rules;var styleObj;for(i=0;i<sheets.length;i++){rules=sheets[i].cssRules||sheets[i].rules;for(var j=0;j<rules.length;j++){if(rules[j].selectorText&&rules[j].selectorText==sClassName){styleObj=rules[j].style;styleObj[sProperty]=sValue;break;}}}}
function WAAddError(formElement,errorMsg,focusIt,stopIt){if(document.WAFV_Error){document.WAFV_Error+="\n"+errorMsg;}
else{document.WAFV_Error=errorMsg;}
if(!document.WAFV_InvalidArray){document.WAFV_InvalidArray=new Array();}
document.WAFV_InvalidArray[document.WAFV_InvalidArray.length]=formElement;if(focusIt&&!document.WAFV_Focus){document.WAFV_Focus=focusIt;}
if(stopIt==1){document.WAFV_Stop=true;}
else if(stopIt==2){formElement.WAFV_Continue=true;}
else if(stopIt==3){formElement.WAFV_Stop=true;formElement.WAFV_Continue=false;}}
function WAValidateAN(formElement,value,errorMsg,allowUpper,allowLower,allowNumbers,allowSpace,extraChars,focusIt,stopIt,required){var isValid=true;extraChars=extraChars.replace(/&quot;/g,'"');if((!document.WAFV_Stop&&!formElement.WAFV_Stop)||formElement.WAFV_Continue){for(var x=0;x<value.length;x++){var charGood=false;var nextChar=value.charAt(x);var charCode=value.charCodeAt(x);if(allowLower){if(charCode>=97&&charCode<=122){charGood=true;}}
if(allowUpper){if(charCode>=65&&charCode<=90){charGood=true;}}
if(allowNumbers){if(charCode>=48&&charCode<=57){charGood=true;}}
if(allowSpace){if(nextChar==" "){charGood=true;}}
if(extraChars){if(unescape(extraChars).indexOf(nextChar)>=0){charGood=true;}}
if(!charGood){isValid=false;x=value.length;}}
if(required&&value=="")
isValid=false;}
if(!isValid){WAAddError(formElement,errorMsg,focusIt,stopIt);}}
function WAtrimIt(theString,leaveLeft,leaveRight){if(!leaveLeft){while(theString.charAt(0)==" ")
theString=theString.substring(1);}
if(!leaveRight){while(theString.charAt(theString.length-1)==" ")
theString=theString.substring(0,theString.length-1);}
return theString;}
function WAFV_GetValueFromInputType(formElement,inputType,trimWhite){var value="";if(inputType=="select"){if(formElement.selectedIndex!=-1&&formElement.options[formElement.selectedIndex].value&&formElement.options[formElement.selectedIndex].value!=""){value=formElement.options[formElement.selectedIndex].value;}}
else if(inputType=="checkbox"){if(formElement.length){for(var x=0;x<formElement.length;x++){if(formElement[x].checked&&formElement[x].value!=""){value=formElement[x].value;break;}}}
else if(formElement.checked)
value=formElement.value;}
else if(inputType=="radio"){if(formElement.length){for(var x=0;x<formElement.length;x++){if(formElement[x].checked&&formElement[x].value!=""){value=formElement[x].value;break;}}}
else if(formElement.checked)
value=formElement.value;}
else if(inputType=="radiogroup"){for(var x=0;x<formElement.length;x++){if(formElement[x].checked&&formElement[x].value!=""){value=formElement[x].value;break;}}}
else if(inputType=="iRite"){var theEditor=FCKeditorAPI.GetInstance(formElement.name);value=theEditor.GetXHTML(true);}
else{var value=formElement.value;value=value.replace(/<p>(\&\#160\;)*<\/p>/,"");}
if(trimWhite){value=WAtrimIt(value);}
return value;}
function WAValidateRQ(formElement,errorMsg,focusIt,stopIt,trimWhite,inputType){var isValid=true;if(!document.WAFV_Stop&&!formElement.WAFV_Stop){var value=WAFV_GetValueFromInputType(formElement,inputType,trimWhite);if(value==""){isValid=false;}}
if(!isValid){WAAddError(formElement,errorMsg,focusIt,stopIt);}}
function WAValidatePN(formElement,errorMsg,areaCode,international,reformat,focusIt,stopIt,required){var value=formElement.value;var isValid=true;var allowed="*() -./_\n\r+";var newVal="";if((!document.WAFV_Stop&&!formElement.WAFV_Stop)&&!(!required&&value=="")){for(var x=0;x<value.length;x++){var z=value.charAt(x);if((z>="0")&&(z<="9")){newVal+=z;}
else{if(allowed.indexOf(z)<0){isValid=false;}}}
if(international){if(newVal.length<5){isValid=false;}}
else if(newVal.length==11){if(newVal.charAt(0)!="1"){isValid=false;}}
else if((newVal.length!=10&&newVal.length!=7)||(newVal.length==7&&areaCode)){isValid=false;}}
if(!isValid){WAAddError(formElement,errorMsg,focusIt,stopIt);}
else{formElement.WAValid=true;if(reformat!=""&&newVal!=""){for(var x=0;x<newVal.length;x++){reformat=reformat.substring(0,reformat.lastIndexOf("x"))+newVal.charAt(newVal.length-(x+1))+reformat.substring(reformat.lastIndexOf("x")+1);}
if(reformat.indexOf("x")>=0){reformat=reformat.substring(reformat.lastIndexOf("x")+1);z=reformat.charAt(0);while(((z<"0")||(z>"9"))&&z!="("){reformat=reformat.substring(1);z=reformat.charAt(0);}}
formElement.value=reformat;}}}
function WAValidateEM(formElement,value,errorMsg,focusIt,stopIt,required){var isValid=true;if((!document.WAFV_Stop&&!formElement.WAFV_Stop)&&!(!required&&value=="")){value=value.toLowerCase();var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/i;var emailPat=/^(.+)@(.+)$/i;var accepted="\[^\\s\\(\\)><@,;:\\\\\\\"\\.\\[\\]\]+";var quotedUser="(\"[^\"]*\")";var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/i;var section="("+accepted+"|"+quotedUser+")";var userPat=new RegExp("^"+section+"(\\."+section+")*$");var domainPat=new RegExp("^"+accepted+"(\\."+accepted+")*$");var theMatch=value.match(emailPat);var acceptedPat=new RegExp("^"+accepted+"$");var userName="";var domainName="";if(theMatch==null){isValid=false;}
else{userName=theMatch[1];domainName=theMatch[2];var domArr=domainName.split(".");var IPArray=domainName.match(ipDomainPat);for(x=0;x<userName.length;x++){if((userName.charCodeAt(x)>127&&userName.charCodeAt(x)<192)||userName.charCodeAt(x)>255){isValid=false;}}
for(x=0;x<domainName.length;x++){if((domainName.charCodeAt(x)>127&&domainName.charCodeAt(x)<192)||domainName.charCodeAt(x)>255){isValid=false;}}
if(userName.match(userPat)==null){isValid=false;}
if(IPArray!=null){for(var x=1;x<=4;x++){if(IPArray[x]>255){isValid=false;}}}
for(x=0;x<domArr.length;x++){if(domArr[x].search(acceptedPat)==-1||domArr[x].length==0||(domArr[x].length<2&&x>=domArr.length-2&&x>0)){isValid=false;}}
if(domArr[domArr.length-1].length!=2&&domArr[domArr.length-1].search(knownDomsPat)==-1){isValid=false;}
if(domArr.length<2){isValid=false;}}}
if(!isValid){WAAddError(formElement,errorMsg,focusIt,stopIt);}}
function WAAlertErrors(errorHead,errorFoot,setFocus,submitForm){if(!document.WAFV_StopAlert){document.WAFV_StopAlert=true;if(document.WAFV_InvalidArray){document.WAFV_Stop=true;var errorMsg=document.WAFV_Error;if(errorHead!="")
errorMsg=errorHead+"\n"+errorMsg;if(errorFoot!="")
errorMsg+="\n"+errorFoot;document.MM_returnValue=false;if(document.WAFV_Error!="")
alert(errorMsg.replace(/&quot;/g,'"'));else if(submitForm)
submitForm.submit();if(setFocus&&document.WAFV_Focus){if(document.getElementById(document.WAFV_Focus.name+"___Config")&&document.WAFV_Focus.type.toLowerCase()=="hidden"){var theEditor=FCKeditorAPI.GetInstance(document.WAFV_Focus.name);theEditor.EditorWindow.focus();setTimeout("setTimeout('document.WAFV_Stop = false;document.WAFV_StopAlert = false;',1)",1);}
else{document.tempFocus=document.WAFV_Focus;setTimeout("document.tempFocus.focus();setTimeout('document.WAFV_Stop = false;document.WAFV_StopAlert = false;',1)",1);}}
else{document.WAFV_Stop=false;document.WAFV_StopAlert=false;}
for(var x=0;x<document.WAFV_InvalidArray.length;x++){document.WAFV_InvalidArray[x].WAFV_Stop=false;}}
else{document.WAFV_Stop=false;document.WAFV_StopAlert=false;if(submitForm){submitForm.submit();}
document.MM_returnValue=true;}
document.WAFV_Focus=false;document.WAFV_Error=false;document.WAFV_InvalidArray=false;}};jQuery.fn.labelify=function(settings){settings=jQuery.extend({text:"title",labelledClass:""},settings);var lookups={title:function(input){return $(input).attr("title");},label:function(input){return $("label[for="+input.id+"]").text();}};var lookup;var jQuery_labellified_elements=$(this);return $(this).each(function(){if(typeof settings.text==="string"){lookup=lookups[settings.text];}else{lookup=settings.text;};if(typeof lookup!=="function"){return;}
var lookupval=lookup(this);if(!lookupval){return;}
$(this).data("label",lookup(this).replace(/\n/g,''));$(this).focus(function(){if(this.value===$(this).data("label")){this.value=this.defaultValue;$(this).removeClass(settings.labelledClass);}}).blur(function(){if(this.value===this.defaultValue){this.value=$(this).data("label");$(this).addClass(settings.labelledClass);}});var removeValuesOnExit=function(){jQuery_labellified_elements.each(function(){if(this.value===$(this).data("label")){this.value=this.defaultValue;$(this).removeClass(settings.labelledClass);}})};$(this).parents("form").submit(removeValuesOnExit);$(window).unload(removeValuesOnExit);if(this.value!==this.defaultValue){return;}
this.value=$(this).data("label");$(this).addClass(settings.labelledClass);});};