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

/* - ++resource++jquery.cycle.js - */
// http://www.uniquefabrics.com/portal_javascripts/++resource++jquery.cycle.js?original=1
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(4($){7 n=\'2.10\';7 q=$.23.1V&&/2H 6.0/.2i(2a.26);$.F.E=4(m){r u.K(4(){m=m||{};3(m.1M==1K){2k(m){1n\'2g\':3(u.D)1j(u.D);u.D=0;r;1n\'1h\':u.M=1;r;1n\'2X\':u.M=0;r;2W:m={Y:m}}}7 c=$(u);7 d=m.1s?$(m.1s,u):c.2M();7 e=d.2D();3(e.x<2)r;7 f=$.2w({},$.F.E.20,m||{},$.1L?c.1L():$.2p?c.2n():{});3(f.1o)f.1H=f.2j||e.x;f.G=f.G?[f.G]:[];f.J=f.J?[f.J]:[];f.J.2f(4(){f.1m=0});3(q&&f.1l&&!f.28)1E(d);7 g=u.25;7 w=12((g.15(/w:(\\d+)/)||[])[1])||f.14;7 h=12((g.15(/h:(\\d+)/)||[])[1])||f.V;f.y=12((g.15(/t:(\\d+)/)||[])[1])||f.y;3(c.B(\'1y\')==\'2T\')c.B(\'1y\',\'2P\');3(w)c.14(w);3(h&&h!=\'1C\')c.V(h);3(f.N){f.R=[];1T(7 i=0;i<e.x;i++)f.R.1S(i);f.R.2J(4(a,b){r 2C.N()-0.5});f.L=0;f.H=f.R[0]}O 3(f.H>=e.x)f.H=0;7 j=f.H||0;d.B(\'1y\',\'2v\').2u().K(4(i){7 z=j?i>=j?e.x-(i-j):j-i:e.x-i;$(u).B(\'z-2r\',z)});$(e[j]).1Y();3(f.W&&w)d.14(w);3(f.W&&h&&h!=\'1C\')d.V(h);3(f.1h)c.2o(4(){u.M=1},4(){u.M=0});7 k=$.F.E.1J[f.Y];3($.1I(k))k(c,d,f);d.K(4(){7 a=$(u);u.2m=(f.W&&h)?h:a.V();u.2l=(f.W&&w)?w:a.14()});f.U=f.U||{};f.T=f.T||{};f.S=f.S||{};d.1G(\':1a(\'+j+\')\').B(f.U);3(f.1F)$(d[j]).B(f.1F);3(f.y){3(f.C.1M==1K)f.C={2h:2e,2d:2c}[f.C]||2b;3(!f.18)f.C=f.C/2;29((f.y-f.C)<27)f.y+=f.C}3(f.1k)f.1i=f.1r=f.1k;3(!f.17)f.17=f.C;3(!f.1f)f.1f=f.C;f.24=e.x;f.I=j;3(f.N){f.8=f.I;3(++f.L==e.x)f.L=0;f.8=f.R[f.L]}O f.8=f.H>=(e.x-1)?0:f.H+1;7 l=d[j];3(f.G.x)f.G[0].13(l,[l,l,f,1D]);3(f.J.x>1)f.J[1].13(l,[l,l,f,1D]);3(f.P&&!f.A)f.A=f.P;3(f.A)$(f.A).1B(\'P\',4(){r 1A(e,f,f.X?-1:1)});3(f.1z)$(f.1z).1B(\'P\',4(){r 1A(e,f,f.X?1:-1)});3(f.11)22(e,f);3(f.y)u.D=21(4(){Z(e,f,0,!f.X)},f.y+(f.1Z||0))})};4 Z(a,b,c,d){3(b.1m)r;7 p=a[0].1g,Q=a[b.I],A=a[b.8];3(p.D===0&&!c)r;3(!c&&!p.M&&((b.1o&&(--b.1H<=0))||(b.19&&!b.N&&b.8<b.I)))r;3(c||!p.M){3(b.G.x)$.K(b.G,4(i,o){o.13(A,[Q,A,b,d])});7 e=4(){3($.23.1V&&b.1l)u.2S.2Q(\'1x\');$.K(b.J,4(i,o){o.13(A,[Q,A,b,d])})};3(b.8!=b.I){b.1m=1;3(b.1w)b.1w(Q,A,b,e,d);O 3($.1I($.F.E[b.Y]))$.F.E[b.Y](Q,A,b,e);O $.F.E.1X(Q,A,b,e)}3(b.N){b.I=b.8;3(++b.L==a.x)b.L=0;b.8=b.R[b.L]}O{7 f=(b.8+1)==a.x;b.8=f?0:b.8+1;b.I=f?a.x-1:b.8-1}3(b.11)$(b.11).1W(\'a\').2O(\'1u\').1x(\'a:1a(\'+b.I+\')\').1U(\'1u\')}3(b.y)p.D=21(4(){Z(a,b,0,!b.X)},b.y)};4 1A(a,b,c){7 p=a[0].1g,y=p.D;3(y){1j(y);p.D=0}b.8=b.I+c;3(b.8<0){3(b.19)r 1b;b.8=a.x-1}O 3(b.8>=a.x){3(b.19)r 1b;b.8=0}3(b.1e&&1t b.1e==\'4\')b.1e(c>0,b.8,a[b.8]);Z(a,b,1,c>=0);r 1b};4 22(b,c){7 d=$(c.11);$.K(b,4(i,o){7 a=(1t c.1p==\'4\')?$(c.1p(i,o)):$(\'<a 2N="#">\'+(i+1)+\'</a>\');3(a.2L(\'2K\').x==0)a.2I(d);a.1B(\'P\',4(){c.8=i;7 p=b[0].1g,y=p.D;3(y){1j(y);p.D=0}3(1t c.1q==\'4\')c.1q(c.8,b[c.8]);Z(b,c,1,!c.X);r 1b})});d.1W(\'a\').1x(\'a:1a(\'+c.H+\')\').1U(\'1u\')};4 1E(b){4 1c(s){7 s=12(s).2G(16);r s.x<2?\'0\'+s:s};4 1Q(e){1T(;e&&e.2B.2E()!=\'2F\';e=e.1g){7 v=$.B(e,\'1P-1O\');3(v.2A(\'2z\')>=0){7 a=v.15(/\\d+/g);r\'#\'+1c(a[0])+1c(a[1])+1c(a[2])}3(v&&v!=\'2y\')r v}r\'#2x\'};b.K(4(){$(u).B(\'1P-1O\',1Q(u))})};$.F.E.1X=4(a,b,c,d){7 e=$(a),$n=$(b);$n.B(c.U);7 f=4(){$n.1R(c.T,c.17,c.1i,d)};e.1R(c.S,c.1f,c.1r,4(){3(c.1d)e.B(c.1d);3(!c.18)f()});3(c.18)f()};$.F.E.1J={1N:4(a,b,c){b.1G(\':1a(\'+c.H+\')\').B(\'1v\',0);c.G.1S(4(){$(u).1Y()});c.T={1v:1};c.S={1v:0};c.1d={2R:\'2t\'}}};$.F.E.2s=4(){r n};$.F.E.20={Y:\'1N\',y:2U,C:2V,17:9,1f:9,P:9,A:9,1z:9,1e:9,11:9,1q:9,1p:9,G:9,J:9,1k:9,1i:9,1r:9,2q:9,T:9,S:9,U:9,1d:9,1w:9,V:\'1C\',H:0,18:1,N:0,W:0,1h:0,1o:0,1Z:0,1s:9,1l:0,19:0}})(2Y);',62,185,'|||if|function|||var|nextSlide|null||||||||||||||||||return|||this|||length|timeout||next|css|speed|cycleTimeout|cycle|fn|before|startingSlide|currSlide|after|each|randomIndex|cyclePause|random|else|click|curr|randomMap|animOut|animIn|cssBefore|height|fit|rev|fx|go||pager|parseInt|apply|width|match||speedIn|sync|nowrap|eq|false|hex|cssAfter|prevNextClick|speedOut|parentNode|pause|easeIn|clearTimeout|easing|cleartype|busy|case|autostop|pagerAnchorBuilder|pagerClick|easeOut|slideExpr|typeof|activeSlide|opacity|fxFn|filter|position|prev|advance|bind|auto|true|clearTypeFix|cssFirst|not|countdown|isFunction|transitions|String|metadata|constructor|fade|color|background|getBg|animate|push|for|addClass|msie|find|custom|show|delay|defaults|setTimeout|buildPager|browser|slideCount|className|userAgent|250|cleartypeNoBg|while|navigator|400|200|fast|600|unshift|stop|slow|test|autostopCount|switch|cycleW|cycleH|data|hover|meta|shuffle|index|ver|none|hide|absolute|extend|ffffff|transparent|rgb|indexOf|nodeName|Math|get|toLowerCase|html|toString|MSIE|appendTo|sort|body|parents|children|href|removeClass|relative|removeAttribute|display|style|static|4000|1000|default|resume|jQuery'.split('|'),0,{}))


