var Ramius={};Ramius.SIXENT_CHARSET="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-.";Ramius.SUBDOMAIN_CHARSET="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-";Ramius.CAPTCHA_CHARSET="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ23456789";window.loaded=false;YAHOO.util.Event.on(window,"load",function(){window.loaded=true});Ramius.event={onLoad:function(a,c,b){if(window.loaded){setTimeout(function(){var d=window;if(b){if(b===true){d=c}else{d=b}}a.call(d,"onLoad",[],c)},0)}else{$E.on(window,"load",a,c,b)}}};var bln_IE6=null;var bln_isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;function is_IE(){return bln_isIE}function isIE6(){if(bln_IE6!=null){return bln_IE6}if(is_IE()){var b=navigator.appVersion.split("MSIE");var a=parseFloat(b[1]);if(a<7){bln_IE6=true;return true}}bln_IE6=false;return false}Ramius.ajax={iframeId:"rm-yui-sndbx",prepareParameters:function(a,c){if(!c){c={}}var b={};b.method=c.method||"GET";b.params=c.parameters||null;b.evaluate=c.evalScripts;b.timeout_time=c.timeout?c.timeout:45000;b.upload=c.upload||false;b.beforeStartFunc=c.beforeStart||blankFunction;b.completeFunc=c.onComplete||blankFunction;b.uploadFunc=c.onUpload||blankFunction;b.errorFunc=c.onError||b.completeFunc;b.failureFunc=c.onFailure||blankFunction;b.method=(a.indexOf("_method=delete")>=0)?"DELETE":b.method;b.method=(a.indexOf("_method=put")>=0)?"PUT":b.method;b.method=(a.indexOf("_method=post")>=0)?"POST":b.method;b.form=c.form;return b},request:function(a,c){if(!c){c={}}if(!a||a.length==0){return null}var e=Ramius.ajax.prepareParameters(a,c);if(e.params&&e.method.toLowerCase()!="post"){a=(a.indexOf("?")>=0)?a+e.params:a+"?"+e.params;e.params=null}var h={success:function(i){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;var f=i.getResponseHeader["Ramius-Status"]?Ramius.textUtils.trim(i.getResponseHeader["Ramius-Status"]).toUpperCase():"";if(f=="ERROR"){e.errorFunc(i)}else{e.completeFunc(i)}},upload:function(f){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;e.uploadFunc(f)},failure:function(f){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;e.failureFunc(f)},timeout:e.timeout_time};e.beforeStartFunc();var d=$(e.form);if(e.upload){if(e.params==null||e.params==""){e.params="X-Requested-With=XMLHttpRequest"}else{e.params=e.params+"&X-Requested-With=XMLHttpRequest"}}if(d){YAHOO.util.Connect.setForm(d,e.upload,Ramius.ajax.iframeId)}window.ajaxInProgress=true;Ramius.ajax.showSpinner();try{var g=YAHOO.util.Connect.asyncRequest(e.method,a,h,e.params,Ramius.ajax.iframeId);window.ajax_obj=g;return g}catch(b){alert("Unexpected failure: "+b);YAHOO.util.Connect.resetFormState();h.failure()}},updater:function(a,b,d){if(!d){d={}}var e=$(a);if(!e||!b||b.length==0){return null}var h=Ramius.ajax.prepareParameters(b,d);var i={success:function(j){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;e.innerHTML=j.responseText;if(h.evaluate){$rn.evalScripts(e)}var f=j.getResponseHeader["Ramius-Status"]?Ramius.textUtils.trim(j.getResponseHeader["Ramius-Status"]).toUpperCase():"";if(f=="ERROR"){h.errorFunc(j)}else{h.completeFunc(j)}},upload:function(f){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;e.innerHTML=f.responseText;if(h.evaluate){$rn.evalScripts(e)}h.uploadFunc(f)},failure:function(f){Ramius.ajax.hideSpinner();window.ajaxInProgress=false;h.failureFunc(f)},timeout:h.timeout_time};h.beforeStartFunc();var g=$(h.form);if(g){YAHOO.util.Connect.setForm(g,h.upload,Ramius.ajax.iframeId)}window.ajaxInProgress=true;Ramius.ajax.showSpinner();try{return YAHOO.util.Connect.asyncRequest(h.method,b,i,h.params,Ramius.ajax.iframeId)}catch(c){alert("Unexpected failure: "+c.description);YAHOO.util.Connect.resetFormState();i.failure()}},batchUpdater:function(f,b,d){var e=[];for(var a=(f.length-1);a>=0;a--){e[e.length]=Ramius.ajax.updater(f[a].container,f[a].target_url,b)}setTimeout(c,50);function c(){for(var g=(e.length-1);g>=0;g--){if(YAHOO.util.Connect.isCallInProgress(e[g])){setTimeout(c,50);return false}}if(d&&typeof d=="function"){d()}return true}},abort:function(){YAHOO.util.Connect.abort(window.ajax_obj);window.ajaxInProgress=false;Ramius.ajax.hideSpinner()},showSpinner:function(){if(Ramius.ajax.spinnerPause!=null){return}var a=function(){var b=$("rm-ajaxSpinner");if(b!=null){if(isIE6()){var c=parseInt(document.documentElement.scrollTop||document.body.scrollTop)+6;b.style.top=c+"px"}b.style.display="block"}Ramius.ajax.spinnerPause=null};Ramius.ajax.spinnerPause=setTimeout(a,500)},hideSpinner:function(){if(Ramius.ajax.spinnerPause!=null){clearTimeout(Ramius.ajax.spinnerPause);Ramius.ajax.spinnerPause=null}var a=$("rm-ajaxSpinner");if(a!=null){a.style.display="none"}},spinnerPause:null};Ramius.nodeUtils={isChildOf:function(d,c){if(d==null||c==null){return false}var b=c.getElementsByTagName("*");for(var a=0;a<b.length;a++){if(b[a]===d){return true}}return false},toggleEmbeds:function(g,d){try{var c=[g.embeds,g.objects,g.iframes];for(var b=0;b<c.length;b++){for(var a=0;a<c[b].length;a++){c[b][a].style.visibility=(d)?"hidden":"visible"}}}catch(f){alert(f)}},getFirstChildByClassName:function(c,a){var d=c.childNodes;for(var b=0;d&&b<d.length;b++){if(Ramius.nodeUtils.hasClass(d[b],a)){return d[b]}}return null},getParentNodeByClassName:function(c,a,b){while(c&&(c=c.parentNode)&&(!b||(b&&!$hc(c,b)))){if(Ramius.nodeUtils.hasClass(c,a)){return c}}return null},getSiblingbyClassName:function(c,a){if(!c||!c.parentNode){return null}var d=c.parentNode.childNodes;for(var b=0;d&&b<d.length;b++){if(Ramius.nodeUtils.hasClass(d[b],a)){return d[b]}}return null},getElementsByClassName:function(d,c,b){if(!c||typeof c!="string"||c.length==0){c="*"}var a=($(b)||document.body).getElementsByTagName(c);return Ramius.nodeUtils.haveClass(a,d)},getElementsByClasses:function(e,g,d){if(!g||typeof g!="string"||g.length==0){g="*"}var c=($(d)||document.body).getElementsByTagName(g);var f=[];for(var a=0;a<c.length;a++){for(var b=0;b<e.length;b++){if($hc(c[a],e[b])){f[f.length]=c[a]}}}return f},getElementsContainingName:function(a,g,e){if(!g||typeof g!="string"||g.length==0){g="*"}var d=($(e)||document.body).getElementsByTagName(g);var c=[];for(var b=0;b<d.length;b++){var f=d[b];if(f.name&&f.name.indexOf(a)>=0){c[c.length]=f}}return c},hasClass:function(c,a){if(!c||!c.className){return false}var b=" "+c.className+" ";if(b.indexOf(" "+a+" ")>=0){return true}return false},haveClass:function(e,a){var c=[],d=e.length;for(var b=0;b<d;b++){if(Ramius.nodeUtils.hasClass(e[b],a)){c[c.length]=e[b]}}return c},addClass:function(b,a){if(b==null||a==null){return}if(!Ramius.nodeUtils.hasClass(b,a)){b.className=b.className+" "+a}},removeClass:function(f,c){if(f==null||c==null){return}if(Ramius.nodeUtils.hasClass(f,c)){var d=" "+f.className+" ";var b=" "+c+" ";var e=b.length-1;var a=-1;while((a=d.indexOf(b))>=0){d=d.substring(0,a)+d.substring(a+e)}f.className=d}},replaceHTML:function(el,html){var oldEl=$(el);if(oldEl==null||oldEl.parentNode==null){return null;
/*@cc_on // Pure innerHTML is slightly faster in IE
		oldEl.innerHTML = html;
		return oldEl;
		@*/
}var newEl=oldEl.cloneNode(false);oldEl.parentNode.replaceChild(newEl,oldEl);newEl.innerHTML=html;return newEl},replaceClass:function(a,b,c){Ramius.nodeUtils.removeClass(a,b);Ramius.nodeUtils.addClass(a,c)},hasVisibleChildren:function(b){if(!b||!b.childNodes.length){return false}var c=b.childNodes;for(var a=(c.length-1);a>=0;a--){if(c[a].style&&c[a].style.display=="block"&&c[a].style.visibility=="visible"){return true}}return false},replace:function(e,d){var c=e.parentNode,g=e.nextSibling;e.parentNode.removeChild(e);var f=d.innerHTML;d.innerHTML="";if(g!=null){c.insertBefore(d,g)}else{c.appendChild(d)}d.innerHTML=f},swapParent:function(e,d){var c=e.parentNode,f=e.nextSibling;d.parentNode.insertBefore(e,d);if(f!=null){c.insertBefore(d,f)}else{c.appendChild(d)}},changeParent:function(g,e,a,b){var f=g.parentNode;var c=null;if(a!=null&&a>=0&&b!=null&&b.length>0){var d=$$(b,null,e);if(a<(d.length)){c=d[a]}}f.removeChild(g);if(c!=null){e.insertBefore(g,c)}else{e.appendChild(g)}},destroy:function(a){a=$(a);if(a&&a.parentNode){a.parentNode.removeChild(a)}},create:function(tag,id,cls,options){if(!tag){return null}var el=document.createElement(tag);if(options){for(var key in options){el.setAttribute(key,options[key])}if(options.innerHTML){el.innerHTML=options.innerHTML}if(options.text){el.text=options.text}if(options.onclick){var oc=options.onclick;if(typeof options.onclick=="string"){oc=function(event){eval(options.onclick);return false}}el.onclick=oc}}if(id){el.id=id}if(cls){el.className=cls}return el},appendNewNode:function(a,f,b,d,c){if(!a){return null}var e=Ramius.nodeUtils.create(a,f,b,c);if(d){d.appendChild(e)}return e},isString:function(a){if(typeof a=="string"){return true}return false},getPreviousSibling:function(a){a=a.previousSibling;while(a&&(!a.nodeValue||a.nodeValue==" ")&&!a.tagName){a=a.previousSibling}return a},getNextSibling:function(a){a=a.nextSibling;while(a&&(!a.nodeValue||a.nodeValue==" ")&&!a.tagName){a=a.nextSibling}return a},findSiblingByDirectionByClassName:function(e,d,b){if(!e){return null}var c=e,a=null;if(b=="previousSibling"){a=0}else{if(b=="nextSibling"){a=1}else{return null}}while(c=(a==0)?c.previousSibling:c.nextSibling){if(c.className&&$hc(c,d)){break}}return c},isHidden:function(a){if(!a||!a.style){return null}if($D.getStyle(a,"visibility")=="hidden"||$D.getStyle(a,"display")=="none"){return true}return false},evalScripts:function(c){if(c!=null&&typeof c=="object"){var a=c.getElementsByTagName("script");for(var b=0;b<a.length;b++){(function(d){var f=(document.getElementsByTagName("head")[0]||document.body);var e=$CE("script",null,null,f,{type:"text/javascript",text:d.innerHTML});f.removeChild(e)})(a[b])}}}};Ramius.ui={addGroupTriggerByClassName:function(b,a,m){var e=null;if(!m){m={}}var i=m.hl_cls?m.hl_cls:"rm-highlight";var j=m.el_cls?m.el_cls:"hover";var d=m.p_node?m.p_node:null;var g=m.do_event?m.do_event:"mouseover";var c=m.undo_event?m.undo_event:"mouseout";var f=m.undo_timeout?m.undo_timeout:150;var h=null;function l(){if(h){window.clearTimeout(h);h=null}Ramius.nodeUtils.addClass(b,j);e=$$(a,d);for(var n=(e.length-1);n>=0;n--){Ramius.nodeUtils.addClass(e[n],i)}}function k(){Ramius.nodeUtils.removeClass(b,j);if(!e){return}for(var n=(e.length-1);n>=0;n--){Ramius.nodeUtils.removeClass(e[n],i)}e=null}YAHOO.util.Event.addListener(b,g,l);if(f<=0){YAHOO.util.Event.addListener(b,c,k)}else{YAHOO.util.Event.addListener(b,c,function(){h=setTimeout(k,f)})}},fadeAfter:function(b,c){var a=$(b);if(a!=null&&a.parentNode!=null){a=a.parentNode}window.setTimeout(function(d){if(a!=null&&a.parentNode!=null){var e=new $A(a,{opacity:{to:0}},1,YAHOO.util.Easing.easeOut);e.onComplete.subscribe(function(){a.parentNode.removeChild(a)});e.animate()}},c)},setHoverClass:function(b,a){if(!b){return}a=(a||"hover");$E.on(b,"mouseover",function(c){$ac(b,a)});$E.on(b,"mouseout",function(c){if(!b.lockhover){$rc(b,a)}})},setHoverLock:function(b,a){if(typeof b=="string"){b=$(b)}if(!b){return}if(a){b.lockhover=true}else{setTimeout(function(){b.lockhover=false},100)}},setActiveClass:function(b,a){if(!b){return}a=(a||"active");$E.on(b,"mousedown",function(c){$ac(b,a)});$E.on(b,"mouseup",function(c){$rc(b,a)});$E.on(b,"mouseout",function(c){$rc(b,a)})},setBatchHoverByClassName:function(d,a){if(!d){return}var c=$$(d);for(var b=(c.length-1);b>=0;b--){Ramius.nodeUtils.setHoverClass(c[b],a)}},getElementPosition:function(c,a){var d=curtop=0,b=null;if(c.offsetParent){do{d+=c.offsetLeft;curtop+=c.offsetTop}while((c=c.offsetParent)&&(a==null||(a!=null&&a!=c)))}return[d,curtop]},scrollToElement:function(d,a,j){if(j==null){j={}}if(a==null){a=window}var i=-1,e=-1,c=-1;var h=parseInt(d.clientHeight||d.offsetHeight);var g=parseInt($D.getStyle(d,"margin-top"))+parseInt($D.getStyle(d,"margin-bottom"));if(isNaN(g)){g=0}var f=j.top_offset!=null&&j.top_offset>0?j.top_offset:0;if(window===a){i=parseInt(document.documentElement.scrollTop||document.body.scrollTop);e=$D.getViewportHeight();c=$D.getY(d)}else{i=a.scrollTop;e=parseInt(a.clientHeight||a.offsetHeight);c=Ramius.ui.getElementPosition(d,a)[1]}if((c+h)>(i+e)||(c)<(i+f)){var b=c-f;if(a===window){a.scroll(0,b)}else{a.scrollTop=b}}}};Ramius.formUtils={unicodeNumbersToInt:function(a){if(a>=48&&a<=57){return a-48}if(a>=96&&a<=105){return a-96}return -1},lockMaxValue:function(d,b){if(!numsOnly(d)){return false}var a=Ramius.formUtils.unicodeNumbersToInt(d.keyCode);var c=d.srcElement;if(c&&c.value){if(b>=(a+(parseInt(c.value)*10))){return true}else{Event.stop(d)}}return false},isValueInRange:function(e,c,a){var d=(e.srcElement||e.target);if(d&&d.value){var b=parseInt(d.value);if((!c||c=="")&&(!a||a=="")){return 3}if(c&&parseInt(c)>b){return 1}if(a&&parseInt(a)<b){return 2}return 0}else{return -1}},validateEmail:function(b){var a=Ramius.formUtils.getValue(b);return Ramius.formUtils.validate(a,/^\s*[a-zA-Z][-_.a-zA-Z0-9]*@[a-zA-Z0-9]([-a-zA-Z0-9]*\.)+[a-zA-Z]+\s*$/)},validateEmailDomain:function(b){var a=Ramius.formUtils.getValue(b);return Ramius.formUtils.validate(a,/^\s*[a-zA-Z0-9]([-a-zA-Z0-9]*\.)+[a-zA-Z]+\s*$/)},validateUrl:function(b){var a=Ramius.formUtils.getValue(b);return Ramius.formUtils.validate(a,/^\s*([a-zA-Z0-9]+:\/\/)?[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(:[0-9]+)?([\/\?#].*)?\s*$/)},validateFullUrl:function(b){var a=Ramius.formUtils.getValue(b);return Ramius.formUtils.validate(a,/^\s*[a-zA-Z0-9]+:\/\/[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(:[0-9]+)?([\/\?#].*)?\s*$/)},validateUncUrl:function(e){var b=Ramius.formUtils.getValue(e);var c=Ramius.formUtils.validate(b,/^\s*([a-zA-Z0-9]+:\/\/)?[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z0-9]+(:[0-9]+)?([\/\?#].*)?\s*$/);var d=Ramius.formUtils.validate(b,/^\s*([\/]{1}|(file:[\/]+)){1}(\/[^<>:"\/\\\|\?\*]+)+[\/]?\s*$/);var a=Ramius.formUtils.validate(b,/^\s*\\(\\[^<>:"\/\\\|\?\*]+)+[\\]?\s*$/);return c||d||a},validateDay:function(b,c){var a=Ramius.formUtils.getValue(b);var e=Ramius.formUtils.getValue(c);if(e<1||e>31){return false}if((a==3||a==5||a==8||a==10)&&e>30){return false}if(a==1&&e>29){return false}return true},validateYear:function(b){var a=Ramius.formUtils.getValue(b);if(a<0){return false}return true},validate:function(b,a){return(!b.match(a))?false:true},getValue:function(a){var b="";switch(typeof(a)){case"string":case"boolean":case"number":b=""+a;break;case"object":b=a.value;break;case"function":b=a();break}return b},setStaticAutoComplete:function(l,e,h,f){if(!l||!e){return}if(!f){f={}}var a;var c=(f.delim||"\r\n");var i=f.parse_function;var b=(f.animate||false);var d=(f.maxResults||25);var m=(f.delay||3);var k=(f.highlight||true);var j=(f.hl_cls||"");var g=(f.query_cls||"rm-ac_query_hl");Ramius.ajax.request(e,{onComplete:function(o){if(i){a=i(o.responseText)}else{a=o.responseText.split(c)}var n=new YAHOO.widget.DS_JSArray(a);var p=new YAHOO.widget.AutoComplete(l,h,n);p.animVert=b;p.animHoriz=b;p.maxResultsDisplayed=d;p.autoHighlight=k;p.highlightClassName=j;p.queryDelay=m;p.formatResult=function(q,u){var r="",t="",s=q[0].indexOf(u);if(s>0){r=q[0].substr(0,s-1)}t=q[0].substr(s+u.length,q[0].length);return r+"<span class='"+g+"'>"+u+"</span>"+t}}})},maxLength:function(c,e,a,h,d,b){var g=$(c);if(!b){b={}}if(g){g.checklength=function(){Ramius.formUtils.checkLength(null,[g,e,a,b,d])};$E.on(g,"keydown",Ramius.formUtils.capKey,[g,e,d]);$E.on(g,"keyup",Ramius.formUtils.checkLength,[g,e,a,b,d]);Ramius.formUtils.checkLength(null,[g,e,a,b,d],true)}},capKey:function(a,i){var f=[8,9,33,34,35,36,37,38,39,40,46,110,127,189];var b=a.keyCode||a.which;var c=i[0],e=i[1],d=i[2];if(c&&e&&e>0){var h=c.value;var g=h.length;if(g>=e&&!d&&!f.contains(b)){Event.stop(a);return false}}},checkLength:function(b,j,c){var d=j[0],g=j[1],a=$(j[2]),k=j[3],f=j[4];var e=d.value;if(!k){k={}}if(k.preCheckLength){k.preCheckLength()}if(k.preLengthFormat){e=k.preLengthFormat(e)}if(d&&g>0){if(!f&&g<e.length){if(err_msg&&FormValidation&&!c){var i=[["",d,err_msg]];FormValidation.showErrorModal(i,{no_description:true})}d.value=e.substr(0,g)}if(a){if(f||g>=e.length){var h=g-e.length;a=$rh(a,(h).toString());if(f&&h<0){f=$rh(f,(k.shortCount?h:0-h).toString());if(!$hc(d,"rm-limitExceeded")){$ac(d,"rm-limitExceeded")}if(!$hc(a.parentNode.parentNode,"rm-limitExceeded")){$ac(a.parentNode.parentNode,"rm-limitExceeded")}}else{if(f){$rc(d,"rm-limitExceeded");$rc(a.parentNode.parentNode,"rm-limitExceeded")}}}}}},serializeParams:function(e){var h=$(e);if(!h){return}var c=h.elements?h.elements:[];var g="";for(var a=0;a<c.length;a++){var b=Ramius.textUtils.trim(c[a].tagName.toLowerCase()),d=c[a].type?c[a].type.toLowerCase():"";if(b=="fieldset"){c=Ramius.textUtils.stripAll(c,c[a])}}for(var a=0;a<c.length;a++){if(!c[a].disabled&&Ramius.formUtils.getFieldValue(c[a])!=null){g+=c[a].name;g+="=";g+=Ramius.formUtils.getFieldValue(c[a]);if(a<(c.length-1)){g+="&"}}}return g},getFieldValue:function(d,a){if(!d||!d.tagName){return null}var c=d.tagName.toLowerCase();var b=(d.type)?d.type.toLowerCase():null;var e=null;switch(c){case"input":switch(b){case"radio":if(d.checked){e=d.value}break;case"checkbox":e=d.checked;break;case"button":case"submit":case"hidden":case"password":case"text":e=d.value;default:break}break;case"textarea":e=d.value;break;case"select":e=d.options[d.selectedIndex].value;break;default:break}if(b!=null&&b!="checkbox"&&a&&e!=null&&e.length>0){e=Ramius.textUtils.trim(e)}return e},setFieldValue:function(b,c){var a=b.tagName.toUpperCase();if(a=="INPUT"){b.value=c}else{if(a=="SELECT"){if(c>b.options.length){b.value=c}else{b.selectedIndex=c}}}}};Ramius.textUtils={trim:function(a){if(!a){return""}return a.replace(/^\s+/,"").replace(/\s+$/,"")},trimLength:function(f,e,d){if(f==null){return""}var b=f.replace(/^\s+/,"");if(b.length<e){return b.replace(/\s+$/,"")}else{var c=b.charAt(e);b=b.substr(0,e);if(d&&c.replace(/[\s]/,"")!=""){var a=b.search(/[\s]+[^\s]*$/);if(a>=1){b=b.substr(0,a)}}return b.replace(/\s+$/,"")}},isEmpty:function(a){if(!a||!a.length||!Ramius.textUtils.trim(a).length){return true}return false},stripFirst:function(a,e){var b=[];for(var c=0,d=false;c<a.length;c++){if(a[c]==e&&!d){d=true;continue}b[b.length]=a[c]}return b},stripAll:function(a,d){var b=[];for(var c=0;c<a.length;c++){if(a[c]!=d){b[b.length]=a[c]}}return b},dateFormat:function(e,f){var g=new Date(e);var h=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");var a=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var c="";if(f.indexOf("date")>=0){c+=h[g.getDay()];c+=", "+a[g.getMonth()]+" "+g.getDate();c+=", "+g.getFullYear()}if(f.indexOf("time")>0){if(c.length>0){c+=" "}var b=g.getHours()>12?g.getHours()-12:g.getHours();if(b<1){b=12}c+=b+":";c+=g.getMinutes()<10?"0"+g.getMinutes():g.getMinutes();if(f.indexOf("fulltime")>0){c+=":";c+=g.getSeconds()<10?"0"+g.getSeconds():g.getSeconds()}c+=g.getHours()<12?" AM":" PM"}return c},unescapeHtml:function(b){if(b==null){return""}var a=document.createElement("div");a.innerHTML=b;if(a.innerText){return a.innerText}return a.textContent},escapeRegEx:function(a){if(a==null){return a}return a.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")},simpleWhiteSpace:function(a){if(!a){return""}return a.replace(/[\s|\t|\n]+/g," ")}};Ramius.jsLog={log_count:0,createJSLog:function(){Ramius.jsLog.log=Ramius.nodeUtils.appendNewNode("DIV","js_log","",document.body);new $DD(Ramius.jsLog.log)},addMsg:function(a){if(!Ramius.jsLog.log){Ramius.jsLog.createJSLog()}Ramius.jsLog.log.innerHTML="<div>"+Ramius.jsLog.log_count+": "+a+"</div>"+Ramius.jsLog.log.innerHTML;Ramius.jsLog.log_count++}};var dropzones=[];Ramius.dragDrop={resize_functions:[],resetting:false,pullers:null,cols:null,colsID:null,settings:null,stored_width:null,registerResizeFunction:function(a){Ramius.dragDrop.resize_functions[Ramius.dragDrop.resize_functions.length]=a},setDrag:function(i,d){if(!d){return null}var l=new YAHOO.util.DD(i);var c=(d.exclude_el_cls||[]);var f=(d.handle_exceptions||[]);if(!d.src_opacity){d.src_opacity=50}if(!d.col_ajax_){d.col_ajax_=blankFunction}if(!d.row_ajax_){d.row_ajax_=blankFunction}var j=(d.col_parent_drag_cls||"rm-showAll");var g=0;var a=$("rm-ddShadow");if(a==null){a=$CE("div","rm-ddShadow",null,document.body);g=parseInt($D.getStyle(a,"height"));a.shown=0;$E.on(window,"click",function(m){if(window.dragging_object!=null){window.dragging_object.endDrag(m)}})}var e=null;i.style.zoom=1;l.startDrag=function(u,s){if(typeof d.startDrag=="function"){d.startDrag(i,l)}window.dragging_object=this;var U=this.getEl();U.style.opacity=(d.src_opacity/100);this.lastFilter=$D.getStyle(U,"filter");U.style.filter="alpha(opacity="+d.src_opacity+")";this.startParent=U.parentNode;this.nextSibling=U.nextSibling;if(e==null){e=U.cloneNode(true);e.id="";U.parentNode.insertBefore(e,U)}var J=$D.getViewportWidth();var A=(U.clientWidth||U.offsetWidth);var C=Math.floor(J/3);var F=(C<A)?C:A;U.style.position="absolute";var H=$D.getX(U);if((H+F)<u){H=(u-Math.floor(F/2));if(H>J){H=H-((H-J))}U.style.left=H+"px";H=H+(d.left_constraint_offset||5);this.setDelta(u-H,this.deltaY)}U.style.width=F+"px";U.style.zIndex="999";var I=H;var r=(J-(H+F+(d.left_constraint_offset||5)));l.maintainOffset=false;l.resetConstraints();l.setXConstraint(I,r);l.maintainOffset=true;dropzones=[];var K=$(d.col_parent);if(K!=null){$ac(K,j)}var V=null;if(typeof d.col=="string"){V=$$(d.col,d.col_el,d.col_parent)}else{if(typeof d.col=="object"){if(d.col instanceof Array){V=d.col}else{V=[d.col]}}}var t=V.length;this.tallestCenterColumn=0;for(var M=0;M<t;M++){var L=V[M];var D=$D.getX(L);var q=L.clientWidth;var P=(L.clientHeight||L.offsetHeight);var B=dropzones.length;dropzones[B]=[D,q,L,[],$D.getY(L),P];if(M>0&&M<(t-1)&&P>this.tallestCenterColumn){this.tallestCenterColumn=P}var W=$$(d.row,d.row_el,L);for(var N=0;N<W.length;N++){var O=W[N],p=false;for(var R=0;R<c.length;R++){if($hc(O,c[R])||$D.getStyle(O,"display")=="none"){p=true;break}}if(O===e||p){continue}var z=$D.getY(O);var G=O.clientHeight;var E=z+(Math.floor((O.offsetHeight)/2));var v=dropzones[B][3].length;var T=O===U;var Q=parseInt($D.getStyle(O,"margin-bottom"));var S=parseInt($D.getStyle(O,"margin-top"));dropzones[B][3][v]=[O,G,z,T,E,D,q,Q,S]}}};l.setHighlight=function(n,m,o){if(this.startParent===n&&this.nextSibling==null){return}this.dropElement=n;this.dropRef=m;this.dropIsColumn=o;this.highlightDropzone()};l.highlightDropzone=function(){if(this.dropElement==null||this.dropElement===this.focused_drop_zone){return}if(a.shown==0){a.style.display="block";a.shown=1}if(this.dropIsColumn){this.dropElement.appendChild(a);this.dropIsHeader=(this.dropRef===dropzones[0])}else{if(a.nextSibling!=this.dropElement){this.dropElement.parentNode.insertBefore(a,this.dropElement)}}this.focused_drop_zone=this.dropElement};l.hideDropzone=function(m){if(this.focused_drop_zone==null){return}this.focused_drop_zone=null;if(a.shown==1){a.style.display="none";a.shown=0}};l.onDrag=function(u,o){var z=$E.getPageX(u),v=$E.getPageY(u);if(this.dropRef!=null){if(!this.dropIsColumn){var p=this.dropRef[2];var m=p+this.dropRef[1];var q=this.dropRef[5];var n=q+this.dropRef[6];if(z>=q&&z<=n&&v>=p&&v<=m){return}}}this.dropElement=null;this.dropRef=null;this.dropIsColumn=false;if(v<dropzones[0][4]){this.setHighlight(dropzones[0][2],dropzones[0],true);return}else{if(v>dropzones[dropzones.length-1][4]){this.setHighlight(dropzones[dropzones.length-1][2],dropzones[dropzones.length-1],true);return}}for(var s=(dropzones.length-1);s>=0;s--){var A=dropzones[s][0]+dropzones[s][1];if(z>dropzones[s][0]&&z<A){if((s==0&&(this.dropIsHeader&&dropzones[s][3].length==0&&v<(dropzones[s][4]+g+dropzones[s][5])))||s==dropzones.length-1&&v>(dropzones[s][4]+dropzones[s][5])||s>0&&s<dropzones.length-1&&dropzones[s][3].length==0&&v>dropzones[s][4]&&v<(this.tallestCenterColumn+dropzones[s][4])){this.setHighlight(dropzones[s][2],dropzones[s],true)}else{for(var r=(dropzones[s][3].length-1);r>=0;r--){var t=dropzones[s][3][r][2]+dropzones[s][3][r][1]+dropzones[s][3][r][7]+dropzones[s][3][r][8];if(!dropzones[s][3][r][3]){if(r==dropzones[s][3].length-1&&v>dropzones[s][3][r][2]){if(v<dropzones[s][3][r][4]&&(r==0||(r>0&&!dropzones[s][3][r-1][3]))){this.setHighlight(dropzones[s][3][r][0],dropzones[s][3][r],false)}else{if((s>0&&s<dropzones.length-1&&v>dropzones[s][3][r][4]&&v<(dropzones[s][4]+this.tallestCenterColumn))||(s==dropzones.length-1&&v>dropzones[s][3][r][4]&&v<(dropzones[s][3][r][2]+dropzones[s][3][r][1]))||(s==0&&v>dropzones[s][3][r][4]&&v<(dropzones[s][3][r][2]+dropzones[s][3][r][1]+g+dropzones[s][3][r][7]))){this.setHighlight(dropzones[s][2],dropzones[s],true)}}}else{if(v>dropzones[s][3][r][2]&&v<t){if(v<dropzones[s][3][r][4]&&(r==0||r>0&&!dropzones[s][3][r-1][3])){this.setHighlight(dropzones[s][3][r][0],dropzones[s][3][r],false)}else{if(!dropzones[s][3][r+1][3]){this.setHighlight(dropzones[s][3][r+1][0],dropzones[s][3][r+1],false)}}}else{if(r==0&&v<dropzones[s][3][r][2]){this.hideDropzone()}}}}}}}else{if(a.parentNode==dropzones[s][2]){this.hideDropzone()}}}};l.endDrag=function(p){if(typeof d.endDrag=="function"){d.endDrag(i,l)}window.dragging_object=null;var m=this.getEl();m.style.opacity="";m.style.filter=this.lastFilter;m.style.position="";m.style.width="";m.style.left="";m.style.top="";m.style.zIndex="";var n=$(d.col_parent);if(n!=null){$rc(n,j)}if(e!=null&&e.parentNode!=null){e.parentNode.removeChild(e);e=null}var o=this.dropElement;if(o!=null){var q=m.parentNode;if(this.dropIsColumn){o.appendChild(m);d.col_ajax_(m,o,q)}else{o.parentNode.insertBefore(m,o);d.row_ajax_(m,o,q)}if(m.redraw!=null){m.redraw()}}this.hideDropzone()};if(d.el_handle){var b=$$(d.el_handle,d.el_handle_el,i)[0];l.setHandleElId(b)}for(var k=(f.length-1);k>=0;k--){var h=$$(f[k][0],f[k][1],i)[0];if(h!=null){l.addInvalidHandleClass(f[k][0])}}},resetPullers:function(d,a){var e="rm-centredContent";var c=(this.settings!=null)?this.settings:{};c.centred_content_cls=e;c.cols=d;for(var b=0;b<(a.length);b++){$rc(a[b],"rm-puller-active")}if(d.length==3){if(d[0].style.width.indexOf("px")<0){if(d[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(a[0],d[0],d[1],c)}else{if(d[2].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(a[0],d[0],d[2],c)}}}if(d[2].style.width.indexOf("px")<0){if(d[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(a[1],d[1],d[2],c)}else{if(d[0].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(a[1],d[0],d[2],c)}}}}else{if(d.length==2){if(d[0].style.width.indexOf("px")<0&&d[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(a[0],d[0],d[1],c)}}}},addColumn:function(){var b=$$("rm-column","div","rm-columns");var e=$("rm-headerColumn"),d=$("rm-footerColumn");for(var a=0;a<b.length;a++){if(b[a]!=e&&b[a]!=d&&b[a].style.display=="none"){b[a].style.display="block";this.cols[this.cols.length]=b[a];this.settings.add_col_ajax(b[a].id);break}}if(this.cols.length>=3){$("rm-addColumn").style.display="none";var c=$("rm-delcol-2");if(c!=null){c.style.display="none"}}this.stored_width=0;this.resetPullers(this.cols,this.pullers);this.resetPage()},deleteColumn:function(c){var a=$(c);a.style.display="none";var f=$("rm-delcol-2");if(f!=null){f.style.display="block"}var d=$$("rm-pod","div",a);var e=[];for(var b=0;b<this.cols.length;b++){if(this.cols[b].id!=c){e[e.length]=this.cols[b]}}for(var b=0;b<d.length;b++){Ramius.nodeUtils.changeParent(d[b],e[e.length-1])}this.settings.delete_col_ajax(a.id);if(e.length<3){$("rm-addColumn").style.display="block"}this.cols=e;this.stored_width=0;this.resetPullers(this.cols,this.pullers);this.resetPage()},unlockColumn:function(e){if(!this.pullers||!this.cols||!this.pullers.length||!this.cols.length){return}var b=$("rm-columns");var c=$(e);$rc(c,"rm-lockedCol");var d=c.offsetWidth-1;var f=b.offsetWidth-1;col_per=Math.round(d*1000/f)/10;c.style.width=col_per+"%";var a=$$("rm-colWidthInput","input",c)[0];if(a!=null){a.disabled="true"}this.settings.set_size_ajax(c.id,"");this.stored_width=0;this.resetPullers(this.cols,this.pullers)},lockColumn:function(e){if(!this.pullers||!this.cols||!this.pullers.length||!this.cols.length){return}var b=$("rm-columns");var c=$(e);$ac(c,"rm-lockedCol");var d=c.offsetWidth;c.style.width=d+"px";var a=$$("rm-colWidthInput","input",c)[0];if(a!=null){a.disabled=null}this.stored_width=0;this.settings.set_size_ajax(c.id,d);this.resetPullers(this.cols,this.pullers)},initPuller:function(d,a,c,b){if(!b){b={}}if(!a||!d||!d.length){return}if(!b.set_size_ajax){b.set_size_ajax=blankFunction}this.pullers=a;this.cols=d;this.colsID=c;this.settings=b;this.resetPage(false,true)},resetPage:function(a,l){if(this.resetting){return}this.resetting=true;var c=$("rm-columns");if((a==null||!a)&&this.stored_width==document.body.clientWidth){this.resetting=false;return}this.stored_width=document.body.clientWidth;var g="rm-centredContent";var d=$("rm-pageWrapper");var b=this.pullers;var f=this.cols;var q=this.colsID;var x=this.settings;var u=0;c.style.width="100%";d.style.minWidth="823px";var B=c.offsetWidth-1;var k=c.offsetWidth-10;var j=10;var v=[];var m=-1;var r=(function(e,E){var I=(e.keyCode||e.which);var F=E.input,C=E.column;var J=E.focus;var G=J.cols;var D=J.pullers;var i=(F!=null)?parseInt(F.value):null;if((I==13||I==1||e.type=="blur")&&i!=null&&!isNaN(i)){if(i>2000){i=2000}else{if(i<75){i=75}}F.value=i;var H=i-C.offsetWidth;if(H!=0&&C.style.width.indexOf("px")>0){C.style.width=i+"px";J.resetPage(true);J.settings.set_size_ajax(C.id,i)}}});var n=false;for(var t=0;t<(f.length);t++){if(f[t].style.width.indexOf("px")>0){k-=f[t].offsetWidth;j+=f[t].offsetWidth}else{v[++m]=f[t]}if(n){j+=14;k-=14}n=true}for(var t=0;t<(b.length);t++){b[t].style.background.color="white"}if(m>=0){if(k<v.length*225){k=v.length*225}j+=k;var h=k*100/j;if(!l){for(var t=0;t<=m;t++){var p=h/(m+1);p=(Math.round(p*10)/10);v[t].style.width=p+"%"}}}if(j>c.offsetWidth){c.style.width=j+"px";d.style.minWidth=(j+43)+"px"}x.centred_content_cls=g;x.cols=f;function z(e){$ac(f[e],"rm-lockedCol");var i=$$("rm-colWidthInput","input",f[e])[0];if(i!=null){i.value=parseInt(f[e].offsetWidth||f[e].clientWidth);i.disabled=null}}if(f.length==3&&b.length>0){if(f[0].style.width.indexOf("px")<0){if(f[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(b[0],f[0],f[1],x)}else{if(f[2].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(b[0],f[0],f[2],x)}}}if(f[2].style.width.indexOf("px")<0){if(f[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(b[1],f[1],f[2],x)}else{if(f[0].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(b[1],f[0],f[2],x)}}}}else{if(f.length==2){if(f[0].style.width.indexOf("px")<0&&f[1].style.width.indexOf("px")<0){Ramius.dragDrop.setPuller(b[0],f[0],f[1],x)}}}for(var t=0;t<(f.length);t++){if(f[t].style.width.indexOf("px")>=0){z(t)}var A=$$("rm-resize","div",f[t]);if(A.length>0){var s=$$("rm-colWidthInput","input",A[0])[0];if(s!=null){s.value=f[t].offsetWidth}if(s!=null){$E.on(s,"keydown",Ramius.formUtils.numericOnly);$E.on(s,"keypress",r,{input:s,column:f[t],focus:this});$E.on(s,"blur",r,{input:s,column:f[t],focus:this})}}}this.resetting=false;for(var t=0;t<Ramius.dragDrop.resize_functions.length;t++){try{Ramius.dragDrop.resize_functions[t].call(window)}catch(w){}}var o=$$("rm-pod","div",$("rm-columns"));if(o!=null){for(var t=0;t<o.length;t++){if(o[t].redraw!=null){o[t].redraw()}}}},setPuller:function(f,r,i,o){$D.generateId(f);var m=YAHOO.util.DragDropMgr.getDDById(f.id);if(m==null){m=new $DD(f.id,"puller_group")}m.setYConstraint(0,0);m.setXConstraint(0,0);$ac(f,"rm-puller-active");if(!o){o={}}var s=o.start_pos||-1;var d=o.preSib_start_width||-1;var a=o.nextSib_start_width||-1;var q=o.puller_offset||-1;var e=o.newPreSib_width||-1;var l=o.min_pod_width||225;var k=o.max_pod_width||"none";var h=o.centred_content_cls||"rm-centredContent";var p=-1;var n,b;var c=$("rm-columns");var g=(o.cols||$$("rm-column","div","rm-columns"));var j=$("rm-columns");m.b4Mousedown=function(t){};m.startDrag=function(){if(o.startFunc){o.startFunc()}s=YAHOO.util.DragDropMgr.getPosX(f);var t=r.offsetWidth+i.offsetWidth;if(r||i){k=t-l;if(r){r.style.maxWidth=k+"px";r.style.minWidth=l+"px"}if(i){i.style.maxWidth=k+"px";i.style.minWidth=l+"px"}}if(r){d=r.offsetWidth}if(i){a=i.offsetWidth}n=parseInt(i.style.width);b=parseInt(r.style.width)};m.onDrag=function(t,w){p=$E.getPageX(t);q=(p-s);f.style.left="auto";f.style.position="static";e=d+q;newNextSibWidth=a-q;var v=$$("rm-colWidthInput","input",r)[0];var u=$$("rm-colWidthInput","input",i)[0];if(e<l){e=l;newNextSibWidth=(a+(d-l))}else{if(newNextSibWidth<l){newNextSibWidth=l;e=(d+(a-l))}}if(r&&i&&e>=l&&newNextSibWidth>=l){r.style.width=e+"px";i.style.width=newNextSibWidth+"px";if(v!=null){v.value=e}if(u!=null){u.value=newNextSibWidth}}};m.endDrag=function(){Ramius.dragDrop.resetting=true;if(o.endFunc){o.endFunc(this)}i.style.maxWidth="";r.style.maxWidth="";i.style.minWidth="";r.style.minWidth="";if(newNextSibWidth>k){i.style.width=k+"px"}if(e>k){r.style.width=k+"px"}if(newNextSibWidth<l){i.style.width=l+"px"}if(e<l){r.style.width=l+"px"}var u=0;for(var v=0;v<(g.length);v++){var t=(Math.round(((g[v].offsetWidth/c.offsetWidth)*100)*10)/10);if(g[v]==i||g[v]==r){g[v].style.width=t+"%"}if((t-(g[v].offsetWidth/j.offsetWidth*100))>=0.5){g[v].style.width=Math.round(t)+"%"}}Ramius.dragDrop.resetting=false}}};var $=function(a){if(typeof a=="object"){return a}if(typeof a=="string"){return document.getElementById(a)}return null};var $$=Ramius.nodeUtils.getElementsByClassName;var $$n=Ramius.nodeUtils.getElementsWithoutClassName;var $CE=Ramius.nodeUtils.appendNewNode;var blankFunction=function(){};var $l=Ramius.jsLog.addMsg;var $D=YAHOO.util.Dom;var $E=YAHOO.util.Event;var $DD=YAHOO.util.DD;var $A=YAHOO.util.Anim;var $B=YAHOO.widget.Button;var $S=YAHOO.widget.Slider;var $fs=Ramius.nodeUtils.getSiblingbyClassName;var $fc=Ramius.nodeUtils.getFirstChildByClassName;var $hc=Ramius.nodeUtils.hasClass;var $ac=Ramius.nodeUtils.addClass;var $rc=Ramius.nodeUtils.removeClass;var $rdd=Ramius.dragDrop.setDrag;var $rf=Ramius.formUtils;var $rn=Ramius.nodeUtils;var $ps=Ramius.nodeUtils.getPreviousSibling;var $ns=Ramius.nodeUtils.getNextSibling;var $rh=Ramius.nodeUtils.replaceHTML;Ramius.ui.setCSS=function(a,c){for(var b in c){if(typeof b=="string"){a.style[b]=c[b]}}};Ramius.ui.setRelativeOffset=function(h,b,d){if(!b||!h){return false}if(!d){d={}}var c=(d.xoffset||20);var e=(d.yoffset||20);var g=b,a=y=0;if(g.offsetParent){a=g.offsetLeft;y=g.offsetTop;while(g=g.offsetParent){a+=g.offsetLeft;y+=g.offsetTop}}var f=document.body.clientWidth;a=(a+(parseInt(b.offsetWidth)/2))-c;y=y+e;h.style.left=a+"px";h.style.top=y+"px"};Ramius.nodeUtils.getNextSiblingTag=function(b){var a=b.nextSibling;while(a&&!a.tagName){a=a.nextSibling}return a};Ramius.ui.setCSS=function(a,c){for(var b in c){if(typeof b=="string"){a.style[b]=c[b]}}};Ramius.nodeUtils.findChildrenByTagName=function(a,c){if(!c){return[]}var e=c.childNodes;var d=[];for(var b=0;e&&b<e.length;b++){if(e[b].tagName==a.toUpperCase()){d[d.length]=e[b]}}return d};Ramius.nodeUtils.getChildrenByClassName=function(a,d){if(!d||!a){return[]}var e=d.childNodes;var c=[];for(var b=0;e&&b<e.length;b++){if($hc(e[b],a)){c[c.length]=e[b]}}return c};Ramius.nodeUtils.getElementsWithoutClassName=function(d,c,b){if(!c||typeof c!="string"||c.length==0){c="*"}var a=($(b)||document.body).getElementsByTagName(c);return Ramius.nodeUtils.noClass(a,d)};Ramius.nodeUtils.noClass=function(e,a){var c=[],d=e.length;for(var b=0;b<d;b++){if(e[b].tagName&&!$hc(e[b],a)){c[c.length]=e[b]}}return c};Ramius.ui.extensibleTextField=function(c,l,m,x){if(!x){x={}}var h=$(c),k=$(l),i=$(m);if(!k.id||k.id.length==0){$D.generateId(k)}var z=new YAHOO.util.DDProxy(k.id);var r,q,v,b,e,p;var f=(x.expWrapperClassname||"rm-expandingWrapper");var g=(x.fullScreenModeClassname||"rm-expFullScreenMode");var A=(x.sizeIncrement||100);var a=80;var n=$$((x.incrementerClass||"expIncrement"),"span",h)[0];var d=$$((x.decrementerClass||"expDecrement"),"span",h)[0];var o=$$((x.fullScreenClass||"expFull"),"span",h)[0];z.setXConstraint(0,0);z.setYConstraint(0,0);x.animate=true;z.startDrag=function(t){r=YAHOO.util.DragDropMgr.getPosX(k);q=YAHOO.util.DragDropMgr.getPosY(k);var s=j();v=s.w;b=s.h;$ac(h,f)};z.onDrag=function(s){e=v+($E.getPageX(s)-r);p=b+($E.getPageY(s)-q);h.style.width=e+"px";h.style.height=p+"px"};z.endDrag=function(){$rc(h,f);u(e,p)};$E.on(n,"click",function(s){var t=j();u(t.w+A,t.h+A)});$E.on(d,"click",function(s){var t=j();u(t.w+(A*-1),t.h+(A*-1))});$E.on(o,"click",function(s){$ac(h,g);var t=j();p=t.h;e=t.w;u(Math.round($D.getViewportWidth()-100),Math.round($D.getViewportHeight()-100));i.focus()});$E.on(i,"blur",function(s){if($hc(h,g)){$rc(h,g);u(e,p)}});function j(){var s={};s.w=parseInt($D.getStyle(h,"width"));if(isNaN(s.w)){s.w=h.offsetWidth}s.h=parseInt($D.getStyle(h,"height"));if(isNaN(s.h)){s.h=h.offsetHeight}return s}function u(w,t){h.style.width=w+"px";h.style.height=t+"px";if(x.animate){var s=new $A(i,{width:{to:(w-a)},height:{to:t}},0.3,YAHOO.util.Easing.easing);s.animate()}else{i.style.width=(w-a)+"px";i.style.height=t+"px"}}};var Event={stop:function(a){if(a.preventDefault){a.preventDefault();a.stopPropagation()}else{a.returnValue=false;a.cancelBubble=true}}};Ramius.formUtils.sixentCharsetOnly=function(a){var b=[8,9,13,37,96,127,39,189,109,110,35,36,190];return Ramius.formUtils.validateCharset(a,Ramius.SIXENT_CHARSET,b)};Ramius.formUtils.subdomainCharsetOnly=function(a){var b=[8,9,13,37,96,127,39,189,109,110,35,36,190];return Ramius.formUtils.validateCharset(a,Ramius.SUBDOMAIN_CHARSET,b)};Ramius.formUtils.captchaCharsetOnly=function(a){var b=[8,9,13,37,39,35,36];return Ramius.formUtils.validateCharset(a,Ramius.CAPTCHA_CHARSET,b)};Ramius.formUtils.validateCharset=function(e,h,f){if(!e||!h||!f){return false}var b=(e.srcElement||e.target);var d=(!e.keyCode)?e.which:e.keyCode;function c(j){var i=j.keyCode||j.which;if(i==16&&b.shiftPressed){b.shiftPressed=false;$E.removeListener(b,c)}}function g(j){var i=j.keyCode||j.which;if(i==18&&b.altPressed){b.altPressed=false;$E.removeListener(b,g)}}if(d==16){b.shiftPressed=true;$E.on(b,"keyup",c)}if(a==18){b.altPressed=true;$E.on(b,"keyup",g)}var a=String.fromCharCode(d);if(b.altPressed||(b.shiftPressed&&d>=46&&d<=57)||(!a.containsChars(h)&&!f.contains(d))){Event.stop(e);return false}return true};Ramius.formUtils.containsChars=function(c,b){for(var a=(b.length-1);a>=0;a--){var d=b.charAt(a);if(c.indexOf(d)>=0){return true}}return false};Ramius.formUtils.numericOnly=function(a){var d=window.event?window.event:a;var b=(a.srcElement||a.target);if(d.keyCode==0){key=d.which}else{key=d.keyCode}function c(g){var e=g.keyCode||g.which;if(e==16&&b.shiftPressed){b.shiftPressed=false;$E.removeListener(b,c)}}function f(g){var e=g.keyCode||g.which;if(e==18&&b.altPressed){b.altPressed=false;$E.removeListener(b,f)}}if(key==9){return true}if(key==16){b.shiftPressed=true;$E.on(b,"keyup",c)}if(key==18){b.altPressed=true;$E.on(b,"keyup",f)}if(b.shiftPressed||b.altPressed){Event.stop(d);return false}if((key==37)||(key==39)||(key==189)||(key==109)||(key==110)||(key==190)||(key==13)||(key==8)||(key>=46&&key<=57)||(key>=96&&key<=105)){return true}Event.stop(d);return false};Ramius.formUtils.mergeArray=function(c,a){if(!c){c=[]}if(!a){a=[]}var d=[];for(var b=0;b<c.length;b++){d[d.length]=c[b]}for(var b=0;b<a.length;b++){d[d.length]=a[b]}return d};Ramius.formUtils.uniqueMergeArray=function(f,a){if(!f){f=[]}if(!a){a=[]}var e=a.length;for(var d=0;d<e;d++){var c=false;for(var b=0;b<f.length;b++){if(f[b]==a[d]){c=true}}if(!c){f[f.length]=a[d]}}return f};Ramius.ui.createPopup=function(b,a){var d="";switch(a){case"print":d="height=450, width=600, menubar=no, screenX=100, screenY=100, scrollbars=yes, toolbar=yes, resizable=yes, status=no, directories=no";case"popup":default:break}window.open(b,null,d);return false};Array.prototype.contains=function(b){for(var a=(this.length-1);a>=0;a--){if(this[a]==b){return true}}return false};String.prototype.containsChars=function(b){for(var a=(b.length-1);a>=0;a--){var c=b.charAt(a);if(this.indexOf(c)>=0){return true}}return false};String.prototype.stripInvalidChars=function(a){if(!a&&!a.length){return this}var e="";for(var b=0;b<this.length;b++){var d=this.charAt(b);if(a.indexOf(d)>=0){e+=d}}return e};var collapseCls="rm-collapsed";var expandCls="rm-expanded";var EXPAND=0,COLLAPSE=1;Ramius.ui.Collapse={};Ramius.ui.Collapse.sxCollapse=function(g,d){if(g==null||g.length==0){return}if(d==null){d={}}var k=0;if(d.initialIndex<g.length){k=d.initialIndex}var c=d.collapse_speed||0.15;try{if(d.tarHeight==null){d.tarHeight=g[k].target.offsetHeight}}catch(j){}var b=g[g.length-1].trigger.parentNode;for(var h=0;h<g.length;h++){if(g[h].trigger!=null&&g[h].target!=null){g[h].trigger.state=(h==k)?EXPAND:COLLAPSE;g[h].idx=h;$E.on(g[h].trigger,"click",a,g[h])}}var l=0;function f(i,v,e,s,w,q,n,t,r,m){i.target.style.overflow="hidden";var u=c_anim=new $A(i.target,{height:{to:n}},t);i.target.style.height=q+"px";u.onStart.subscribe(function(){$rc(i.trigger,e);$ac(i.trigger,v);if(m!=null){m.animate()}});u.onComplete.subscribe(function(){i.target.style.overflow="auto";if(r!=null){i.target.style.display=r}$rc(i.target,w);$ac(i.target,s);--l});++l;return u}function a(n,q){if(l>0){return}if(q==null||q.trigger==null||q.target==null){return}var e=(k>-1&&k<g.length)?g[k]:null;var p=(q.trigger.state==COLLAPSE)?EXPAND:COLLAPSE;var o,m;if(p==EXPAND){if(e!=null&&e.target!=null&&e.trigger!=null){o=f(e,collapseCls,expandCls,null,d.expandClass,d.tarHeight,0,c,"none");e.trigger.state=COLLAPSE}m=f(q,expandCls,collapseCls,d.expandClass,null,0,d.tarHeight,c,null,o);q.target.style.display="block";q.trigger.state=EXPAND;k=q.idx;m.animate()}else{if(p==COLLAPSE&&e==q){var i=g[e.idx+1];if(e!=null&&e.target!=null&&e.trigger!=null&&i!=null){m=f(i,expandCls,collapseCls,d.expandClass,null,0,d.tarHeight,c,null);i.trigger.state=EXPAND;i.target.style.display="block";o=f(e,collapseCls,expandCls,null,d.expandClass,d.tarHeight,0,c,"none",m);e.trigger.state=COLLAPSE;k=(i==null)?-1:i.idx;o.animate()}}}}};function enableCollapse(c,t,f){var l,d,e,p,n;if(c==null){return}if(!f){f={}}d=$(f.override_id);if(!d){d=$fs(c,t);if(!d){tmp_=c;while(tmp_&&!d){d=$fs(tmp_,t);tmp_=tmp_.parentNode}}if(!d){d=$$(t)[0]}}if(!d){return}var i=parseInt(d.clientHeight||d.offsetHeight);var q=f.hover_expand;var s=f.exclude_class;var k=(f.sec_triggers||[]);var a=(f.collapseSpeed||(i/75)*0.1);if(a>0.15||a<=0){a=0.15}var g=f.collapse_timeout||-1;c.expandState=($D.getStyle(d,"display")=="none"||i==0)?collapseCls:expandCls;if(f.no_effects){if(f.f_action&&(f.f_action==expandCls||f.f_action==collapseCls)){c.expandState=f.f_action}if($hc(c,"rm-error")&&$hc(c,collapseCls)){$rc(c,collapseCls);$ac(c,expandCls)}}if(f.split_button){l=$rn.findSiblingByDirectionByClassName(c,"rm-splitBtn","previousSibling")}function h(w){if(w&&s){var m=(w.srcElement||w.target);var x=$rn.getParentNodeByClassName(m,s);if($hc(m,s)||x){return false}}if(!c.expandState&&d.style.display=="none"){c.expandState=collapseCls}if(!c.expandState||c.expandState==expandCls){z(w)}else{v(w)}function z(A){if(typeof f.preCollapse=="function"){f.preCollapse(c,d)}if(f.no_effects){if(f.use_visibility){d.style.visibility="hidden"}else{d.style.display="none";if(l){l.style.zIndex="1"}}}else{i=parseInt($D.getStyle(d,"height"));if(isNaN(i)||i<=0){i=parseInt(d.clientHeight||d.offsetHeight)}p=new $A(d,{height:{to:0}},a,YAHOO.util.Easing.easeOut);p.animate()}$rc(c,expandCls);$ac(c,collapseCls);if(f.xCls){$rc(c,f.xCls)}if(typeof f.postCollapse=="function"){f.postCollapse(c,d)}}function v(A){if(typeof f.preExpand=="function"){f.preExpand(c,d)}if(f.no_effects){if(f.use_visibility){d.style.visibility="visible"}else{d.style.display="block";if(l){l.style.zIndex="10"}}}else{if(d.style.display=="none"||i==0){i=parseInt($D.getStyle(d,"height"));if(isNaN(i)||i<=0){d.style.display="block";i=parseInt(d.clientHeight||d.offsetHeight);d.style.display="none";if(isNaN(i)||i<=0){d.style.height="auto";d.style.visibility="hidden";d.style.position="absolute";i=(d.offsetHeight||d.clientHeight);d.style.height="0px";d.style.visibility="visible";d.style.position="static"}}}p=new $A(d,{height:{from:0,to:i}},a,YAHOO.util.Easing.easeOut);p.onComplete.subscribe(function(){if(!f.fixed_height){d.style.height="auto"}d.style.display=""});p.animate()}$rc(c,collapseCls);$ac(c,expandCls);if(f.xCls){$ac(c,f.xCls)}if(typeof f.postExpand=="function"){f.postExpand(c,d)}}c.expandState=(c.expandState==collapseCls)?expandCls:collapseCls;return true}for(var o=(k.length-1);o>=0;o--){$E.on(k[o],"click",h)}var u=function(){if(c.expandState==collapseCls){h()}};var b=function(){if(c.expandState==expandCls){h()}};d.expand=c.expand=u;d.collapse=c.collapse=b;if(q&&c.expandState==collapseCls){$E.on(c,"mouseover",function(m){if(c.expandState==collapseCls){h(m)}else{Event.stop(m)}})}else{$E.on(c,"click",function(v){if(f.blurable){var m=v.target||v.srcElement;if(m==c||m.parentNode==c||((m.parentNode.parentNode==c||m.parentNode.parentNode.parentNode==c)&&(m.tagName=="IMG"||m.tagName=="DIV"||m.tagName=="BUTTON"||m.tagName=="SPAN"))){if(!c.expandState||c.expandState==expandCls){h(v)}else{setTimeout(h,5)}}else{if(!$rn.isChildOf(m,d)){Event.stop(v)}}}else{h(v)}})}if(g>-1){var j=(function(m){if(e){clearTimeout(e)}});var r=(function(m){e=setTimeout(function(){if(c.expandState==expandCls){h(m)}},g)});$E.on(c.parentNode,"mouseover",j);$E.on(c.parentNode,"mouseout",r);if(f.override_id!=null){$E.on(d,"mouseover",j);$E.on(d,"mouseout",r)}}if(f.blurable){$E.on(document,"click",function(v){var m=(v.srcElement||v.target);if(!$rn.isChildOf(m,d)){if(m==d||m.parentNode==d){Event.stop(v);return}if(c.expandState==expandCls){h(v)}}})}}Ramius.suggest={has_result:false,add:function(d,c,b,a){if(d&&c&&b){d.suggest=new Suggest(d,c,b,a);d.suggest.enable();$E.on(d,"focus",function(e){var f=(e.srcElement||e.target);Ramius.suggest.fetch(f)})}},myContacts:function(d,c,b,a){if(!a){a={}}a.fields=["search","name","id","url","thumb","type","details"];a.on_focus=true;Ramius.suggest.add(d,c,b,a);var e=true;if(d&&d.suggest){d.suggest.autoComplete.formatResult=function(h,l,i){if(h.type=="custom"){var n=h.details;if(Ramius.suggest.has_result){n+='<div class="rm-separator"></div><div class="rm-spacer"></div>';Ramius.suggest.has_result=false}return n}else{Ramius.suggest.has_result=true;var g=h.name;var k=g.toLowerCase().indexOf(l);var j=g.substring(0,k);var f=g.substring(k,k+l.length);var m=g.substring(k+l.length,g.length);if(h.thumb){img='<img src="'+h.thumb+'">'}var n='<div class="rm-suggestResult">'+img+' <span class="rm-suggestName">'+j+'<span class="rm-suggestMatch">'+f+"</span>"+m+'</span></div><a href="javascript:void(0);" onclick="Event.stop(event);getRmModal().openUrl(\'/views/privatemessage/new.jsp?user_id='+h.id+"','get',true);\" class=\"rm-emailContact\"></a>";return n}};d.suggest.autoComplete.autoHighlight=true;d.suggest.autoComplete.suppressInputUpdate=true;d.suggest.autoComplete.itemSelectEvent.fire=function(f,g,h){if(h.type=="custom"){window.location.href=h.url+($("rm-searchInputField").value);return}window.location.href=h.url};d.suggest.autoComplete.setFooter("<div></div>")}},tagSuggest:function(d,c,b,a){if(!a){a={}}a.fields=["name"];var e=d.tag.input_el;Ramius.suggest.add(e,c,b,a);if(e&&e.suggest){e.suggest.autoComplete.formatResult=function(j,f,i){var h=j.name;var g=h.toLowerCase().indexOf(f);var k=h.substring(0,g);var m=h.substring(g,g+f.length);var l=h.substring(g+f.length,h.length);return'<span class="rm-suggestTag">'+k+'<span class="rm-suggestMatch">'+m+"</span>"+l+"</span>"};e.suggest.autoComplete.suppressInputUpdate=false;e.suggest.autoComplete.itemSelectEvent.fire=function(f,g,h){d.tag.addTag(h.name);e.value=""}}},siteCategorySuggest:function(d,c,b,a){if(!a){a={}}a.fields=["keywords","name","id","alias"];Ramius.suggest.add(d,c,b,a);if(d&&d.suggest){d.suggest.autoComplete.formatResult=function(i,e,h){var g=i.name;var f=g.toLowerCase().indexOf(e);var j=g.substring(0,f);var l=g.substring(f,f+e.length);var k=g.substring(f+e.length,g.length);return'<span class="rm-suggestTag">['+i.id+"] <strong>"+j+'<span class="rm-suggestMatch">'+l+"</span>"+k+"</span></strong> ("+i.alias+")"};d.suggest.autoComplete.suppressInputUpdate=true;d.suggest.autoComplete.itemSelectEvent.fire=function(f,g,h){try{quickCategoryAdd(h.id,h.name+" ("+h.alias+")")}catch(i){}d.value=""}}},fetch:function(el){if(el&&el.suggest){if(el.suggest.expired||!el.suggest.results){Ramius.ajax.request(el.suggest.url,{onComplete:function(req){try{el.suggest.results=eval("("+req.responseText+")");el.suggest.setData();el.suggest.expired=false}catch(ex){}}})}}}};function Suggest(d,c,b,a){this.options=!a?{}:a;this.target=d;this.dest=c;this.url=b;this.expired=true;this.results={};this.dataSrc=new YAHOO.util.LocalDataSource(this.results);this.autoComplete=null;this.setData=function(){this.dataSrc=new YAHOO.util.LocalDataSource(this.results);this.dataSrc.responseSchema.fields=this.options.fields;if(this.autoComplete){this.autoComplete.dataSource=this.dataSrc}};this.enable=function(){this.autoComplete=new YAHOO.widget.AutoComplete(this.target,this.dest,this.dataSrc);this.autoComplete.resultTypeList=false;this.autoComplete.allowBrowserAutocomplete=false;this.autoComplete.queryMatchContains=true;this.autoComplete.autoHighlight=false;this.autoComplete.animSpeed=this.options.speed||0.1;this.autoComplete.highlightClassName="rm-suggestHighlight";this.autoComplete.prehighlightClassName="rm-suggestPrehighlight";this.autoComplete.maxResultsDisplayed=this.options.limit||10;if(this.options.on_focus){this.autoComplete.textboxFocusEvent.fire=function(e){if(!e.isContainerOpen()){e.sendQuery(e.getInputEl().value)}}}}}Ramius.scrollRestore={restoreX:0,restoreY:0,set:function(){Ramius.scrollRestore.restoreX=document.documentElement.scrollLeft||document.body.scrollLeft;Ramius.scrollRestore.restoreY=document.documentElement.scrollTop||document.body.scrollTop},restore:function(){window.scroll(Ramius.scrollRestore.restoreX,Ramius.scrollRestore.restoreY)}};Ramius.feed={feedMap:new Array(),initFeed:function(b,d,a,c){Ramius.feed.feedMap[d]=new Feed(b,d,a,c)},initPod:function(g,b,a){var d=Ramius.feed.feedMap[g];if(d==null){return}var c="rm-"+g;var e=$$("rm-feedListing","div",c)[0];e.className="rm-feedListing rm-feedLoading";$rc($(c),"rm-feedError");$rc($(c),"rm-feedEmpty");if(!b){b={}}d.options=b;var f=function(i){if(!i.error){if(d.options.title=="large"){var m=d.options.custom_title?d.options.custom_title:i.feed.title;var h=$$("rm-feedTitle","a",c)[0];if(m&&m!=""&&h){h.innerHTML=m;h.href=i.feed.link}}if(d.options.f_author){var l=$$("rm-feedAuthor","p",c)[0];if(i.feed.author&&l){l.innerHTML="by "+i.feed.author}else{if(l){l.style.display="none"}}}if(d.options.title=="large"||d.options.f_desc){var j=$$("rm-feedDesc","p",c)[0];var k=typeof(d.options.custom_description)!="undefined"?d.options.custom_description:i.feed.description;if(k&&k!=""&&j){j.innerHTML=k}else{if(j){j.style.display="none"}}}Ramius.feed.updateEntries(g,$$("rm-feedEntries","ul",c)[0],1);e.className="rm-feedListing"}else{$ac($(c),"rm-feedError")}};Ramius.feed.fetchFeed(g,f,a!=true)},updateEntries:function(b,e,a,c){var g=Ramius.feed.feedMap[b];if(g==null){return}var d="rm-"+b;var f=g.init_load&&c!=null;var h=function(r){var p=r.feed.entries.length;var k=!f;e.innerHTML="";if(p<1){$ac($(d),"rm-feedEmpty");return}if(!g.options){g.options={}}var v=a>0?(a-1)*g.per_page:0;var o=a<1?g.limit:v+g.per_page;if(o>p){o=p}for(var x=v;x<o;x++){if(f&&r.feed.entries[x].link==g.entry.link){c=x;k=true}var s=document.createElement("li");if(a<1){s.onclick=new Function("Ramius.feed.readerEntry('"+g.id+"',"+x.toString()+")");s.id="rm-feedEntry"+x}else{if(g.options.entry_view=="same"){s.onclick=new Function("window.location.href='"+r.feed.entries[x].link+"'")}else{if(g.options.entry_view=="new"){s.onclick=new Function("window.open('"+r.feed.entries[x].link+"')")}else{s.onclick=new Function("Ramius.feed.showReader('"+g.id+"',"+x.toString()+")")}}}if(isIE6()){Ramius.ui.setHoverClass(s)}var C=document.createElement("span");C.className="rm-articleTitle";C.innerHTML=r.feed.entries[x].title;s.appendChild(C);if(g.options.e_author&&r.feed.entries[x].author){var l=document.createElement("span");l.className="rm-author";l.innerHTML="by "+r.feed.entries[x].author;s.appendChild(l)}if(g.options.date_format&&r.feed.entries[x].publishedDate){var B=document.createElement("span");var A=g.options.date_format=="date"?"date":"datetime";B.className="rm-date";B.appendChild(document.createTextNode(Ramius.textUtils.dateFormat(r.feed.entries[x].publishedDate,A)));s.appendChild(B)}if(g.options.e_preview&&r.feed.entries[x].contentSnippet){var q=document.createElement("span");q.className="rm-snippet";q.innerHTML=r.feed.entries[x].contentSnippet;s.appendChild(q)}if(g.options.e_category&&r.feed.entries[x].categories.length>0){var t=document.createElement("span");t.className="rm-tags";var n="";for(var w=0;w<r.feed.entries[x].categories.length;w++){n+=w>0?", ":"";n+=r.feed.entries[x].categories[w]}t.innerHTML=n;s.appendChild(t)}e.appendChild(s)}if(c!=null&&k){Ramius.feed.highlightEntry(c,g.result.feed.entries.length)}var m=$$("rm-feedPodPrev","li",e.parentNode.parentNode)[0];var u=$$("rm-feedPodNext","li",e.parentNode.parentNode)[0];if(p>g.per_page&&a>0){if(a>1){m.style.display="block";m.childNodes[0].href="javascript: Ramius.feed.updateEntries('"+b+"',$$('rm-feedEntries','ul','rm-"+b+"')[0],"+(a-1)+")"}else{m.style.display="none"}if((a*g.per_page)<p){u.style.display="block";u.childNodes[0].href="javascript: Ramius.feed.updateEntries('"+b+"',$$('rm-feedEntries','ul','rm-"+b+"')[0],"+(a+1)+")"}else{u.style.display="none"}}else{if(a>0){m.style.display="none";u.style.display="none"}}if(a>0&&!g.init_load){try{Ramius.ui.scrollToElement($(d+"-t"),null,{top_offset:50});$(d+"_content").scrollTop=0}catch(z){}}$$("rm-feedListing","div",d)[0].className="rm-feedListing";if(f){Ramius.feed.updateEntries(b,$$("rm-feedEntries","ul","rm-"+b)[0],1)}};if(a!=1&&g.init_load){if(a>1){$$("rm-feedListing","div",d)[0].className="rm-feedListing rm-feedLoading"}Ramius.feed.fetchFeed(b,h,false)}else{var i=g.result;if(i!=null){h(i)}}},fetchFeed:function(b,e,d){var c=Ramius.feed.feedMap[b];if(c==null){return}var a=d&&c.limit>c.per_page?c.per_page+1:c.limit;c.init_load=d;c.feed_src.setNumEntries(a);c.feed_src.includeHistoricalEntries();c.feed_src.load(function(f){c.result=f;e(f)})},showReader:function(a,b){$E.onDOMReady(function(){var c=$("rm-feedReader");if(c.innerHTML==""){Ramius.ajax.request("/views/feed/feed-reader.jsp",{onComplete:function(d){c.innerHTML=d.responseText;Ramius.feed.viewReader(a,b);$E.onDOMReady(function(){if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))||(navigator.userAgent.match(/iPad/i))){if(document.cookie.indexOf("iphone_redirect=false")==-1){alert("Use a two finger swipe Up/Down to scroll the content.")}}})}})}else{Ramius.feed.viewReader(a,b)}})},viewReader:function(c,f){var e=Ramius.feed.feedMap[c];if(e==null){return}var b=$("rm-feedReader");var d=$("rm-pageWrapper");var a=$("rm-feedReaderTitle");f=f?f:0;e.entry=e.result.feed.entries[f];var g=e.options.custom_title?e.options.custom_title:e.result.feed.title;if(a){a.innerHTML=g;a.href=e.result.feed.link}b.style.display="block";Ramius.feed.readerEntry(c,f,true);Ramius.feed.updateEntries(c,$("rm-feedReaderEntries"),0,f);Ramius.scrollRestore.set();$ac(d,"rm-feedPageWrap");$("rm-feedViewContent").style.height=($D.getViewportHeight()-$("rm-feedTabbedHead").offsetHeight-5)+"px";$E.on(window,"beforeunload",unloadAction)},hideReader:function(){try{var a=$("rm-feedReader");var c=$("rm-pageWrapper");var b=$("rm-feedOriginal");$rc(c,"rm-feedPageWrap");a.style.display="none";b.innerHTML="";AudioPlayer.embed("rm-feedPodCast");$E.removeListener(window,"beforeunload")}catch(d){}Ramius.scrollRestore.restore()},readerEntry:function(c,e,g){var k=Ramius.feed.feedMap[c];var b=k.result.feed.entries.length;if(!k){return}if(e>=b){e=0}k.entry=k.result.feed.entries[e];var f=$("rm-feedPreview");var h=$("rm-feedOriginal");var d=$("rm-feedInNew");var l=$("rm-feedPreviewTab");var i=$("rm-feedOriginalTab");var j=$("rm-feedNext");var a=$("rm-feedPrev");Ramius.feed.readerView(c);f.innerHTML="<h1>"+k.entry.title+"</h1>";f.innerHTML+=k.entry.content;f.parentNode.scrollTop=0;if(k.entry.link.match(".*.mp3$")){f.innerHTML+='<div id="rm-feedPodCast"></div>';AudioPlayer.embed("rm-feedPodCast",{soundFile:k.entry.link})}l.onclick=new Function("Ramius.feed.readerView('"+k.id+"',0);return false;");i.onclick=new Function("Ramius.feed.readerView('"+k.id+"',1);return false;");d.href=k.entry.link;if(e>0){a.disabled=false;$rc(a.parentNode.parentNode,"rm-disabled");a.onclick=new Function("Ramius.feed.readerEntry('"+k.id+"',"+(e-1).toString()+");return false;")}else{a.disabled=true;$ac(a.parentNode.parentNode,"rm-disabled");a.onclick=null}if(e<b-1){j.disabled=false;$rc(j.parentNode.parentNode,"rm-disabled");j.onclick=new Function("Ramius.feed.readerEntry('"+k.id+"',"+(e+1).toString()+");return false;")}else{j.disabled=true;$ac(j.parentNode.parentNode,"rm-disabled");j.onclick=null}if(!g){Ramius.feed.highlightEntry(e,k.result.feed.entries.length)}},highlightEntry:function(c,f){try{for(var a=0;a<f;a++){var b=$("rm-feedEntry"+a.toString());if(b){b.className=a==c?"rm-feedSelected":"";if(a==c){Ramius.ui.scrollToElement(b,$("rm-readerListing"))}}}}catch(d){}},readerView:function(f,b){var h=Ramius.feed.feedMap[f];if(h==null){return}if(h.entry==null){h.entry=h.result.feed.entries[0]}var d=$("rm-feedPreview");var c=$("rm-feedPreviewTab");var g=$("rm-feedOriginal");var a=$("rm-feedOriginalTab");if(b!=null){h.view=b}if(h.view==1&&g&&d){d.style.display="none";g.style.display="block";var e=document.createElement("iframe");e.frameBorder="0";e.scrolling="auto";g.innerHTML="";g.appendChild(e);e.src=h.entry.link;a.className="rm-tab rm-current";c.className="rm-tab";AudioPlayer.embed("rm-feedPodCast")}else{if(g&&d){g.style.display="none";d.style.display="block";g.innerHTML="";c.className="rm-tab rm-current";a.className="rm-tab";AudioPlayer.embed("rm-feedPodCast",{soundFile:h.entry.link})}}},podDescription:function(a){if(a==null){return}var b=$$("rm-listingMeta","div",a.parentNode.parentNode)[0];if(b==null){return}if(b.style.display=="none"){b.style.display="inline";$ac(a,"rm-expanded")}else{b.style.display="none";$rc(a,"rm-expanded")}}};function Feed(b,d,a,c){this.feed_src=b;this.id=d;this.limit=a;this.per_page=c;this.init_load=true;this.options={};this.result;this.view=0;this.entry}Ramius.slideshow={url:null,playing:true,images:{},slideshow_timer:3000,slideshow_trigger:null,nav_timeout:null,processing:false,total:0,index:1,nav_index:1,nav_count:24,base_scroll_speed:0.4,div:null,init:function(b,a){var d=a.indexOf("/content/");var f=a.indexOf("?");var e=a.substring(0,d);var c=a.substring(f);Ramius.slideshow.url=e+"/content"+c;Ramius.slideshow.calculateNav(b);a=a+"&index="+b+"&rcnt="+Ramius.slideshow.nav_count;$E.onDOMReady(function(){Ramius.ajax.request(a,{onComplete:Ramius.slideshow.loadSlideShow})})},close:function(){if(Ramius.slideshow.div==null){return}Ramius.slideshow.div.style.display="none";var a=$("rm-pageWrapper");$rc(a,"rm-feedPageWrap");try{if(getRmModal().isShown()){$("rm-modalWrap").style.display="block";$("rm-overlay").style.display="block"}}catch(b){}$E.removeListener(document,"keydown",Ramius.slideshow.watchKeys);$E.removeListener(window,"resize",Ramius.slideshow.resize);$rc(document.documentElement,"rm-bodySlideShow");clearTimeout(Ramius.slideshow.slideshow_trigger);Ramius.slideshow.url=null;Ramius.slideshow.playing=true;Ramius.slideshow.images={};Ramius.slideshow.slideshow_timer=3000;Ramius.slideshow.slideshow_trigger=null;Ramius.slideshow.nav_timeout=null;Ramius.slideshow.processing=false;Ramius.slideshow.total=0;Ramius.slideshow.index=1;Ramius.slideshow.nav_index=1;Ramius.slideshow.nav_count=24;Ramius.slideshow.base_scroll_speed=0.4;Ramius.slideshow.div=null;Ramius.scrollRestore.restore()},watchKeys:function(b){var a=b.keyCode||b.which;if(a==27){Ramius.slideshow.close()}else{if(a==39){Ramius.slideshow.next()}else{if(a==37){Ramius.slideshow.previous()}}}},loadSlideShow:function(f){Ramius.slideshow.div=$("rm-slideShowFrame");if(Ramius.slideshow.div==null){var b=document.createElement("div");b.id="rm-slideShowFrame";document.body.appendChild(b);Ramius.slideshow.div=$("rm-slideShowFrame")}Ramius.scrollRestore.set();Ramius.slideshow.div.innerHTML=f.responseText;var c=$("rm-pageWrapper");$ac(c,"rm-feedPageWrap");try{$("rm-modalWrap").style.display="none";$("rm-overlay").style.display="none"}catch(d){}$rn.evalScripts(Ramius.slideshow.div);var a=$("rm-thumbNavWrap");a.style.bottom="0px";$rc(document.documentElement,"rm-bodySlideShow");$ac(document.documentElement,"rm-bodySlideShow");Ramius.slideshow.resize();Ramius.slideshow._loadItem(Ramius.slideshow.index);Ramius.slideshow.div.style.display="block";a.style.bottom="0px";Ramius.slideshow.nav_timeout=setTimeout(Ramius.slideshow.hideNav,3000);$E.on(document,"keydown",Ramius.slideshow.watchKeys);$E.on(window,"resize",Ramius.slideshow.resize);Ramius.slideshow.clickplay()},clickplay:function(){$("rm-slidepaused").style.display="none";$("rm-slideplay").style.display="block";Ramius.slideshow.playing=true;Ramius.slideshow.play()},play:function(){if(Ramius.slideshow.playing){clearTimeout(Ramius.slideshow.slideshow_trigger);Ramius.slideshow.slideshow_trigger=setTimeout(Ramius.slideshow._next,Ramius.slideshow.slideshow_timer)}},pause:function(){$("rm-slideplay").style.display="none";$("rm-slidepaused").style.display="block";Ramius.slideshow.playing=false;clearTimeout(Ramius.slideshow.slideshow_trigger)},speedup:function(){if(Ramius.slideshow.slideshow_timer>1000){clearTimeout(Ramius.slideshow.slideshow_trigger);Ramius.slideshow.slideshow_timer-=1000;if(Ramius.slideshow.slideshow_timer<1000){Ramius.slideshow.slideshow_timer=1000}$("rm-slideInterval").innerHTML=Ramius.slideshow.slideshow_timer/1000+" sec.";Ramius.slideshow.play()}},slowdown:function(){clearTimeout(Ramius.slideshow.slideshow_trigger);Ramius.slideshow.slideshow_timer+=1000;$("rm-slideInterval").innerHTML=Ramius.slideshow.slideshow_timer/1000+" sec.";Ramius.slideshow.play()},calculateNav:function(a){if(a!=null){Ramius.slideshow.index=a}var b=parseInt($D.getViewportWidth());if(b<770){b=770}var c=b-80;Ramius.slideshow.nav_count=Math.floor(c/62);if(Ramius.slideshow.nav_count>24){Ramius.slideshow.nav_count=24}},resize:function(){var a=parseInt($D.getViewportHeight());var d=parseInt($D.getViewportWidth());if(d<770){d=770}$("rm-slideImage").style.maxHeight=a+"px";if(isIE6()){var f=$("rm-slideImage").offsetWidth;var e=$("rm-slideImage").offsetHeight;var b=f/d;var c=e/a;if(b>1&&b>c){$("rm-slideImage").style.width=d+"px"}else{if(c>1&&c>b){$("rm-slideImage").style.height=a+"px"}}}else{$("rm-slideImage").style.maxHeight=a+"px";$("rm-slideImage").style.maxWidth=d+"px"}$("rm-mainSlide").style.height=a+"px";Ramius.slideshow.calculateNav();if(Ramius.slideshow.nav_index>1){$("rm-viewPrevious").style.display="block"}else{$("rm-viewPrevious").style.display="none"}if((Ramius.slideshow.nav_index+Ramius.slideshow.nav_count)<=Ramius.slideshow.total){$("rm-viewNext").style.display="block"}else{$("rm-viewNext").style.display="none"}if($("rm-slidePhoto-"+Ramius.slideshow.index)!=null){$ac($("rm-slidePhoto-"+Ramius.slideshow.index),"rm-slideSelected")}var g=(d-(62*Ramius.slideshow.nav_count))/2;$("rm-thumbNav").style.width=(62*Ramius.slideshow.nav_count)+"px";$("rm-thumbNav").style.margin="0 "+g+"px"},paginate:function(c,d){if(Ramius.slideshow.processing){return}Ramius.slideshow.processing=true;var a=Ramius.slideshow.nav_index+(c?Ramius.slideshow.nav_count:-Ramius.slideshow.nav_count);if(a<1){a=Ramius.slideshow.total-Ramius.slideshow.nav_count+1}else{if(a>Ramius.slideshow.total){a=1;c=false}}var b=Ramius.slideshow.url+"&sr="+a+"&rcnt="+Ramius.slideshow.nav_count+"&direction="+(c?1:-1);Ramius.ajax.request(b,{onComplete:function(g){var f=$("rm-thumbNav");f.innerHTML=g.responseText;$rn.evalScripts(f);Ramius.slideshow.resize();clearTimeout(Ramius.slideshow.nav_timeout);var e=$$("rm-imageThumb","img","rm-thumbNavIn");if(is_IE()){if(d!=null){d()}$E.on(e[e.length-1],"load",Ramius.slideshow.scrollNav,c)}else{Ramius.slideshow.scrollNav(null,c,d)}}})},scrollNav:function(d,b,c){var a=$("rm-thumbNavIn");var f=b?-(Ramius.slideshow.nav_count*62):0;var e=new $A(a,{left:{to:f}},Ramius.slideshow.nav_count/24);e.onComplete.subscribe(function(){Ramius.slideshow.processing=false;if(c!=null){c()}});e.animate()},nav_focus:function(){clearTimeout(Ramius.slideshow.nav_timeout)},nav_unfocus:function(){clearTimeout(Ramius.slideshow.nav_timeout);Ramius.slideshow.nav_timeout=setTimeout(Ramius.slideshow.hideNav,2000)},hideNav:function(){if(Ramius.slideshow.processing){return}clearTimeout(Ramius.slideshow.nav_timeout);var a=$("rm-thumbNavWrap");var b=new $A(a,{bottom:{to:-70}},0.5);var d=$("rm-slideHeader");var c=new $A(d,{top:{to:-70}},0.5);b.animate();c.animate()},showNav:function(){var a=$("rm-thumbNavWrap");var b=new $A(a,{bottom:{to:0}},0.5);var d=$("rm-slideHeader");var c=new $A(d,{top:{to:0}},0.5);b.animate();c.animate()},hidePreview:function(){$("rm-bigPreview").style.left="-800px"},showPreview:function(d,b){var c=(d.srcElement||d.target);$("rm-bigPreviewImgSrc").src=b;var a=YAHOO.util.Dom.getXY(c)[0]-89;if(a<0){var e=a;a=0;$("rm-bigPreview").style.backgroundPosition=(100+e)+"px bottom"}else{if(a>($D.getViewportWidth()-228)){var e=a-($D.getViewportWidth()-228);a=a-e;$("rm-bigPreview").style.backgroundPosition=(100+e)+"px bottom"}else{$("rm-bigPreview").style.backgroundPosition="100px bottom"}}$("rm-bigPreview").style.left=a+"px";$("rm-bigPreview").style.zIndex=15},addItem:function(b,a){Ramius.slideshow.images[b]=a},next:function(){Ramius.slideshow.pause();Ramius.slideshow._next()},_next:function(){Ramius.slideshow.loadItem(Ramius.slideshow.index+1,1)},previous:function(){Ramius.slideshow.pause();Ramius.slideshow.loadItem(Ramius.slideshow.index-1,-1)},click:function(b){Ramius.slideshow.hideNav();var a=$E.getPageX(b);if($D.getViewportWidth()/a<3){Ramius.slideshow.next()}else{Ramius.slideshow.previous()}},hoverShowDetails:function(){var b=$("rm-showDetails");if(b.style.display!="none"){var a=$("rm-imageDetails");if(is_IE()){$("rm-imageDetails").style.display="block"}else{var c=new $A(a,{opacity:{to:1}},0.5);c.animate()}}},hoverHideDetails:function(){var b=$("rm-showDetails");if(b.style.display!="none"){var a=$("rm-imageDetails");if(is_IE()){$("rm-imageDetails").style.display="none"}else{var c=new $A(a,{opacity:{to:0}},0.5);c.animate()}}},clickHideDetails:function(){},showDetails:function(){var b=$("rm-showDetails");var c=$("rm-hideDetails");b.style.display="none";c.style.display="inline";var a=$("rm-imageDetails");if(is_IE()){$("rm-imageDetails").style.display="block"}else{var d=new $A(a,{opacity:{to:1}},0.5);d.animate()}},hideDetails:function(){var b=$("rm-showDetails");var c=$("rm-hideDetails");c.style.display="none";b.style.display="inline";var a=$("rm-imageDetails");if(is_IE()){$("rm-imageDetails").style.display="none"}else{var d=new $A(a,{opacity:{to:0}},0.5);d.animate()}},loadItem:function(b,a){$("rm-slideImage").style.width="";$("rm-slideImage").style.height="";if(a!=null){setTimeout("Ramius.slideshow._loadItem( "+b+","+a+");",1)}else{setTimeout("Ramius.slideshow._loadItem( "+b+");",1)}},_loadItem:function(d,c){var b=d;if(d>Ramius.slideshow.count){d=1}if(d<1){d=Ramius.slideshow.count}if(Ramius.slideshow.nav_count<Ramius.slideshow.total){if(c==1&&((b==(Ramius.slideshow.total+1)&&((Ramius.slideshow.nav_count+Ramius.slideshow.nav_index)>Ramius.slideshow.total))||b==(Ramius.slideshow.nav_count+Ramius.slideshow.nav_index))){Ramius.slideshow.paginate(true,function(){Ramius.slideshow.loadItem(d)});return}else{if(c==-1&&b==Ramius.slideshow.nav_index-1){Ramius.slideshow.paginate(false,function(){Ramius.slideshow.loadItem(d)});return}}}$rc($("rm-slidePhoto-"+Ramius.slideshow.index),"rm-slideSelected");Ramius.slideshow.index=d;$ac($("rm-slidePhoto-"+Ramius.slideshow.index),"rm-slideSelected");$("rm-slideCount").innerHTML=Ramius.slideshow.index+" of "+Ramius.slideshow.count;var a=Ramius.slideshow.images[d];$("rm-slideImage").src=a.img;if(Ramius.slideshow.playing){$E.on($("rm-slideImage"),"load",Ramius.slideshow.play)}$E.on($("rm-slideImage"),"load",Ramius.slideshow.resize);$("rm-imageTitle").innerHTML=a.title;$("rm-imageDesc").innerHTML=a.caption;$("rm-authorIcon").innerHTML=a.usericon;$("rm-authorDetails").innerHTML=a.nameblock;$("rm-commentBlock").innerHTML=a.commentblock;$rc($("rm-commentBlock"),"rm-noComment");if(!a.commentblock||a.commentblock.length<1){$ac($("rm-commentBlock"),"rm-noComment")}Ramius.ajax.request("/viewitem.jsp?content_id="+a.id+"&community_id="+a.community_id);a=Ramius.slideshow.images[d+1];if(a!=null){$("rm-nextImage").src=a.img}a=Ramius.slideshow.images[d-1];if(a!=null){$("rm-previousImage").src=a.img}}};