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,{}))
/*cssQuery, version 2.0.2 (2005-08-19)
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
License: http://creativecommons.org/licenses/LGPL/2.1/
Packed by Steffen Rusitschka; included modules: css level2 and standard.*/
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.isStrict=typeof window.RUZEE.isStrict != 'undefined'
?window.RUZEE.isStrict
:(document.compatMode?document.compatMode!='BackCompat':RUZEE.userAgent.indexOf('safari')==-1?false:true);

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();},
Border:function(d){var rad=d.cornerRadius||8;this.shadowShift=0;this.setEdges(d.edges||'lrtb');this.height=d.height||0;var b=null;switch (d.borderType) {case 'simple':this.cornerRadius=this.shadowRadius=this.shadowPadding=rad;this.coShadowS='000';break;case 'shadow':var sw=d.shadowWidth||8;this.cornerRadius=rad;this.shadowRadius=rad+sw*2;this.shadowPadding=rad+sw;this.shadowShift=Math.round(sw/2);this.coShadowS=d.shadowColor||'000';break;case 'fade':this.cornerRadius=this.shadowPadding=1;this.shadowRadius=rad;this.coShadowS='.fade';break;case 'glow':this.cornerRadius=this.shadowPadding=rad;this.shadowRadius=rad+(d.glowWidth||rad);this.coShadowS=d.glowColor||'fff';break;default:}},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);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.prototype={setBgImg:function(e,x,y){if (!this.imgBgInURL) return;e.style.backgroundImage=this.imgBgInURL;x=-x;y=-y;e.style.backgroundPosition=x+'px '+y+'px';if (this.imgBgInRepeat) e.style.backgroundRepeat=this.imgBgInRepeat;},
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.display='block';d.style.border='none';d.style.width=w?w:'auto';if (h) {d.style.height=h; d.style.fontSize=h;}if (!bg) bg='transparent';d.style.background=bg;if (o) d.style.overflow=o;return d;},
addLR:function(c,co,w,h,bgx,bgy){var e=this.crDiv(null,h,co);if (typeof bgx!='undefined') this.setBgImg(e,bgx,bgy);if (!w) w='1px';c.style.margin='0px '+(this.isR?w:'0px')+' 0px '+(this.isL?w:'0px');e.appendChild(c);return e;},
crTB:function(top){var ca=RUZEE.Borders.cache[this.cacheID+'.'+top];if (ca) {if (top) {this.psT=ca.ps;this.inSh=ca.inSh;} else {this.psB=ca.ps;}return ca.el.cloneNode(true);}var sh=top?-this.shadowShift:this.shadowShift;var cxc=this.shadowPadding-this.cornerRadius-1;var cxb=cxc;var cxe=cxc+this.cornerRadius;var exb=0;var exe=cxc-1;var syc=this.cornerRadius-this.shadowPadding+sh+1;var yb,ye;if (top) {if (!this.isT) {this.psT=0;return;}yb=syc+this.shadowRadius-1;ye=syc-1;yi=-1;this.inSh=syc-1;this.psT=yb-ye;} else {if (!this.isB) {this.psB=0;return;}yb=syc<0?syc:0;ye=syc+this.shadowRadius;yi=1;this.psB=ye-yb;}var cwb=this.wBorder;if (cwb==0) cwb=1;var e=this.crDiv(null, Math.abs(yb-ye)+'px',null,'hidden');for (var y=yb; y!=ye; y+=yi) {var co;if (y<=this.cornerRadius-cwb) {co=this.coBgIn;} else if (y<=this.cornerRadius) {co=this.coBorder;} else if (y-syc<0) {co=this.coShadow;} else {co=rzBlend(this.coShadow,this.coBgOut,(y-syc)/this.shadowRadius);}var line=this.crDiv(null,'1px',rzC2S(co),'hidden');var fstLine=line;var xbg=null;for (var x=0; x<this.shadowRadius; ++x) {var isIn=false, setBgImg=false;var sd, out=0;if (y<syc) {sd=x;} else {sd=Math.sqrt(Math.sqr(x)+Math.sqr(y-syc));}if (this.shadowRadius>this.cornerRadius && sd<=this.shadowRadius) {co=rzBlend(this.coShadow, this.coBgOut, sd/this.shadowRadius);} else {co=this.coBgOut;out++;}if (y<=this.cornerRadius) {if (x>=exb && x<=exe) {if (y>this.cornerRadius-cwb) {co=this.coBorder;} else {isIn=true;}} else if (x>=cxb && x<=cxe) {var cd=Math.sqrt(Math.sqr(x-cxc)+Math.sqr(y))-this.cornerRadius;if (y<0) {if (x-cxc>this.cornerRadius-this.wBorder) {co=this.coBorder;} else {isIn=true;}} else if (cd<-cwb) {isIn=true;} else if (cd<-cwb+1) {if (top&&this.imgBgInURL) {setBgImg=true;} else co=rzBlend(this.coBgIn,this.coBorder,cd+cwb);} else if (cd<0) {co=this.coBorder;} else if (cd<=1) {co=rzBlend(this.coBorder,co,cd);} else {out++;}}} else {out++;}if (!isIn&&line==fstLine&&y<=this.cornerRadius-cwb&&top) {this.setBgImg(fstLine,this.shadowRadius-x,yb-y);}if (out>1) {line=this.addLR(line,'transparent',(this.shadowRadius-x)+'px');x=this.shadowRadius;} else {if (!isIn) {if (RUZEE.isIE&&x==this.shadowRadius-12) line=this.addLR(line);line=this.addLR(line,rzC2S(co));}if (setBgImg) this.setBgImg(line,this.shadowRadius-x,yb-y+1);}}e.appendChild(line);}var ce={ el:e, ps:top?this.psT:this.psB};if (top) ce.inSh=this.inSh;RUZEE.Borders.cache[this.cacheID+'.'+top]=ce;return e;},
crLR:function(e){var coBgInS=rzC2S(this.coBgIn);var coBS=rzC2S(this.coBorder);if (this.wBorder>0) e=this.addLR(e,coBS,this.wBorder+'px');for (var x=this.shadowPadding; x<this.shadowRadius; ++x) {coS=rzC2S(rzBlend(this.coShadow,this.coBgOut,x/this.shadowRadius));e=this.addLR(e,coS);}return e;},
setEdges:function(ed){ed=ed?ed.toLowerCase():'lrtb';this.isL=ed.indexOf('l')>=0;this.isR=ed.indexOf('r')>=0;this.isT=ed.indexOf('t')>=0;this.isB=ed.indexOf('b')>=0;},
calc: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) this.calc(e[i]);return;}this.inSh=0;this.imgBgInURL=rzGetStyle(e,'background-image');if (this.imgBgInURL&&this.imgBgInURL=='none') this.imgBgInURL=null;if (this.imgBgInURL) {this.imgBgInRepeat=rzGetStyle(e,'background-repeat');}this.coBgIn=rzS2C(rzGetBg(e));this.coBgOut=rzS2C(rzGetBg(e.parentNode));var borderCSS='border-'+(this.isT?'top-':'bottom-');var bs=rzGetStyle(e,borderCSS+'style','none');if (bs && bs!='' && bs!='none' && bs!='hidden') {this.coBorder=rzS2C(rzGetStyle(e,borderCSS+'color','black'));this.wBorder=rzPX2I(rzGetStyle(e,borderCSS+'width','1px'));} else {this.coBorder=this.coBgIn;this.wBorder=0;}this.coShadow=this.coShadowS=='.fade'?this.coBorder:rzS2C(this.coShadowS);this.cacheID=rzC2S(this.coBgIn)+'.'+rzC2S(this.coBgOut)+'.'+rzC2S(this.coBorder)+'.'+rzC2S(this.coShadow)+'.'+this.wBorder+'.'+this.isL+this.isR+this.isT+this.isB+'.'+this.cornerRadius+'.'+this.shadowRadius+'.'+this.shadowPadding+'.'+this.shadowShift+'.'+this.imgBgInURL+'.'+this.imgBgInRepeat;var wr=this.crDiv();var cwr=this.crDiv();this.psT=0;this.psB=0;if (this.isT) wr.appendChild(this.crTB(true));wr.appendChild(this.crLR(cwr));if (this.isB) wr.appendChild(this.crTB(false));var psLR=this.shadowRadius-this.shadowPadding+this.wBorder;var psL=this.isL?psLR:0;var psR=this.isR?psLR:0;var isTB=this.isT&&this.isB;if (!isTB)this.inSh=0;var psT=isTB?Math.floor((this.psT+this.psB+this.inSh)/2):this.psT+Math.floor(this.inSh/2);var psB=this.psB+this.psT+this.inSh-psT;var cwrbg=cwr;if (this.inSh!=0) {var up1=this.crDiv(); cwr.appendChild(up1);var up2=this.crDiv(); up1.appendChild(up2);cwr.style.position=up1.style.position='relative';up1.style.top=up2.style.marginBottom=this.inSh+'px';if (RUZEE.isIE) cwr.style.height='1%';cwrbg=up1; cwr=up2;}this.setBgImg(cwrbg,psL,this.psT+this.inSh);cwrbg.style.backgroundColor=rzC2S(this.coBgIn);if (RUZEE.isIE) {e.style.height=cwr.style.height='1%';} else {var end=this.crDiv(null,'1px');end.style.marginBottom='-1px';e.appendChild(end);cwr.appendChild(end.cloneNode(true));}if (this.height>0) {var h=(RUZEE.isStrict?this.height:(this.height-this.psB-this.psT));if (h>0) cwr.style.height=h+'px';}var funcs=[rzUpdatePad(e,wr,cwr,'top',psT),rzUpdatePad(e,wr,cwr,'bottom',psB),rzUpdatePad(e,wr,cwr,'left',psL),rzUpdatePad(e,wr,cwr,'right',psR)];
RUZEE.Borders.addCalc(function(){for(var i=0; i<funcs.length; ++i) funcs[i]();e.style.background='transparent';e.style.backgroundImage='none';e.appendChild(wr);while (e.childNodes.length>1){cwr.appendChild(e.removeChild(e.childNodes[0]));}});},
render:function(e){this.calc(e);RUZEE.Borders.renderCalcs();},
draw:function(e,edges){this.setEdges(edges?edges.toLowerCase():'lrtb');if (typeof e=='string') {if (e.charAt(0)!='.') e='#'+e;e=RUZEE.Borders.cssQuery(e);}this.render(e);}};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 rzUpdatePad(org,newo,newi,l,subPx,isSet){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(org,padL);var bor=rzGetStyle(org,borL);var r=rzPX2I(pad)+rzPX2I(bor);var v=r-subPx;v=(v<0?0:v)+'px';if (RUZEE.isStrict) {newo.style[marCC]=(-r)+'px';newi.style[padCC]=v;return function(){org.style[borCC]='0px';org.style[padCC]=r+'px';};} else {newi.style[padCC]=v;return function(){org.style[borCC]=org.style[padCC]='0px';};}};
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));};
/**
 * RuzeeBorders 0.13
 * (c) 2006 Steffen Rusitschka <steffen@rusitschka.de>
 *
 * RuzeeBorders is freely distributable under the terms of an MIT-style license.
 * For details, see http://www.ruzee.com/
 */