/* - ++resource++tabber.js - */
// http://www.uniquefabrics.com/portal_javascripts/++resource++tabber.js?original=1
function tabberObj(argsObj){var arg;this.div=null;this.classMain="tabber";this.classMainLive="tabberlive";this.classTab="tabbertab";this.classTabDefault="tabbertabdefault";this.classNav="tabbernav";this.classTabHide="tabbertabhide";this.classNavActive="tabberactive";this.titleElements=['h2','h3','h4','h5','h6'];this.titleElementsStripHTML=false;this.removeTitle=true;this.addLinkId=false;this.linkIdFormat='<tabberid>nav<tabnumberone>';for(arg in argsObj){this[arg]=argsObj[arg]}this.REclassMain=new RegExp('\\b'+this.classMain+'\\b','gi');this.REclassMainLive=new RegExp('\\b'+this.classMainLive+'\\b','gi');this.REclassTab=new RegExp('\\b'+this.classTab+'\\b','gi');this.REclassTabDefault=new RegExp('\\b'+this.classTabDefault+'\\b','gi');this.REclassTabHide=new RegExp('\\b'+this.classTabHide+'\\b','gi');this.tabs=[];if(this.div){this.init(this.div);this.div=null}}tabberObj.prototype.init=function(e){var
childNodes,i,i2,t,defaultTab=0,DOM_ul,DOM_li,DOM_a,aId,headingElement;if(!document.getElementsByTagName){return false}if(e.id){this.id=e.id}this.tabs.length=0;childNodes=e.childNodes;for(i=0;i<childNodes.length;i++){if(childNodes[i].className&&childNodes[i].className.match(this.REclassTab)){t={};t.div=childNodes[i];this.tabs[this.tabs.length]=t;if(childNodes[i].className.match(this.REclassTabDefault)){defaultTab=this.tabs.length-1}}}DOM_ul=document.createElement("ul");DOM_ul.className=this.classNav;for(i=0;i<this.tabs.length;i++){t=this.tabs[i];t.headingText=t.div.title;if(this.removeTitle){t.div.title=''}if(!t.headingText){for(i2=0;i2<this.titleElements.length;i2++){headingElement=t.div.getElementsByTagName(this.titleElements[i2])[0];if(headingElement){t.headingText=headingElement.innerHTML;if(this.titleElementsStripHTML){t.headingText.replace(/<br>/gi," ");t.headingText=t.headingText.replace(/<[^>]+>/g,"")}break}}}if(!t.headingText){t.headingText=i+1}DOM_li=document.createElement("li");t.li=DOM_li;DOM_a=document.createElement("a");DOM_a.innerHTML=t.headingText;DOM_a.href="#";DOM_a.title=t.headingText;DOM_a.onclick=this.navClick;DOM_a.tabber=this;DOM_a.tabberIndex=i;if(this.addLinkId&&this.linkIdFormat){aId=this.linkIdFormat;aId=aId.replace(/<tabberid>/gi,this.id);aId=aId.replace(/<tabnumberzero>/gi,i);aId=aId.replace(/<tabnumberone>/gi,i+1);aId=aId.replace(/<tabtitle>/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi,''));DOM_a.id=aId}DOM_li.appendChild(DOM_a);DOM_ul.appendChild(DOM_li)}e.insertBefore(DOM_ul,e.firstChild);e.className=e.className.replace(this.REclassMain,this.classMainLive);this.tabShow(defaultTab);if(typeof this.onLoad=='function'){this.onLoad({tabber:this})}return this};tabberObj.prototype.navClick=function(event){var
rVal,a,self,tabberIndex,onClickArgs;a=this;if(!a.tabber){return false}self=a.tabber;tabberIndex=a.tabberIndex;a.blur();if(typeof self.onClick=='function'){onClickArgs={tabber:self,index:tabberIndex,event:event};if(!event){onClickArgs.event=window.event}rVal=self.onClick(onClickArgs);if(rVal===false){return false}}self.tabShow(tabberIndex);return false};tabberObj.prototype.tabHideAll=function(){var i;for(i=0;i<this.tabs.length;i++){this.tabHide(i)}};tabberObj.prototype.tabHide=function(tabberIndex){var div;if(!this.tabs[tabberIndex]){return false}div=this.tabs[tabberIndex].div;if(!div.className.match(this.REclassTabHide)){div.className+=' '+this.classTabHide}this.navClearActive(tabberIndex);return this};tabberObj.prototype.tabShow=function(tabberIndex){var div;if(!this.tabs[tabberIndex]){return false}this.tabHideAll();div=this.tabs[tabberIndex].div;div.className=div.className.replace(this.REclassTabHide,'');this.navSetActive(tabberIndex);if(typeof this.onTabDisplay=='function'){this.onTabDisplay({tabber:this,index:tabberIndex})}return this};tabberObj.prototype.navSetActive=function(tabberIndex){this.tabs[tabberIndex].li.className=this.classNavActive;return this};tabberObj.prototype.navClearActive=function(tabberIndex){this.tabs[tabberIndex].li.className='';return this};function tabberAutomatic(tabberArgs){var
tempObj,divs,i;if(!tabberArgs){tabberArgs={}}tempObj=new tabberObj(tabberArgs);divs=document.getElementsByTagName("div");for(i=0;i<divs.length;i++){if(divs[i].className&&divs[i].className.match(tempObj.REclassMain)){tabberArgs.div=divs[i];divs[i].tabber=new tabberObj(tabberArgs)}}return this}registerPloneFunction(tabberAutomatic);

