
/* 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 -
 */

/* - corner/cssquery2-p.js - */
// http://www.iprlawindia.org/portal_javascripts/corner/cssquery2-p.js?original=1
eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[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}('6 B=7(){6 1j="2.0.2ruzee";6 $23=/\\s*,\\s*/;6 B=7($9,$$a){6 $c=[];6 $1h=o.2q.1Q&&!$$a;6 $1k=($$a)?($$a.2g==1t)?$$a:[$$a]:[z];6 $$u=14($9).1w($23),i;m(i=0;i<$$u.p;i++){$9=1q($$u[i]);b(P&&$9.Z(0,3).1R("")==" *#"){$9=$9.Z(2);$$a=24([],$1k,$9[1])}1s $$a=$1k;6 j=0,$I,$x,$o,$M="";H(j<$9.p){$I=$9[j++];$x=$9[j++];$M+=$I+$x;$o="";b($9[j]=="("){H($9[j++]!=")"&&j<$9.p){$o+=$9[j]}$o=$o.Z(0,-1);$M+="("+$o+")"}$$a=($1h&&O[$M])?O[$M]:1u($$a,$I,$x,$o);b($1h)O[$M]=$$a}$c=$c.2i($$a)}1S B.2k;8 $c};B.1B=7(){8"7 B() {\\n  [1j "+1j+"]\\n}"};6 O={};B.1Q=R;B.2l=7($9){b($9){$9=1q($9).1R("");1S O[$9]}1s O={}};6 28={};6 1g=R;B.2m=7($J,$15){b(1g)1f("$15="+21($15));28[$J]=17 $15()};B.2n=7($F){8 $F?1f($F):l};6 u={};6 L={};6 t={c:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};6 E=[];u[" "]=7($f,$a,$k,$h){6 $5,i,j;m(i=0;i<$a.p;i++){6 $10=T($a[i],$k,$h);m(j=0;($5=$10[j]);j++){b(D($5)&&16($5,$h))$f.q($5)}}};u["#"]=7($f,$a,$v){6 $5,j;m(j=0;($5=$a[j]);j++)b($5.v==$v)$f.q($5)};u["."]=7($f,$a,$N){$N=17 1M("(^|\\\\s)"+$N+"(\\\\s|$)");6 $5,i;m(i=0;($5=$a[i]);i++)b($N.d($5.N))$f.q($5)};u[":"]=7($f,$a,$1V,$o){6 $d=L[$1V],$5,i;b($d)m(i=0;($5=$a[i]);i++)b($d($5,$o))$f.q($5)};L["2p"]=7($5){6 $z=X($5);b($z.1m)m(6 i=0;i<$z.1m.p;i++){b($z.1m[i]==$5)8 18}};L["2B"]=7($5){};6 D=7($5){8($5&&$5.1v==1&&$5.k!="!")?$5:1T};6 1d=7($5){H($5&&($5=$5.2s)&&!D($5))1W;8 $5};6 12=7($5){H($5&&($5=$5.2t)&&!D($5))1W;8 $5};6 1Z=7($5){8 D($5.1Y)||12($5.1Y)};6 2v=7($5){8 D($5.1X)||1d($5.1X)};6 U=7($5){6 $U=[];$5=1Z($5);H($5){$U.q($5);$5=12($5)}8 $U};6 P=18;6 1o=7($5){6 $z=X($5);8(2y $z.20=="2A")?/\\.26$/i.d($z.2C):2D($z.20=="2F 2G")};6 X=7($5){8 $5.2H||$5.z};6 T=7($5,$k){8($k=="*"&&$5.1l)?$5.1l:$5.T($k)};6 1b=7($5,$k,$h){b($k=="*")8 D($5);b(!16($5,$h))8 R;b(!1o($5))$k=$k.2J();8 $5.k==$k};6 16=7($5,$h){8!$h||($h=="*")||($5.2K==$h)};6 1J=7($5){8 $5.1K};7 24($f,$a,v){6 $c,i,j;m(i=0;i<$a.p;i++){b($c=$a[i].1l.2L(v)){b($c.v==v)$f.q($c);1s b($c.p!=1T){m(j=0;j<$c.p;j++){b($c[j].v==v)$f.q($c[j])}}}}8 $f};b(![].q)1t.29.q=7(){m(6 i=0;i<o.p;i++){l[l.p]=o[i]}8 l.p};6 $19=/\\|/;7 1u($$a,$I,$x,$o){b($19.d($x)){$x=$x.1w($19);$o=$x[0];$x=$x[1]}6 $f=[];b(u[$I]){u[$I]($f,$$a,$x,$o)}8 $f};6 $1y=/^[^\\s>+~]/;6 $$1z=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;7 1q($9){b($1y.d($9))$9=" "+$9;8 $9.c($$1z)||[]};6 $1A=/\\s*([\\s>+~(),]|^|$)\\s*/g;6 $22=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;6 14=7($9){8 $9.C($1A,"$1").C($22,"$1*$2")};6 1p={1B:7(){8"\'"},c:/^(\'[^\']*\')|("[^"]*")$/,d:7($y){8 l.c.d($y)},1D:7($y){8 l.d($y)?$y:l+$y+l},1C:7($y){8 l.d($y)?$y.Z(1,-1):$y}};6 1U=7($1F){8 1p.1C($1F)};6 $1G=/([\\/()[\\]?{}|*+-])/g;7 1a($y){8 $y.C($1G,"\\\\$1")};u[">"]=7($f,$a,$k,$h){6 $5,i,j;m(i=0;i<$a.p;i++){6 $10=U($a[i]);m(j=0;($5=$10[j]);j++)b(1b($5,$k,$h))$f.q($5)}};u["+"]=7($f,$a,$k,$h){m(6 i=0;i<$a.p;i++){6 $5=12($a[i]);b($5&&1b($5,$k,$h))$f.q($5)}};u["@"]=7($f,$a,$1H){6 $d=E[$1H].d;6 $5,i;m(i=0;($5=$a[i]);i++)b($d($5))$f.q($5)};L["2c-2d"]=7($5){8!1d($5)};L["1e"]=7($5,$F){$F=17 1M("^"+$F,"i");H($5&&!$5.Q("1e"))$5=$5.2e;8 $5&&$F.d($5.Q("1e"))};t.1O=/\\\\:/g;t.1i="@";t.K={};t.C=7($c,$r,$h,$1N,$A){6 $13=l.1i+$c;b(!E[$13]){$r=l.1P($r,$1N||"",$A||"");E[$13]=$r;E.q($r)}8 E[$13].v};t.1L=7($9){$9=$9.C(l.1O,"|");6 $c;H($c=$9.c(l.c)){6 $C=l.C($c[0],$c[1],$c[2],$c[3],$c[4]);$9=$9.C(l.c,$C)}8 $9};t.1P=7($1n,$d,$A){6 $S={};$S.v=l.1i+E.p;$S.J=$1n;$d=l.K[$d];$d=$d?$d(l.Q($1n),1U($A)):R;$S.d=17 2r("e","8 "+$d);8 $S};t.Q=7($J){27($J.2u()){G"v":8"e.v";G"2z":8"e.N";G"m":8"e.2E";G"25":b(P){8"21((e.2I.c(/25=\\\\1r?([^\\\\s\\\\1r]*)\\\\1r?/)||[])[1]||\'\')"}}8"e.Q(\'"+$J.C($19,":")+"\')"};t.K[""]=7($r){8 $r};t.K["="]=7($r,$A){8 $r+"=="+1p.1D($A)};t.K["~="]=7($r,$A){8"/(^| )"+1a($A)+"( |$)/.d("+$r+")"};t.K["|="]=7($r,$A){8"/^"+1a($A)+"(-|$)/.d("+$r+")"};6 1I=14;14=7($9){8 1I(t.1L($9))};P=1f("R;/*@2f@b(@\\2h)P=18@2j@*/");b(!P){T=7($5,$k,$h){8 $h?$5.2o("*",$k):$5.T($k)};16=7($5,$h){8!$h||($h=="*")||($5.2w==$h)};1o=z.1x?7($5){8/26/i.d(X($5).1x)}:7($5){8 X($5).2a.k!="2b"};1J=7($5){8 $5.Y||$5.1K||1c($5)};7 1c($5){6 $Y="",$V,i;m(i=0;($V=$5.2x[i]);i++){27($V.1v){G 11:G 1:$Y+=1c($V);1E;G 3:$Y+=$V.2M;1E}}8 $Y}}1g=18;8 B}();',62,173,'|||||element|var|function|return|selector|from|if|match|test||results||namespace|||tagName|this|for||arguments|length|push|attribute||AttributeSelector|selectors|id||filter|string|document|value|cssQuery|replace|thisElement|attributeSelectors|code|case|while|token|name|tests|pseudoClasses|cacheSelector|className|cache|isMSIE|getAttribute|false|attributeSelector|getElementsByTagName|childElements|node||getDocument|textContent|slice|subset||nextElementSibling|key|parseSelector|script|compareNamespace|new|true|NAMESPACE|regEscape|compareTagName|_getTextContent|previousElementSibling|lang|eval|loaded|useCache|PREFIX|version|base|all|links|propertyName|isXML|Quote|_toStream|x22|else|Array|select|nodeType|split|contentType|STANDARD_SELECT|STREAM|WHITESPACE|toString|remove|add|break|text|ESCAPE|attributeSelectorID|_parseSelector|getTextContent|innerText|parse|RegExp|compare|NS_IE|create|caching|join|delete|null|getText|pseudoClass|continue|lastChild|firstChild|firstElementChild|mimeType|String|IMPLIED_ALL|COMMA|_msie_selectById|href|xml|switch|modules|prototype|documentElement|HTML|first|child|parentNode|cc_on|constructor|x5fwin32|concat|end|error|clearCache|addModule|valueOf|getElementsByTagNameNS|link|callee|Function|previousSibling|nextSibling|toLowerCase|lastElementChild|prefix|childNodes|typeof|class|unknown|visited|URL|Boolean|htmlFor|XML|Document|ownerDocument|outerHTML|toUpperCase|scopeName|item|nodeValue'.split('|'),0,{}))