var AD_REFRESH_INTERVAL=120000;
var AD_REFRESHLIMIT=30;
var EMPTY_EMAIL_FIELD_MSG = "The email address field is empty\n\nYou need to enter a valid address so that we can process your request\n\nPlease enter a valid email address and try again";
var INVALID_EMAIL_FIELD_MSG = "The email address you entered is not a valid address\n\nPlease enter a valid email address and try again";
var SUPPORT_SCRIPT = "cgi-bin/support.pl";
var ABUSE_SCRIPT = "cgi-bin/abuse.pl";
var TELL_FRIENDS_SCRIPT = "cgi-bin/tellFriends.pl";
var EMAIL_FILE_SCRIPT = "/cgi-bin/emailFile.pl";
var DELETE_FILE_SCRIPT = "/cgi-bin/deleteFile.pl";
var RESETPW_SCRIPT = "/cgi-bin/resetpw.pl";
var ACCOUNT_SCRIPT = "/cgi-bin/updateAccount.pl";
var SIGNUP_SCRIPT = "/cgi-bin/signup.pl";
var LOADFILES_SCRIPT = "/cgi-bin/loadUserFiles.pl";
var EMPTY_FORMFIELD_MSG = "Some of the required fields on the form have not been selected, or are empty\n\nThey have been highlighted for you in red. Please fill them in and try submitting it again";
var INVALID_URL_MSG = "The file URL you submitted is not valid\n\n\Please modify the URL and try submitting again\n\nAlternatively you can email our support team at abuse@zamzar.com";
var PASSWORD_EMPTY_MSG = "Error: One or both of the password boxes are empty\n\nPlease type your new password into both boxes";
var PASSWORD_NOTMATCH_MSG = "Error: The passwords that you have entered do not match\n\nPlease type the same password into both boxes";
var PASSWORD_TOO_SHORT_MSG = "password is too short - It must be at least 6 characters in length.\n\nPlease try again with a longer password.";
var CHANGE_USERNAME_MSG = "Warning: If you change your email address this will also change your login name to the new address\n\nAre you happy to continue ?";
var NO_TERMS_MSG = "If you want to signup to Zamzar please read the Terms & Conditions and check the box";
var NO_CHECKBOXES_MSG = "Please select the files you want to delete before pressing the delete button";
var upgradeFormType;
RUZEE.Borders.add({
  '.conversionBox': { borderType:'shadow', cornerRadius:10, height:140, shadowWidth:5 },
  '.manageBox': { borderType:'shadow', cornerRadius:10, shadowWidth:5 },
  '.greyBox': { borderType:'simple', cornerRadius:10 },
  '.blueBox': { borderType:'simple', cornerRadius:10 },
  '.blueBoxLine': { borderType:'simple', cornerRadius:10 },
  '.greenBox': { borderType:'shadow', cornerRadius:10, shadowWidth:5 },
  '.whiteBox': { borderType:'simple', cornerRadius:10 },
  '.tab1': { borderType:'simple', cornerRadius:10, edges:'lrt' },
  '.tab2': { borderType:'simple', cornerRadius:10, edges:'lrt' },
  '.tab3': { borderType:'simple', cornerRadius:10, edges:'lrt' }
});
function init() {
imagePreLoad('/images/clear.gif','/images/corner_dk_bl.gif','/images/corner_dk_br.gif','/images/corner_dk_tl.gif','/images/corner_dk_tr.gif','/images/corner_lt_bl.gif','/images/corner_lt_br.gif','/images/corner_lt_tl.gif','/images/corner_lt_tr.gif','/images/bar/progress_bar.jpg','/images/progress_circle.gif');
}
function imagePreLoad() {
if (document.images) {
var imgFiles = imagePreLoad.arguments;
if (document.preloadArray==null) document.preloadArray = new Array();
var i = document.preloadArray.length;
with (document) for (var j=0; j<imgFiles.length; j++) {
preloadArray[i] = new Image;
preloadArray[i++].src = imgFiles[j];
} 
}
}  
function checkValidEmail(emailAddress) {
var toEmailField = emailAddress;
if ((emailAddress==null)||(emailAddress=="")){
return EMPTY_EMAIL_FIELD_MSG;
}
if (checkEmailString(emailAddress) == false) {
return INVALID_EMAIL_FIELD_MSG;
}
return "false";
}
function checkEmailString(emailValue) {
var at = "@";
var dot = ".";
var lat = emailValue.indexOf(at);
var lstr = emailValue.length;
var ldot = emailValue.indexOf(dot);
if (emailValue.indexOf(at) == -1) {
return false;
}
if (ldot == (lstr-1)) {
return false;
}
if (emailValue.indexOf(at) == -1 || emailValue.indexOf(at) == 0 || emailValue.indexOf(at) == lstr) {
return false;
}
if (emailValue.indexOf(dot) == -1 || emailValue.indexOf(dot) == 0 || emailValue.indexOf(dot) == lstr) {
return false;
}
if (emailValue.indexOf(at,(lat+1)) != -1 || emailValue.indexOf(dot,(lat+2)) == -1 || emailValue.indexOf(" ") != -1) {
return false;
}
if (emailValue.substring(lat-1,lat) == dot || emailValue.substring(lat+1,lat+2) == dot) {
return false;
}
return true;
}
function disableForm(formName) {
formObj=document.getElementById(formName);
for (var i=0;i<formObj.elements.length;i+=1) {
formObj.elements[i].disabled=true;
}
}
function enableForm(formName) {
formObj=document.getElementById(formName);
for (var i=0;i<formObj.elements.length;i+=1) {
formObj.elements[i].disabled=false;
}
}
function checkValidURL(url) {
if ((url.indexOf("getFiles.php?") != -1) || (url.indexOf("uid") != -1) || (url.indexOf("targetID") != -1)) {
return true;
} else {
return false;
}
}
function submitLoginForm() {
var isEmailValidMessage = checkValidEmail(document.loginForm.username.value);
if (isEmailValidMessage.indexOf("false") == -1) {
alert(isEmailValidMessage);
return false;        
} else {
document.getElementById("loginForm").submit();
}    
}
function checkEnter(e){
if(e.keyCode == 13){
submitLoginForm();
return false;
}
else {
return true;
}
}
function updateStatusBox(status, statusTitle, statusMsg, statusBox) {
var statusBoxObj = document.getElementById(statusBox);
var statusDivEnd = "</b></p></div>";
var statusDivMiddle = "</span>";
var statusDivStart = "<div class='lightGreenBox'><p><span class='smallHeader'><b>";
if(statusBox.indexOf("emailFileProgressDiv") != -1) {
var statusDivStart = "<div class='lightGreenBox' style='padding:0px'>&nbsp;";
var statusDivEnd = "</div>";
}
if (status!=0) {
statusDivStart = "<div class='redBox'><p><span class='smallHeader'><b>";
}
statusBoxObj.innerHTML = statusDivStart+statusTitle+statusDivMiddle+statusMsg+statusDivEnd+"<br>";
}