/* - ++resource++uniquefabrics.theme.javascripts/css_browser_selector.js - */
// http://www.uniquefabrics.com/portal_javascripts/++resource++uniquefabrics.theme.javascripts/css_browser_selector.js?original=1
var css_browser_selector=function(){var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t)!=-1},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js';h.className+=h.className?' '+c:c}();

/* - ++resource++uniquefabrics.theme.javascripts/popup.js - */
// http://www.uniquefabrics.com/portal_javascripts/++resource++uniquefabrics.theme.javascripts/popup.js?original=1
jq.fn.popupwindow=function(){return this.each(function(index){var settings,parameters;settings={height:600,width:758,toolbar:0,scrollbars:1,status:0,resizable:1,createnew:1,location:0,menubar:0};parameters="location="+settings.location+",menubar="+settings.menubar+",height="+settings.height+",width="+settings.width+",toolbar="+settings.toolbar+",scrollbars="+settings.scrollbars+",status="+settings.status+",resizable="+settings.resizable;jQuery(this).bind("click",function(){var match_id=this.href.match("specification/([1-9]+)$");var name='uniquefabrics';if(match_id&&settings.createnew){var id=match_id[1];name+=id};var popup=window.open(this.href,name,parameters);popup.focus();popup.opener=window;return false})})};jq(function(){jq('a[href*=/specification/]').popupwindow();if(window.opener){jq('a.window-opener').click(function(){window.opener.location.href=this.href;window.opener.focus();return false})}jq('.embedded a.window-opener').attr({target:"_blank"});jq('ul#specification-links').append('<li><a href="javascript:window.print()">Print</a></li>')});