/* - corner/ruzeeborders.js - */
// http://www.iprlawindia.org/portal_javascripts/corner/ruzeeborders.js?original=1
var RUZEE=window.RUZEE||{};RUZEE.userAgent=navigator.userAgent.toLowerCase();RUZEE.isIE=typeof window.RUZEE.isIE!='undefined'?window.RUZEE.isIE:RUZEE.userAgent.indexOf('msie')>=0&&RUZEE.userAgent.indexOf('opera')==-1;RUZEE.Borders={autoRender:true,add:function(mappings){for(rule in mappings){var rules=rule.split(',');for(var i=0;i<rules.length;++i){var r=rules[i].replace(/^\s+|\s+$/,'');var ms=RUZEE.Borders.mappings[r]||{};for(m in mappings[rule]) ms[m]=mappings[rule][m];RUZEE.Borders.mappings[r]=ms}}},render:function(onfinished){if(onfinished) RUZEE.Borders.onfinished=onfinished;var start=new Date().getTime();for(rule in RUZEE.Borders.mappings){var e=RUZEE.Borders.cssQuery(rule);var b=new RUZEE.Borders.Border(RUZEE.Borders.mappings[rule]);delete RUZEE.Borders.mappings[rule];b.calc(e);if(new Date().getTime()-start>3000){setTimeout('RUZEE.Borders.render()',0);return}}
RUZEE.Borders.renderCalcs();if(RUZEE.Borders.onfinished) RUZEE.Borders.onfinished()},mappings:{},cache:{},calcs:[],cssQuery:function(s){var c=s.charAt(0);if(c=='#'&&!(/\s/.test(s))) return [document.getElementById(s.substr(1))];if(window.cssQuery) return window.cssQuery(s);alert("Don't know what to do with '"+s+"' Did you forget to include cssquery?");return []},addCalc:function(calc){RUZEE.Borders.calcs.push(calc)},renderCalcs:function(){for(var i=0;i<RUZEE.Borders.calcs.length;++i){RUZEE.Borders.calcs[i]()}
RUZEE.Borders.calcs=[]}};RUZEE.Borders.Border=function(d){var t=this;var _cornerRadius,_shadowRadius,_shadowPadding,_shadowShift,_coShadowS,_coBgIn,_coBorder,_coBgOut,_imgBgInURL,_imgBgInRepeat,_isL,_isR,_isT,_isB,_imgBgInURL,_cacheID,_psT,_psB,_wBorder,_height;var setBgImg=function(e,x,y){if(!_imgBgInURL) return;e.style.backgroundImage=_imgBgInURL;x=-x;y=-y;e.style.backgroundPosition=x+'px '+y+'px';if(_imgBgInRepeat) e.style.backgroundRepeat=_imgBgInRepeat};var crDiv=function(w,h,bg,o){var d=RUZEE.isXHTML?document.createElementNS('http://www.w3.org/1999/xhtml','div'):document.createElement('div');d.style.padding=d.style.margin='0px';d.style.border='none';d.style.width=w?w:'auto';if(h){d.style.height=h;d.style.fontSize="0";d.style.lineHeight="0px"}
if(!bg) bg='transparent';d.style.background=bg;if(o) d.style.overflow=o;return d};var addLR=function(c,co,w,h,bgx,bgy){var e=crDiv(null,h,co);if(typeof bgx!='undefined') setBgImg(e,bgx,bgy);if(!w) w='1px';c.style.margin='0px '+(_isR?w:'0px')+' 0px '+(_isL?w:'0px');e.appendChild(c);return e};var crTB=function(top){var ca=RUZEE.Borders.cache[_cacheID+'.'+top];if(ca){if(top){_psT=ca.ps}else{_psB=ca.ps}
return ca.el.cloneNode(true)}
var sh=top?-_shadowShift:_shadowShift;var cxc=_shadowPadding-_cornerRadius-1;var cxb=cxc;var cxe=cxc+_cornerRadius;var exb=0;var exe=cxc-1;var syc=_cornerRadius-_shadowPadding+sh+1;var yb,ye;var cwb=_wBorder;if(cwb==0) cwb=1;if(top){if(!_isT){_psT=1;return crDiv(null,'1px')}
yb=syc+_shadowRadius-1;ye=cwb>_shadowRadius?syc+_shadowRadius-cwb-1:syc-1;yi=-1;_psT=yb-ye}else{if(!_isB){_psB=1;return crDiv(null,'1px')}
yb=cwb>_shadowRadius?syc+_shadowRadius-cwb:syc;yb=yb<0?yb:0;ye=syc+_shadowRadius;yi=1;_psB=ye-yb}
var e=crDiv(null,Math.abs(yb-ye)+'px',null,'hidden');for(var y=yb;y!=ye;y+=yi){var co;if(y<=_cornerRadius-cwb){co=_coBgIn}else if(y<=_cornerRadius){co=_coBorder}else if(y-syc<0){co=_coShadow}else{co=rzBlend(_coShadow,_coBgOut,(y-syc)/_shadowRadius)}
var line=crDiv(null,'1px',rzC2S(co),'hidden');var fstLine=line;var xbg=null;for(var x=0;x<_shadowRadius;++x){var isIn=false,doBgImg=false;var sd,out=0;if(y<syc){sd=x}else{sd=Math.sqrt(Math.sqr(x)+Math.sqr(y-syc))}
if(_shadowRadius>_cornerRadius&&sd<=_shadowRadius){co=rzBlend(_coShadow,_coBgOut,sd/_shadowRadius)}else{co=_coBgOut;out++}
if(y<=_cornerRadius){if(x>=exb&&x<=exe){if(y>_cornerRadius-cwb){co=_coBorder}else{isIn=true}}else if(x>=cxb&&x<=cxe){var cd=Math.sqrt(Math.sqr(x-cxc)+Math.sqr(y))-_cornerRadius;if(y<0){if(x-cxc>_cornerRadius-_wBorder){co=_coBorder}else{isIn=true}}else if(cd<-cwb){isIn=true}else if(cd<-cwb+1){co=rzBlend(_coBgIn,_coBorder,cd+cwb)}else if(cd<0){co=_coBorder}else if(cd<=1){co=rzBlend(_coBorder,co,cd)}else{out++}}}else{out++}
if(!isIn&&line==fstLine&&y<=_cornerRadius-cwb&&top){setBgImg(fstLine,_shadowRadius-x,yb-y)}
if(out>1){line=addLR(line,'transparent',(_shadowRadius-x)+'px');x=_shadowRadius}else{if(!isIn){if(RUZEE.isIE&&x==_shadowRadius-12) line=addLR(line);line=addLR(line,rzC2S(co))}
if(doBgImg) setBgImg(line,_shadowRadius-x,yb-y+1)}}
e.appendChild(line)}
var ce={el:e,ps:top?_psT:_psB};RUZEE.Borders.cache[_cacheID+'.'+top]=ce;return e};var crLR=function(e){var coBgInS=rzC2S(_coBgIn);var coBS=rzC2S(_coBorder);e.style.position='relative';if(_wBorder>0) e=addLR(e,coBS,_wBorder+'px');e.style.position='relative';for(var x=_shadowPadding;x<_shadowRadius;++x){coS=rzC2S(rzBlend(_coShadow,_coBgOut,x/_shadowRadius));e=addLR(e,coS);e.style.position='relative'}
return e};var setEdges=function(ed){ed=ed?ed.toLowerCase():'lrtb';_isL=ed.indexOf('l')>=0;_isR=ed.indexOf('r')>=0;_isT=ed.indexOf('t')>=0;_isB=ed.indexOf('b')>=0};var calcP=function(e){RUZEE.isXHTML=typeof window.RUZEE.isXHTML!='undefined'?window.RUZEE.isXHTML:(/html\:/.test(document.getElementsByTagName('body')[0].nodeName));if(!e) return;if(e.constructor==Array){for(var i=0;i<e.length;++i) calcP(e[i]);return}
_imgBgInURL=rzGetStyle(e,'background-image');if(_imgBgInURL&&_imgBgInURL=='none') _imgBgInURL=null;if(_imgBgInURL){_imgBgInRepeat=rzGetStyle(e,'background-repeat')}
_coBgIn=rzS2C(rzGetBg(e));_coBgOut=rzS2C(rzGetBg(e.parentNode));var borderCSS='border-'+(_isT?'top-':'bottom-');var bs=rzGetStyle(e,borderCSS+'style','none');if(bs&&bs!=''&&bs!='none'&&bs!='hidden'){_coBorder=rzS2C(rzGetStyle(e,borderCSS+'color','black'));_wBorder=rzPX2I(rzGetStyle(e,borderCSS+'width','1px'))}else{_coBorder=_coBgIn;_wBorder=0}
_coShadow=_coShadowS=='.fade'?_coBorder:rzS2C(_coShadowS);_cacheID=rzC2S(_coBgIn)+'.'+rzC2S(_coBgOut)+'.'+rzC2S(_coBorder)+'.'+rzC2S(_coShadow)+'.'+_wBorder+'.'+_isL+_isR+_isT+_isB+'.'+_cornerRadius+'.'+_shadowRadius+'.'+_shadowPadding+'.'+this.shadowShift+'.'+_imgBgInURL+'.'+_imgBgInRepeat;var eb=crDiv();var elOb=crDiv();var elO=crDiv();var elI=crDiv();var elCw=crDiv();var elCb=crDiv();var elC=crDiv();eb.style.position=elC.style.position=elCw.style.position='relative';elC.style.zIndex=2;eb.appendChild(elOb);elOb.appendChild(crDiv(null,'1px'));elOb.appendChild(elO);elOb.appendChild(crDiv(null,'1px'));elI.appendChild(elCw);elCw.appendChild(elCb);elCb.appendChild(elC);elO.appendChild(crTB(true));var elTB=crLR(elI);elO.appendChild(elTB);elO.appendChild(crTB(false));var psLR=_shadowRadius-_shadowPadding+_wBorder;var psL=_isL?psLR:0;var psR=_isR?psLR:0;var isTB=_isT&&_isB;var psT=_psT;var psB=_psB;var bgImgY=_psT;setBgImg(elI,psL,bgImgY);elI.style.backgroundColor=rzC2S(_coBgIn);var end=crDiv('1px','1px');elI.insertBefore(end,elCw);elI.appendChild(end.cloneNode(true));psT++;psB++;if(_height){elC.style.height=_height+'px'}
var update=function(l,ps){var padL='padding-'+l;var padCC=rzCC(padL);var marL='margin-'+l;var marCC=rzCC(marL);var borL='border-'+l+'-width';var borCC=rzCC(borL);var pad=rzGetStyle(e,padL);var borPx=rzPX2I(rzGetStyle(e,borL));var borPxNeg=(l=='top'||l=='bottom')?-borPx-1:-borPx;if(!_isB&&l=='bottom') borPx-=2;if(!_isT&&l=='top') borPx-=2;eb.style[marCC]=borPx+'px';elO.style[marCC]='-'+pad;elOb.style[marCC]=borPxNeg+'px';elCw.style[marCC]=(-ps)+'px';elC.style[marCC]=pad;elCb.style[marCC]=borPx+'px';return function(){if(RUZEE.isIE){if(l=='top') elOb.style[marCC]='-1px';if(l=='bottom') e.style[padCC]='1px'}}};var funcs=[update('top',psT),update('bottom',psB),update('left',psL),update('right',psR)];RUZEE.Borders.addCalc(function(){for(var i=0;i<funcs.length;++i) funcs[i]();e.style.border='none';e.style.background='transparent';e.style.backgroundImage='none';if(RUZEE.isIE){e.style.height='1%'}
e.style.position='relative';e.appendChild(eb);while(e.childNodes.length>1){elC.appendChild(e.removeChild(e.childNodes[0]))}})};var pub={init:function(d){var rad=d.cornerRadius||8;_height=d.height||0;_shadowShift=0;setEdges(d.edges||'lrtb');switch(d.borderType){case 'simple':_cornerRadius=_shadowRadius=_shadowPadding=rad;_coShadowS='000';break;case 'shadow':var sw=d.shadowWidth||8;_cornerRadius=rad;_shadowRadius=rad+sw*2;_shadowPadding=rad+sw;_shadowShift=Math.round(sw/2);_coShadowS=d.shadowColor||'000';break;case 'fade':_cornerRadius=_shadowPadding=1;_shadowRadius=rad;_coShadowS='.fade';break;case 'glow':_cornerRadius=_shadowPadding=rad;_shadowRadius=rad+(d.glowWidth||rad);_coShadowS=d.glowColor||'fff';break;default:alert('Unknown borderType: '+d.borderType)}},calc:calcP,render:function(e){t.calc(e);RUZEE.Borders.renderCalcs()},draw:function(e,edges){setEdges(edges?edges.toLowerCase():'lrtb');if(typeof e=='string'){if(e.charAt(0)!='.') e='#'+e;e=RUZEE.Borders.cssQuery(e)}
t.render(e)}};pub.init(d);delete pub.init;for(m in pub) t[m]=pub[m]};if(RUZEE.Events){RUZEE.Events.add(window,'domload',function(){if(RUZEE.Borders.autoRender) RUZEE.Borders.render()})}
Math.sqr=function(x){return x*x};
function rzCC(s){for(var exp=/-([a-z])/;exp.test(s);s=s.replace(exp,RegExp.$1.toUpperCase()));return s};
function rzGetStyle(e,a,d){if(e==null) return d;var v=null;if(document.defaultView&&document.defaultView.getComputedStyle){var cs=document.defaultView.getComputedStyle(e,null);if(cs&&cs.getPropertyValue) v=cs.getPropertyValue(a)}
if(!v&&e.currentStyle) v=e.currentStyle[rzCC(a)];return v?v:d?d:null};
function rzGetBg(e){var v=rzGetStyle(e,'background-color');while(!v||v=='transparent'||v=='#000000'||v=='rgba(0, 0, 0, 0)'){if(e==document.body) v='fff';else{e=e.parentNode;v=rzGetStyle(e,'background-color')}}
return v};
function rzPX2I(px){if(!px) return 0;var p=/\s*(\d\d*)px/.exec(px);if(p) return parseInt(p[1]);return 0};
function rzS2C(s,d){if(!s) return d?rzS2C(d):[0,0,0,0];if(s.charAt(0)=='#') s=s.substr(1,6);s=s.replace(/ /g,'').toLowerCase();var COLORS={aqua:'00ffff',black:'000000',blue:'0000ff',fuchsia:'ff00ff',gray:'808080',green:'008000',lime:'00ff00',maroon:'800000',navy:'000080',olive:'808000',orange:'ffa500',purple:'800080',red:'ff0000',silver:'c0c0c0',teal:'008080',white:'ffffff',yellow:'ffff00'};for(var key in COLORS) if(s==key) s=COLORS[key];var p=/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(s);if(p) return [parseInt(p[1]),parseInt(p[2]),parseInt(p[3]),parseInt(p[4])];var p=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(s);if(p) return [parseInt(p[1]),parseInt(p[2]),parseInt(p[3]),255];p=/^(\w{2})(\w{2})(\w{2})$/.exec(s);if(p) return [parseInt(p[1],16),parseInt(p[2],16),parseInt(p[3],16),255];p=/^(\w{1})(\w{1})(\w{1})$/.exec(s);if(p) return [parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16),parseInt(p[3]+p[3],16),255];return d?rzS2C(d):[0,0,0,0]};
function rzC2S(c){if(typeof c=='string') return c;r='0'+c[0].toString(16);g='0'+c[1].toString(16);b='0'+c[2].toString(16);return '#'+r.substring(r.length-2)+g.substring(g.length-2)+b.substring(b.length-2)};
function rzBlend(a,b,w){return Array(Math.round(a[0]+(b[0]-a[0])*w),Math.round(a[1]+(b[1]-a[1])*w),Math.round(a[2]+(b[2]-a[2])*w),Math.round(a[3]+(b[3]-a[3])*w))};
function rzCrSimpleBorder(rad){return new RUZEE.Borders.Border({borderType:'simple',cornerRadius:rad})};
function rzCrShadowBorder(rad,smar,coShadowS){return new RUZEE.Borders.Border({borderType:'shadow',cornerRadius:rad,shadowWidth:smar,shadowColor:coShadowS})};
function rzCrFadeBorder(rad){return new RUZEE.Borders.Border({borderType:'fade',cornerRadius:rad})};
function rzCrGlowBorder(rad,gmar,coGlowS){return new RUZEE.Borders.Border({borderType:'glow',cornerRadius:rad,glowWidth:gmar,glowColor:coGlowS})};RUZEE.Borders.add({'.glow1':{borderType:'glow',cornerRadius:4,glowRadius:5,glowColor:'white'},'#glow':{borderType:'glow',cornerRadius:4,glowRadius:5,glowColor:'white'},'.someclass':{borderType:'glow',cornerRadius:20,height:100,glowRadius:5,glowColor:'white'},'.onlyTop, .onlyBottom, #onlyLeft, #onlyRight':{borderType:'shadow',cornerRadius:5,shadowWidth:7},'.onlyTop':{edges:'lrt'},'.onlyBottom':{edges:'lrb'},'#onlyLeft':{edges:'ltb'},'#onlyRight':{edges:'rtb'},'#withbgimg1':{borderType:'simple',cornerRadius:20},'#withbgimg2':{borderType:'shadow',cornerRadius:10,shadowWidth:10}});window.onload=function(){RUZEE.Borders.render()};