function handleupgradeFormSubmit() {
var progressBox = document.getElementById('accountProgressDiv');
progressBox.innerHTML = "";
var form = document.upgradeForm;
var username = form.elements.username.value;
form.action = SIGNUP_SCRIPT + '?' + upgradeFormType + ";" + username;
}
function checkPwMatch(pw1, pw2) {
if(pw1 == "" || pw2 == "") {
alert(PASSWORD_EMPTY_MSG);
return false;
} else {
if(pw1 != pw2) {
alert(PASSWORD_NOTMATCH_MSG);
return false;
}
return true;
}
}
function setCookie(cookieName,cookieValue,nDays) {
var today = new Date();
var expire = new Date();
if (nDays==null || nDays==0) nDays=1;
expire.setTime(today.getTime() + 3600000*24*nDays);
document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString()+"; path=/";
}
function formFillSubmit(html) {
document.getElementById("ppFormTarget").innerHTML=html;
document.getElementById("ppForm").submit();
}
function reloadWideVC() {
var adFrame=document.getElementById("adsWideFrame");
adFrame.src='/ads/vc-728x90.html';
}
function reloadBoxVC() {
var adFrame=document.getElementById("adsBoxFrame");
adFrame.src='/ads/vc-300x250.html';
}
function reloadBannerVC() {
var adFrame=document.getElementById("adsBannerFrame");
adFrame.src='/ads/vc-468x60.html';
}
function reloadWideAd() {
var adFrame=document.getElementById("adsWideFrame");
var adType=determineAdType(adFrame);
if (adType=="vc"){setTimeout("reloadWideVC()",AD_REFRESH_INTERVAL);}
}
function reloadBoxAd() {
var adFrame=document.getElementById("adsBoxFrame");
var adType=determineAdType(adFrame);
if (adType=="vc"){setTimeout("reloadBoxVC()",AD_REFRESH_INTERVAL);}
}
function reloadBannerAd() {
var adFrame=document.getElementById("adsBannerFrame");
var adType=determineAdType(adFrame);
if (adType=="vc"){setTimeout("reloadBannerVC()",AD_REFRESH_INTERVAL);}
}
function determineAdType(adFrame) {
var adType="";
var content=(adFrame.contentDocument||adFrame.contentWindow.document).documentElement.innerHTML;
var isTF=content.search("tribalfusion");
var isVC1=content.search("vc-728x90");
var isVC2=content.search("vc-300x250");
var isVC3=content.search("vc-468x60");
var isVC4=content.search("fastclick");
var isCasale=content.search("casalemedia");
if (isTF!=-1){adType="tf";}
if (isVC1!=-1||isVC2!=-1||isVC3!=-1||isVC4!=-1){adType = "vc";}
if (isCasale!=-1){adType = "ca";}
return adType;
}
Array.prototype.inArray=function(value){
var i;
for (i=0;i<this.length;i++) {
if (this[i]===value){
return true;
}
}
return false;
};