/* - livesearch.js - */
// http://www.uniquefabrics.com/portal_javascripts/livesearch.js?original=1
var livesearch=function(){var _2=400;var _7=400;var _0={};var _1="LSHighlight";function _5(f,i){var l=null;var r=null;var c={};var q="livesearch_reply";var q=f.attr('action').replace(/search$/g,"")+q;var re=f.find('div.LSResult');var s=f.find('div.LSShadow');var p=f.find('input[name=path]');function _12(){re.hide();l=null};function _6(){window.setTimeout('livesearch.hide("'+f.attr('id')+'")',_7)};function _11(d){re.show();s.html(d)};function _14(){if(l==i.value){return}l=i.value;if(r&&r.readyState<4)r.abort();if(i.value.length<2){_12();return}var qu={q:i.value};if(p.length&&p[0].checked)qu['path']=p.val();qu=jq.param(qu);if(c[qu]){_11(c[qu]);return}r=jq.get(q,qu,function(d){_11(d);c[qu]=d},'text')};function _4(){window.setTimeout('livesearch.search("'+f.attr('id')+'")',_2)};return{hide:_12,hide_delayed:_6,search:_14,search_delayed:_4}};function _3(f){var t=null;var re=f.find('div.LSResult');var s=f.find('div.LSShadow');function _16(){c=s.find('li.LSHighlight').removeClass(_1);p=c.prev('li');if(!p.length)p=s.find('li:last');p.addClass(_1);return false};function _9(){c=s.find('li.LSHighlight').removeClass(_1);n=c.next('li');if(!n.length)n=s.find('li:first');n.addClass(_1);return false};function _8(){s.find('li.LSHighlight').removeClass(_1);re.hide()};function _10(e){window.clearTimeout(t);switch(e.keyCode){case 38:return _16();case 40:return _9();case 27:return _8();case 37:break;case 39:break;default:{t=window.setTimeout('livesearch.search("'+f.attr('id')+'")',_2)}}};function _13(){var t=s.find('li.LSHighlight a').attr('href');if(!t)return;window.location=t;return false};return{handler:_10,submit:_13}};function _15(i){var i='livesearch'+i;var f=jq(this).parents('form:first');var k=_3(f);_0[i]=_5(f,this);f.attr('id',i).submit(k.submit);jq(this).attr('autocomplete','off').keydown(k.handler).focus(_0[i].search_delayed).blur(_0[i].hide_delayed)};jq(function(){jq("#searchGadget,input.portlet-search-gadget").each(_15)});return{search:function(id){_0[id].search()},hide:function(id){_0[id].hide()}}}();