/* - fckeditor.js - */
// http://www.iprlawindia.org/portal_javascripts/fckeditor.js?original=1
var FCKeditor=function(instanceName,width,height,toolbarSet,value){this.InstanceName=instanceName ;this.Width=width||'100%' ;this.Height=height||'200' ;this.ToolbarSet=toolbarSet||'Default' ;this.Value=value||'' ;this.BasePath='/fckeditor/' ;this.CheckBrowser=true ;this.DisplayErrors=true ;this.EnableSafari=false ;this.EnableOpera=false ;this.Config=new Object() ;this.OnError=null }
FCKeditor.prototype.Version='2.4.3' ;FCKeditor.prototype.VersionBuild='15657' ;FCKeditor.prototype.Create=function(){document.write(this.CreateHtml()) }
FCKeditor.prototype.CreateHtml=function(){if(!this.InstanceName||this.InstanceName.length==0){this._ThrowError(701,'You must specify an instance name.') ;return '' }
var sHtml='<div>' ;if(!this.CheckBrowser||this._IsCompatibleBrowser()){sHtml+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />' ;sHtml+=this._GetConfigHtml() ;sHtml+=this._GetIFrameHtml() }
else{var sWidth=this.Width.toString().indexOf('%')>0?this.Width:this.Width+'px' ;var sHeight=this.Height.toString().indexOf('%')>0?this.Height:this.Height+'px' ;sHtml+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+sWidth+';height:'+sHeight+'">'+this._HTMLEncode(this.Value)+'<\/textarea>' }
sHtml+='</div>' ;return sHtml }
FCKeditor.prototype.ReplaceTextarea=function(){if(!this.CheckBrowser||this._IsCompatibleBrowser()){var oTextarea=document.getElementById(this.InstanceName) ;var colElementsByName=document.getElementsByName(this.InstanceName) ;var i=0;while(oTextarea||i==0){if(oTextarea&&oTextarea.tagName.toLowerCase()=='textarea')
break ;oTextarea=colElementsByName[i++] }
if(!oTextarea){alert('Error: The TEXTAREA with id or name set to "'+this.InstanceName+'" was not found') ;return }
oTextarea.style.display='none' ;this._InsertHtmlBefore(this._GetConfigHtml(),oTextarea) ;this._InsertHtmlBefore(this._GetIFrameHtml(),oTextarea) }}
FCKeditor.prototype._InsertHtmlBefore=function(html,element){if(element.insertAdjacentHTML)
element.insertAdjacentHTML('beforeBegin',html) ;else{var oRange=document.createRange() ;oRange.setStartBefore(element) ;var oFragment=oRange.createContextualFragment(html);element.parentNode.insertBefore(oFragment,element) }}
FCKeditor.prototype._GetConfigHtml=function(){var sConfig='' ;for(var o in this.Config){if(sConfig.length>0) sConfig+='&amp;' ;sConfig+=encodeURIComponent(o)+'='+encodeURIComponent(this.Config[o]) }
return '<input type="hidden" id="'+this.InstanceName+'___Config" value="'+sConfig+'" style="display:none" />' }
FCKeditor.prototype._GetIFrameHtml=function(){var sFile='fckeditor.html' ;try{if((/fcksource=true/i).test(window.top.location.search))
sFile='fckeditor.original.html' }
catch(e){}
var sLink=this.BasePath+'editor/'+sFile+'?InstanceName='+encodeURIComponent(this.InstanceName) ;if(this.ToolbarSet) sLink+='&amp;Toolbar='+this.ToolbarSet ;return '<iframe id="'+this.InstanceName+'___Frame" src="'+sLink+'" width="'+this.Width+'" height="'+this.Height+'" frameborder="0" scrolling="no"></iframe>' }
FCKeditor.prototype._IsCompatibleBrowser=function(){return FCKeditor_IsCompatibleBrowser(this.EnableSafari,this.EnableOpera) }
FCKeditor.prototype._ThrowError=function(errorNumber,errorDescription){this.ErrorNumber=errorNumber ;this.ErrorDescription=errorDescription ;if(this.DisplayErrors){document.write('<div style="COLOR: #ff0000">') ;document.write('[ FCKeditor Error '+this.ErrorNumber+': '+this.ErrorDescription+' ]') ;document.write('</div>') }
if(typeof(this.OnError)=='function')
this.OnError(this,errorNumber,errorDescription) }
FCKeditor.prototype._HTMLEncode=function(text){if(typeof(text)!="string")
text=text.toString() ;text=text.replace(/&/g,"&amp;").replace(/"/g, "&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;") ;return text }
function FCKeditor_IsCompatibleBrowser(enableSafari,enableOpera){var sAgent=navigator.userAgent.toLowerCase() ;if(sAgent.indexOf("msie")!=-1&&sAgent.indexOf("mac")==-1&&sAgent.indexOf("opera")==-1){var sBrowserVersion=navigator.appVersion.match(/MSIE (.\..)/)[1] ;return(sBrowserVersion>=5.5) }
if(navigator.product=="Gecko"&&navigator.productSub>=20030210&&!(typeof(opera)=='object'&&opera.postError))
return true ;if(enableOpera&&sAgent.indexOf('opera')==0&&parseInt(navigator.appVersion,10)>=9)
return true ;if(enableSafari&&sAgent.indexOf('safari')!=-1)
return(sAgent.match(/safari\/(\d+)/ )[1] >= 312 ) ;	// Build must be at least 312(1.3)
return false }

/* - fck_plone.js - */
// http://www.iprlawindia.org/portal_javascripts/fck_plone.js?original=1
var FCKBaseHref={};makeLinksRelative=function(basehref,contents){var base=basehref.replace('http://www.iprlawindia.org','');var href=base.replace(/\/[^\/]*$/,'/');var hrefparts=href.split('/');return contents.replace(/(<[^>]* (?:src|href)=")([^"]*)"/g,
function(str,tag,url,offset,contents){url=url.replace('http://www.iprlawindia.org','');if(url.substring(0,1)=='#'){str=tag+url+'"'}
else{var urlparts=url.split('#');var anchor=urlparts[1]||'';url=urlparts[0];var urlparts=url.split('/');var common=0;while(common<urlparts.length&&common<hrefparts.length&&urlparts[common]==hrefparts[common])
common++;var last=urlparts[common];if(common+1==urlparts.length&&last=='emptypage'){urlparts[common]=''}
if(common>0){var path=new Array();var i=0;for(;i+common<hrefparts.length-1;i++){path[i]='..'};while(common<urlparts.length){path[i++]=urlparts[common++]};if(i==0){path[i++]='.'}
str=path.join('/');if(anchor){str=[str,anchor].join('#')}
str=tag+str+'"'}}
return str})};finalizePublication=function(editorInstance){var oField=editorInstance.LinkedField;var fieldName=oField.name;var baseHref=FCKBaseHref[fieldName];if(baseHref){relativeLinksHtml=makeLinksRelative(FCKBaseHref[fieldName],editorInstance.GetXHTML());oField.value=relativeLinksHtml}}
getParamValue=function(id){value=document.getElementById(id).value;if(value=='true') return true;if(value=='false') return false;return value}
FCKeditor_Plone_start_instance=function(fckContainer,inputname){var inputContainer=document.getElementById(inputname+'_'+'cleaninput');if(inputContainer){var fckParams=['path_user','base_path','fck_basehref','links_basehref','input_url','allow_server_browsing','browser_root','allow_file_upload','allow_image_upload','allow_flash_upload','fck_skin_path','lang','fck_default_r2l','force_paste_as_text','allow_latin_entities','spellchecker','keyboard_entermode','keyboard_shiftentermode','fck_toolbar','editor_width','editor_height'];var fckValues={};for(var i=0;i<fckParams.length;i++){var id=inputname+'_'+fckParams [i];fckValues [fckParams [i]]=getParamValue(id)}
var oFck=new FCKeditor(inputname);var pathUser=fckValues ['path_user']+'/';oFck.BasePath=fckValues ['base_path']+'/';oFck.Config['CustomConfigurationsPath']=fckValues ['input_url']+'/fckconfigPlone.js?field_name='+inputname;oFck.BaseHref=fckValues ['fck_basehref'];FCKBaseHref[inputname]=fckValues ['links_basehref'];oFck.Value=inputContainer.innerHTML;oFck.Config['LinkBrowser']=fckValues ['allow_server_browsing'];oFck.Config['LinkBrowserURL']=fckValues ['base_path']+'/fckbrowser/browser.html?field_name='+inputname+'&Connector='+fckValues ['input_url']+'/connectorPlone&ServerPath='+fckValues ['browser_root']+'&CurrentPath='+pathUser ;oFck.Config['LinkUpload']=fckValues ['allow_file_upload'] ;oFck.Config['LinkUploadURL']=fckValues ['input_url']+'/uploadPlone?field_name='+inputname+'&CurrentPath='+pathUser;oFck.Config['ImageBrowser']=fckValues ['allow_server_browsing'];oFck.Config['ImageBrowserURL']=fckValues ['base_path']+'/fckbrowser/browser.html?field_name='+inputname+'&Type=Image&Connector='+fckValues ['input_url']+'/connectorPlone&ServerPath='+fckValues ['browser_root']+'&CurrentPath='+pathUser ;oFck.Config['ImageUpload']=fckValues ['allow_image_upload'] ;oFck.Config['ImageUploadURL']=fckValues ['input_url']+'/uploadPlone?field_name='+inputname+'&CurrentPath='+pathUser;oFck.Config['FlashBrowser']=fckValues ['allow_server_browsing'];oFck.Config['FlashBrowserURL']=fckValues ['base_path']+'/fckbrowser/browser.html?field_name='+inputname+'&Type=Flash&Connector='+fckValues ['input_url']+'/connectorPlone&ServerPath='+fckValues ['browser_root']+'&CurrentPath='+pathUser ;oFck.Config['FlashUpload']=fckValues ['allow_flash_upload'] ;oFck.Config['FlashUploadURL']=fckValues ['input_url']+'/uploadPlone?field_name='+inputname+'&CurrentPath='+pathUser;oFck.Config['SkinPath']=fckValues ['base_path']+'/editor/'+fckValues ['fck_skin_path'];oFck.Config['AutoDetectLanguage']=false;oFck.Config['DefaultLanguage']=fckValues ['lang'];oFck.Config['ForcePasteAsPlainText']=fckValues ['force_paste_as_text'];oFck.Config['IncludeLatinEntities']=fckValues ['allow_latin_entities'];oFck.Config['SpellChecker']=fckValues ['spellchecker'];oFck.Config['EnterMode']=fckValues ['keyboard_entermode'];oFck.Config['ShiftEnterMode']=fckValues ['keyboard_shiftentermode'];oFck.ToolbarSet=fckValues ['fck_toolbar'];oFck.Width=fckValues ['editor_width'];oFck.Height=fckValues ['editor_height'];try{fckContainer.innerHTML=oFck.CreateHtml();document.getElementById(inputname+'_fckLoading').style.display='none'}
catch(e){document.getElementById(inputname+'_fckLoading').style.display='none';document.getElementById(inputname+'_fckError').style.display='block'}}}
Save_inline=function(fieldname,form,editorInstance){if(editorInstance.Commands.GetCommand('FitWindow').GetState()){kukit.log('Full screen mode must be disabled before saving inline');editorInstance.Commands.GetCommand('FitWindow').Execute()} ;saveField=document.getElementById(fieldname+'_fckSaveField');if(saveField){kukit.log('Fire the savekupu server event = save inline without submitting');saveField.style.visibility='visible';if(saveField.fireEvent){saveField.fireEvent('onChange')}
else{var evt=document.createEvent("HTMLEvents");evt.initEvent("change",true,true);saveField.dispatchEvent(evt)}
comp=(setTimeout("saveField.style.visibility='hidden'",2000));return false}
else{kukit.log('Try to submit the form in portal_factory');window.onbeforeunload=null;form.submit()}}


/* - fck_ploneInit.js - */
// http://www.iprlawindia.org/portal_javascripts/fck_ploneInit.js?original=1
function getElementsByClassName(oElm,strTagName,strClassName){var arrElements=(strTagName=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(strTagName);var arrReturnElements=new Array();strClassName=strClassName.replace(/\-/g,"\\-");var oRegExp=new RegExp("(^|\\s)"+strClassName+"(\\s|$)");var oElement;for(var i=0;i<arrElements.length;i++){oElement=arrElements[i];if(oRegExp.test(oElement.className)){arrReturnElements.push(oElement)}}
return(arrReturnElements)}
function FCKeditor_OnComplete(editorInstance){editorInstance.Events.AttachEvent('OnAfterLinkedFieldUpdate',finalizePublication) }
FCKeditor_Plone_Init=function(){var fckContainers=getElementsByClassName(document,'div','fckContainer');for(var i=0;i<fckContainers.length;i++){var fckContainer=fckContainers [i];var fckContainerId=fckContainer.getAttribute('id');var inputname=fckContainerId.replace("_fckContainer","");FCKeditor_Plone_start_instance(fckContainer,inputname)}}
registerPloneFunction(FCKeditor_Plone_Init);

/* - mark_special_links.js - */
// http://www.iprlawindia.org/portal_javascripts/mark_special_links.js?original=1
function scanforlinks(){if(!W3CDOM){return false}
if((typeof external_links_in_content_only!='undefined')&&(external_links_in_content_only==false)){links=document.getElementsByTagName('a');for(i=0;i<links.length;i++){if((links[i].getAttribute('href'))&&(links[i].className.indexOf('link-plain')==-1)){var linkval=links[i].getAttribute('href');if(linkval.toLowerCase().indexOf(window.location.protocol+'//'+window.location.host)==0){} else if(linkval.indexOf('http:')!=0){} else{links[i].setAttribute('target','_blank')}}}}
contentarea=getContentArea();if(!contentarea)
return false;links=contentarea.getElementsByTagName('a');for(i=0;i<links.length;i++){if((links[i].getAttribute('href'))&&(links[i].className.indexOf('link-plain')==-1)){var linkval=links[i].getAttribute('href');if(linkval.toLowerCase().indexOf(window.location.protocol+'//'+window.location.host)==0){} else if(linkval.indexOf('http:')!=0){protocols=['mailto','ftp','news','irc','h323','sip','callto','https','feed','webcal'];for(p=0;p<protocols.length;p++){if(linkval.indexOf(protocols[p]+':')==0){wrapNode(links[i],'span','link-'+protocols[p]);break}}} else{if(links[i].getElementsByTagName('img').length==0){wrapNode(links[i],'span','link-external')}
if((typeof external_links_open_new_window!='undefined')&&(external_links_open_new_window==true)){links[i].setAttribute('target','_blank')}}}}};registerPloneFunction(scanforlinks);