/* - select_all.js - */
// http://www.uniquefabrics.com/portal_javascripts/select_all.js?original=1
function toggleSelect(selectbutton,id,initialState,formName){id=id||'ids:list'
var state=selectbutton.isSelected;state=state==null?Boolean(initialState):state;selectbutton.isSelected=!state;jq(selectbutton).attr('src',portal_url+'/select_'+(state?'all':'none')+'_icon.gif');var base=formName?jq(document.forms[formName]):jq(document);base.find(':checkbox[name='+id+']').attr('checked',!state)}


/* - dragdropreorder.js - */
// http://www.uniquefabrics.com/portal_javascripts/dragdropreorder.js?original=1
var ploneDnDReorder={};ploneDnDReorder.dragging=null;ploneDnDReorder.table=null;ploneDnDReorder.rows=null;ploneDnDReorder.doDown=function(e){var dragging=jq(this).parents('.draggable:first');if(!dragging.length) return;ploneDnDReorder.rows.mousemove(ploneDnDReorder.doDrag);ploneDnDReorder.dragging=dragging;dragging._position=ploneDnDReorder.getPos(dragging);dragging.addClass("dragging");return false};ploneDnDReorder.getPos=function(node){var pos=node.parent().children('.draggable').index(node[0]);return pos==-1?null:pos};ploneDnDReorder.doDrag=function(e){var dragging=ploneDnDReorder.dragging;if(!dragging) return;var target=this;if(!target) return;if(jq(target).attr('id')!=dragging.attr('id')){ploneDnDReorder.swapElements(jq(target),dragging)};return false};ploneDnDReorder.swapElements=function(child1,child2){var parent=child1.parent();var items=parent.children('[id]');items.removeClass('even').removeClass('odd');if(child1[0].swapNode){child1[0].swapNode(child2[0])} else{var t=parent[0].insertBefore(document.createTextNode(''),child1[0]);child1.insertBefore(child2);child2.insertBefore(t);jq(t).remove()};parent.children('[id]:odd').addClass('even');parent.children('[id]:even').addClass('odd')};ploneDnDReorder.doUp=function(e){var dragging=ploneDnDReorder.dragging;if(!dragging) return;dragging.removeClass("dragging");ploneDnDReorder.updatePositionOnServer();dragging._position=null;try{delete dragging._position} catch(e){};dragging=null;ploneDnDReorder.rows.unbind('mousemove',ploneDnDReorder.doDrag);return false};ploneDnDReorder.updatePositionOnServer=function(){var dragging=ploneDnDReorder.dragging;if(!dragging) return;var delta=ploneDnDReorder.getPos(dragging)-dragging._position;if(delta==0){return};var args={item_id:dragging.attr('id').substr('folder-contents-item-'.length)};args['delta:int']=delta;jQuery.post('folder_moveitem',args)};

/* - collapsiblesections.js - */
// http://www.uniquefabrics.com/portal_javascripts/collapsiblesections.js?original=1
function activateCollapsibles(){jq('dl.collapsible:not([class$=Collapsible])').find('dt.collapsibleHeader:first').click(function(){var c=jq(this).parents('dl.collapsible:first');if(!c)return true;var t=c.hasClass('inline')?'Inline':'Block';c.toggleClass('collapsed'+t+'Collapsible').toggleClass('expanded'+t+'Collapsible')}).end().each(function(){var s=jq(this).hasClass('collapsedOnLoad')?'collapsed':'expanded';var t=jq(this).hasClass('inline')?'Inline':'Block';jq(this).removeClass('collapsedOnLoad').addClass(s+t+'Collapsible')})};jq(activateCollapsibles);

/* - form_tabbing.js - */
// http://www.uniquefabrics.com/portal_javascripts/form_tabbing.js?original=1
var ploneFormTabbing={};ploneFormTabbing._toggleFactory=function(container,tab_ids,panel_ids){return function(e){jq(tab_ids).removeClass('selected');jq(panel_ids).addClass('hidden');var orig_id=this.tagName.toLowerCase()=='a'?'#'+this.id:jq(this).val();var id=orig_id.replace(/^#fieldsetlegend-/,"#fieldset-");jq(orig_id).addClass('selected');jq(id).removeClass('hidden');jq(container).find("input[name=fieldset.current]").val(orig_id);return false}};ploneFormTabbing._buildTabs=function(container,legends){var threshold=6;var tab_ids=[];var panel_ids=[];legends.each(function(i){tab_ids[i]='#'+this.id;panel_ids[i]=tab_ids[i].replace(/^#fieldsetlegend-/,"#fieldset-")});var handler=ploneFormTabbing._toggleFactory(container,tab_ids.join(','),panel_ids.join(','));if(legends.length>threshold){var tabs=document.createElement("select");var tabtype='option';jq(tabs).change(handler).addClass('noUnloadProtection')} else{var tabs=document.createElement("ul");var tabtype='li'}
jq(tabs).addClass('formTabs');legends.each(function(){var tab=document.createElement(tabtype);jq(tab).addClass('formTab');if(legends.length>threshold){jq(tab).text(jq(this).text());tab.id=this.id;tab.value='#'+this.id} else{var a=document.createElement("a");a.id=this.id;a.href="#"+this.id;jq(a).click(handler);var span=document.createElement("span");jq(span).text(jq(this).text());a.appendChild(span);tab.appendChild(a)}
tabs.appendChild(tab);jq(this).remove()});jq(tabs).children(':first').addClass('firstFormTab');jq(tabs).children(':last').addClass('lastFormTab');return tabs};ploneFormTabbing.select=function($which){if(typeof $which=="string")
$which=jq($which.replace(/^#fieldset-/,"#fieldsetlegend-"));if($which[0].tagName.toLowerCase()=='a'){$which.click();return true} else if($which[0].tagName.toLowerCase()=='option'){$which.attr('selected',true);$which.parent().change();return true} else{$which.change();return true}
return false};ploneFormTabbing.initializeDL=function(){var tabs=jq(ploneFormTabbing._buildTabs(this,jq(this).children('dt')));jq(this).before(tabs);jq(this).children('dd').addClass('formPanel');tabs=tabs.find('li.formTab a,option.formTab');if(tabs.length)
ploneFormTabbing.select(tabs.filter(':first'))};ploneFormTabbing.initializeForm=function(){var fieldsets=jq(this).children('fieldset');if(!fieldsets.length) return;var tabs=ploneFormTabbing._buildTabs(this,fieldsets.children('legend'));jq(this).prepend(tabs);fieldsets.addClass("formPanel");jq(this).find('input[name=fieldset.current]').addClass('noUnloadProtection');var tab_inited=false;jq(this).find('.formPanel:has(div.field.error)').each(function(){var id=this.id.replace(/^fieldset-/,"#fieldsetlegend-");var tab=jq(id);tab.addClass("notify");if(tab.length&&!tab_inited)
tab_inited=ploneFormTabbing.select(tab)});jq(this).find('.formPanel:has(div.field span.fieldRequired)').each(function(){var id=this.id.replace(/^fieldset-/,"#fieldsetlegend-");jq(id).addClass('required')});if(!tab_inited){jq('input[name=fieldset.current][value^=#]').each(function(){tab_inited=ploneFormTabbing.select(jq(this).val())})}
if(!tab_inited){var tabs=jq("form.enableFormTabbing li.formTab a,"+"form.enableFormTabbing option.formTab,"+"div.enableFormTabbing li.formTab a,"+"div.enableFormTabbing option.formTab");if(tabs.length)
ploneFormTabbing.select(tabs.filter(':first'))}
jq("#archetypes-schemata-links").addClass('hiddenStructure');jq("div.formControls input[name=form.button.previous],"+"div.formControls input[name=form.button.next]").remove()};jq(function(){jq("form.enableFormTabbing,div.enableFormTabbing").each(ploneFormTabbing.initializeForm);jq("dl.enableFormTabbing").each(ploneFormTabbing.initializeDL);if(window.location.hash&&jq(".enableFormTabbing "+window.location.hash).length){ploneFormTabbing.select(window.location.hash)}});

/* - input-label.js - */
// http://www.uniquefabrics.com/portal_javascripts/input-label.js?original=1
var ploneInputLabel={focus: function(){var t=jq(this);if(t.hasClass('inputLabelActive')&&t.val()==t.attr('title'))
t.val('').removeClass('inputLabelActive');if(t.hasClass('inputLabelPassword'))
ploneInputLabel._setInputType(t.removeClass('inputLabelPassword'),'password').focus().bind('blur.ploneInputLabel',ploneInputLabel.blur)},blur: function(e){var t=jq(this);if(t.is(':password[value=""]')){t=ploneInputLabel._setInputType(this,'text').addClass('inputLabelPassword').bind('focus.ploneInputLabel',ploneInputLabel.focus);if(e.originalEvent&&e.originalEvent.explicitOriginalTarget)
jq(e.originalEvent.explicitOriginalTarget).trigger('focus!')}
if(!t.val())
t.addClass('inputLabelActive').val(t.attr('title'))},submit: function(){jq('input[title].inputLabelActive').trigger('focus.ploneInputLabel')},_setInputType: function(elem,ntype){var otype=new RegExp('type="?'+jq(elem).attr('type')+'"?')
var nelem=jq(jq('<div></div>').append(jq(elem).clone()).html().replace(otype,'').replace(/\/?>/,'type="'+ntype+'" />'));jq(elem).replaceWith(nelem);return nelem}};jq(function(){jq('form:has(input[title].inputLabel)').submit(ploneInputLabel.submit);jq('input[title].inputLabel').bind('focus.ploneInputLabel',ploneInputLabel.focus).bind('blur.ploneInputLabel',ploneInputLabel.blur).trigger('blur.ploneInputLabel')});

/* - se-highlight.js - */
// http://www.uniquefabrics.com/portal_javascripts/se-highlight.js?original=1
var searchEngines=[['^http://([^.]+\\.)?google.*','q='],['^http://search\\.yahoo.*','p='],['^http://search\\.msn.*','q='],['^http://search\\.aol.*','userQuery='],['^http://(www\\.)?altavista.*','q='],['^http://(www\\.)?feedster.*','q='],['^http://search\\.lycos.*','query='],['^http://(www\\.)?alltheweb.*','q='],['^http://(www\\.)?ask\\.com.*','q=']]
function decodeReferrer(ref){if(null==ref&&document.referrer){ref=document.referrer}
if(!ref) return null;var match=new RegExp('');var seQuery='';for(var i=0;i<searchEngines.length;i++){if(!match.compile){match=new RegExp(searchEngines[i][0],'i')} else{match.compile(searchEngines[i][0],'i')}
if(ref.match(match)){if(!match.compile){match=new RegExp('^.*[?&]'+searchEngines[i][1]+'([^&]+)&?.*$','i')} else{match.compile('^.*[?&]'+searchEngines[i][1]+'([^&]+)&?.*$')}
seQuery=ref.replace(match,'$1');if(seQuery){seQuery=decodeURIComponent(seQuery);seQuery=seQuery.replace(/\'|"/, '');return seQuery.split(/[\s,\+\.]+/)}}}
return null}


/* - first_input_focus.js - */
// http://www.uniquefabrics.com/portal_javascripts/first_input_focus.js?original=1
jq(function(){if(jq("form div.error :input:first").focus().length) return;jq("form.enableAutoFocus :input:not(.formTabs):visible:first").focus()});

/* - accessibility.js - */
// http://www.uniquefabrics.com/portal_javascripts/accessibility.js?original=1
function setBaseFontSize(f,r){var b=jq('body');if(r){b.removeClass('smallText').removeClass('largeText');createCookie("fontsize",f,365)}b.addClass(f)};jq(function(){var f=readCookie("fontsize");if(f)setBaseFontSize(f,0)});

/* - styleswitcher.js - */
// http://www.uniquefabrics.com/portal_javascripts/styleswitcher.js?original=1
function setActiveStyleSheet(title,reset){jq('link[rel*=style][title]').attr('disabled',true).find('[title='+title+']').attr('disabled',false);if(reset) createCookie("wstyle",title,365)};jq(function(){var style=readCookie("wstyle");if(style!=null) setActiveStyleSheet(style,0)});

/* - toc.js - */
// http://www.uniquefabrics.com/portal_javascripts/toc.js?original=1
jq(function(){var dest=jq('dl.toc dd.portletItem');var content=getContentArea();if(!content||!dest.length) return;dest.empty();var location=window.location.href;if(window.location.hash)
location=location.substring(0,location.lastIndexOf(window.location.hash));var stack=[];jq(content).find('*').not('.comment > h3').filter(function(){return/^h[1234]$/.test(this.tagName.toLowerCase())}).not('.documentFirstHeading').each(function(i){var level=this.nodeName.charAt(1)-1;while(stack.length<level){var ol=jq('<ol>');if(stack.length){var li=jq(stack[stack.length-1]).children('li:last');if(!li.length)
li=jq('<li>').appendTo(jq(stack[stack.length-1]));li.append(ol)}
stack.push(ol)}
while(stack.length>level) stack.pop();jq(this).before(jq('<a name="section-'+i+'" />'));jq('<li>').append(jq('<a />').attr('href',location+'#section-'+i).text(jq(this).text())).appendTo(jq(stack[stack.length-1]))});if(stack.length){jq('dl.toc').show();oltoc=jq(stack[0]);numdigits=oltoc.children().length.toString().length;oltoc.addClass("TOC"+numdigits+"Digit");dest.append(oltoc);var wlh=window.location.hash;if(wlh){var $target=jq(wlh);$target=$target.length&&$target||jq('[name='+wlh.slice(1)+']');var targetOffset=$target.offset().top;jq('html,body').animate({scrollTop:targetOffset},0)}}});

