var colZ=new Array();var bin=0;
var r,g,b,rr,gg,bb,H,S,L,col,v1,v3,d,laba,labb,labl,H2,S2,L2,ZZ,gray,HH1,HH2,HHx,SS1,SS2,SSx,LL1,LL2,LLx,c1,c2,c3,c4,c5,c6,c7,ch,cs,cb,cmax,temp;var vg5x=0.5;var vg6x=214;
var sw1x=sw2x=sw3x=sw4x=sw5x=sw6x=sw7x=sw8x=sw9x=swax=swbx=swcx=sv1x=sv2x=sv3x=sv4x=sv5x=sv6x=sv7x=sv8x=cellx=vg1x=vg2x="202020";
var pure_red=18;var pure_yel=58;var pure_grn=135;var pure_cyn=180;var pure_blu=270;var pure_mag=324;var peek_red=.82;var peek_yel=.95;var peek_grn=.62;var peek_cyn=.70;var peek_blu=.75;var peek_mag=.88;
var spacer='image/_.gif';var CLONE='C10nE';var COPY='C0pY';var DETACH_CHILDREN='d37aCH';var HORIZONTAL='H0r1Z';
var MAXHEIGHT='m7x8I';var MAXOFFBOTTOM='m7xd0wN';var MAXOFFLEFT='m7x23Ft';var MAXOFFRIGHT='m7x0Ff8';var MAXOFFTOP='m7xu9';var MAXWIDTH='m7xW1';var MINWIDTH='m1nw1';var MINHEIGHT='m1n8I';
var NO_ALT='no81T';var NO_DRAG='N0d4Ag';var RESET_Z='r35E7z';var RESIZABLE='r5IZbl';var SCALABLE='SCLbl';var SCROLL='sC8lL';var TRANSPARENT='dIApHAn';var VERTICAL='V3Rt1C';
var dd_cursors=new Array('c:default','c:crosshair','c:e-resize','c:hand','c:help','c:move');var dd_i=dd_cursors.length;while(dd_i--)
	eval('var CURSOR_'+(dd_cursors[dd_i].substring(2).toUpperCase().replace('-','_'))+' = "'+dd_cursors[dd_i]+'";');
var dd_u="undefined";
function dec(num){return parseInt(num,16);}
function hex(num){var hx="0123456789ABCDEF";return(hx.charAt(num>>4)+hx.charAt(num%16));}
function init(){setback("000000");cellx=document.getElementById('cell').bgColor;if(cellx.length==7){r=dec(cellx.substr(1,2));g=dec(cellx.substr(3,2));b=dec(cellx.substr(5,2));}else if(cellx.length==6){r=dec(cellx.substr(0,2));g=dec(cellx.substr(2,2));b=dec(cellx.substr(4,2));}else{alert("cannot read colour info from your browser\nresetting to a default value.\nsome functions may not work properly.");r=181;g=0;b=148;}ZZ=30.5;rgb(r,g,b);}
function setback(back){document.getElementById('sw0').bgColor=back;document.getElementById('pan2').style.color="000000";if(back<"500000")document.getElementById('pan2').style.color="a0a0a0";}
function tidy(){temp=dd.elements.sw1;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw2;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw3;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw4;temp.moveTo(temp.defx,temp.defy);
temp=dd.elements.sw5;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw6;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw7;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sw8;temp.moveTo(temp.defx,temp.defy);
temp=dd.elements.sw9;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.swa;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.swb;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.swc;temp.moveTo(temp.defx,temp.defy);
temp=dd.elements.sv1;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv2;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv3;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv4;temp.moveTo(temp.defx,temp.defy);
temp=dd.elements.sv5;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv6;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv7;temp.moveTo(temp.defx,temp.defy);temp=dd.elements.sv8;temp.moveTo(temp.defx,temp.defy); }
function init2(form){var bin=form.bin.value;
var rrr=form.rrr.value;if(rrr!=""){if(bin==1)r=rrr*2.55;else if(bin==0)r=dec(rrr);else r=rrr;}
var ggg=form.ggg.value;if(ggg!=""){if(bin==1)g=ggg*2.55;else if(bin==0)g=dec(ggg);else g=ggg;}
var bbb=form.bbb.value;if(bbb!=""){if(bin==1)b=bbb*2.55;else if(bin==0)b=dec(bbb);else b=bbb;}
if((parseFloat(r,10)!=(r*1))||(isNaN(r)))r=0;if((parseFloat(g,10)!=(g*1))||(isNaN(g)))g=0;if((parseFloat(b,10)!=(b*1))||(isNaN(b)))b=0;
if(r<0)r=0;else if(r>255)r=255;if(g<0)g=0;else if(g>255)g=255;if(b<0)b=0;else if(b>255)b=255;rgb(r,g,b); }
function init3(){bin=document.rgb.bin.value;rrr=Math.round(r);ggg=Math.round(g);bbb=Math.round(b);if(bin==1){rrr=Math.round(r/2.55);ggg=Math.round(g/2.55);bbb=Math.round(b/2.55);}else if(bin==0){rrr=hex(r);ggg=hex(g);bbb=hex(b);}document.rgb.rrr.value=rrr;document.rgb.ggg.value=ggg;document.rgb.bbb.value=bbb;}
function rgb(r,g,b){
v1=Math.min(r,Math.min(g,b));v3=Math.max(r,Math.max(g,b));d=v3-v1;
L=(v1+v3)/5.1;L2=L;s3=(50-Math.abs(50-L2))*.051;
if(s3==0)S2=100; else S2=100-d/s3;
if(S2==100)H=355.2; else if(r==v3)H=60*(g-b)/d; else if(g==v3)H=120+60*(b-r)/d; else H=240+60*(r-g)/d;
if(H<0)H=H+360;
if(H>315&&H<=355){H2=(H-315)*.75+330;} else{
if(H>280&&H<=315){H2=(H-280)/1.1666666+300;}
if(H>266&&H<=280){H2=(H-266)/0.4666666+270;}
if(H>225&&H<=266){H2=(H-225)/1.3666666+240;}
if(H>188&&H<=225){H2=(H-188)/1.2333333+210;}
if(H>120&&H<=188){H2=(H-120)/2.2666666+180;}
if(H>75&&H<=120){H2=(H-75)/1.5+150;}
if(H>30&&H<=75){H2=(H-30)*2+60;}
if(H>20&&H<=30){H2=(H-20)*3+30;}
if(H>=355){H2=(H-355)*1.2;}
if(H<=20){H2=(H+5)*1.2;} }
HL=50;
if(H2>120&&H2<=210){HL=50+(H2-120)/3;}
if(H2>210&&H2<240){HL=80-(H2-210);}
if(H2>240&&H2<=300){HL=50+(H2-240)/2.4;}
if(H2>300&&H2<360){HL=75-(H2-300)/2.4;}
if(HL!=50){if(L2<50){L2=(L2/50)*HL;}else{L2=100-((100-L2)/50*(100-HL));} }
rr=r/255;gg=g/255;bb=b/255;
if(rr>.04045)rr=Math.pow((rr+.055)/1.055,2.4); else rr=rr/12.92;
if(gg>.04045)gg=Math.pow((gg+.055)/1.055,2.4); else gg=gg/12.92;
if(bb>.04045)bb=Math.pow((bb+.055)/1.055,2.4); else bb=bb/12.92;
x=(rr*.412453+gg*.35758+bb*.180423)/.95047;y=(rr*.212671+gg*.71516+bb*.072169);z=(rr*.019334+gg*.119193+bb*.950227)/1.08883;
if(x>.008856)x=Math.pow(x,(1/3)); else x=(7.787*x)+(16/116);
if(y>.008856)y=Math.pow(y,(1/3)); else y=(7.787*y)+(16/116);
if(z>.008856)z=Math.pow(z,(1/3)); else z=(7.787*z)+(16/116);
laba=Math.floor(500*(x-y)+.5);labb=Math.floor(200*(y-z)+.5);labl=(116*y)-16;
pos(); }

function rgb2(r,g,b){
v1=Math.min(r,Math.min(g,b));v3=Math.max(r,Math.max(g,b));d=v3-v1;
L=(v1+v3)/5.1;L2=L;s3=(50-Math.abs(50-L2))*.051;
if(s3==0)S2=100; else S2=100-d/s3;
if(S2==100)H=355.2; else if(r==v3)H=60*(g-b)/d; else if(g==v3)H=120+60*(b-r)/d; else H=240+60*(r-g)/d;
if(H<0)H=H+360;
if(H>315&&H<=355){H2=(H-315)*.75+330;} else{
if(H>280&&H<=315){H2=(H-280)/1.1666666+300;}
if(H>266&&H<=280){H2=(H-266)/0.4666666+270;}
if(H>225&&H<=266){H2=(H-225)/1.3666666+240;}
if(H>188&&H<=225){H2=(H-188)/1.2333333+210;}
if(H>120&&H<=188){H2=(H-120)/2.2666666+180;}
if(H>75&&H<=120){H2=(H-75)/1.5+150;}
if(H>30&&H<=75){H2=(H-30)*2+60;}
if(H>20&&H<=30){H2=(H-20)*3+30;}
if(H>=355){H2=(H-355)*1.2;}
if(H<=20){H2=(H+5)*1.2;} }
HL=50;
if(H2>120&&H2<=210){HL=50+(H2-120)/3;}
if(H2>210&&H2<240){HL=80-(H2-210);}
if(H2>240&&H2<=300){HL=50+(H2-240)/2.4;}
if(H2>300&&H2<360){HL=75-(H2-300)/2.4;}
if(HL!=50){if(L2<50){L2=(L2/50)*HL;}else{L2=100-((100-L2)/50*(100-HL));}} }

function lab(laba,labb){y=(labl+16)/116;x=laba/500+y;z=y-labb/200;
if(Math.pow(y,3)>.008856)y=Math.pow(y,3); else y=(y-16/116)/7.787;
if(Math.pow(x,3)>.008856)x=Math.pow(x,3); else x=(x-16/116)/7.787;
if(Math.pow(z,3)>.008856)z=Math.pow(z,3); else z=(z-16/116)/7.787;
x=x*.95047;z=z*1.08883;r=(x*3.240479+y*-1.53715+z*-.498535);g=(x*-.969256+y*1.875992+z*.041556);b=(x*.055648+y*-.204043+z*1.057311);
if(r>.0031308)r=1.055*Math.pow(r,(1/2.4))-.055; else r=r*12.92;
if(g>.0031308)g=1.055*Math.pow(g,(1/2.4))-.055; else g=g*12.92;
if(b>.0031308)b=1.055*Math.pow(b,(1/2.4))-.055; else b=b*12.92;
r=r*255;g=g*255;b=b*255;if(r<0)r=0;if(g<0)g=0;if(b<0)b=0;if(r>255)r=255;if(g>255)g=255;if(b>255)b=255;
v1=Math.min(r,Math.min(g,b));v3=Math.max(r,Math.max(g,b));d=v3-v1;
L=(v1+v3)/5.1;L2=L;s3=(50-Math.abs(50-L2))*.051;
if(s3==0)S2=100; else S2=100-d/s3;
if(S2==100)H=355.2; else if(r==v3)H=60*(g-b)/d; else if(g==v3)H=120+60*(b-r)/d; else H=240+60*(r-g)/d;
if(H<0)H=H+360;
if(H>315&&H<=355){H2=(H-315)*.75+330;} else{
if(H>280&&H<=315){H2=(H-280)/1.1666666+300;}
if(H>266&&H<=280){H2=(H-266)/0.4666666+270;}
if(H>225&&H<=266){H2=(H-225)/1.3666666+240;}
if(H>188&&H<=225){H2=(H-188)/1.2333333+210;}
if(H>120&&H<=188){H2=(H-120)/2.2666666+180;}
if(H>75&&H<=120){H2=(H-75)/1.5+150;}
if(H>30&&H<=75){H2=(H-30)*2+60;}
if(H>20&&H<=30){H2=(H-20)*3+30;}
if(H>=355){H2=(H-355)*1.2;}
if(H<=20){H2=(H+5)*1.2;} }
HL=50;
if(H2>120&&H2<=210){HL=50+(H2-120)/3;}
if(H2>210&&H2<240){HL=80-(H2-210);}
if(H2>240&&H2<=300){HL=50+(H2-240)/2.4;}
if(H2>300&&H2<360){HL=75-(H2-300)/2.4;}
if(HL!=50){if(L2<50){L2=(L2/50)*HL;}else{L2=100-((100-L2)/50*(100-HL));} }
pos(); }

function hsl(H2,S2,L2){
HL=50;L=L2;
if(H2>120&&H2<=210){HL=50+(H2-120)/3;}
if(H2>210&&H2<240){HL=80-(H2-210);}
if(H2>240&&H2<=300){HL=50+(H2-240)/2.4;}
if(H2>300&&H2<360){HL=75-(H2-300)/2.4;}
if(HL!=50){if(L2<HL){L=(L2/HL)*50;}else{L=100-(100-L2)/(100-HL)*50;} }
if(H2<=30){H=(H2/1.2)-5;if(H<0)H=H+360;} else{
if(H2>30&&H2<=60){H=(H2-30)/3+20;}
if(H2>60&&H2<=150){H=(H2-60)/2+30;}
if(H2>150&&H2<=180){H=(H2-150)*1.5+75;}
if(H2>180&&H2<=210){H=(H2-180)*2.2666666+120;}
if(H2>210&&H2<=240){H=(H2-210)*1.2333333+188;}
if(H2>240&&H2<=270){H=(H2-240)*1.3666666+225;}
if(H2>270&&H2<=300){H=(H2-270)*0.4666666+266;}
if(H2>300&&H2<=330){H=(H2-300)*1.1666666+280;}
if(H2>330&&H2<=360){H=(H2-330)/.75+315;} }
if(H==360)H=0;
ll=Math.abs(50-L)*5.1; hh=H/60;h0=(hh-Math.floor(hh))*255;hh=Math.floor(hh);
if(hh==0){r=255;g=h0;b=0;if(L>50){g=g+((1-(g/255))*ll);b=ll;}else{r=255-ll;g=g-(g/255*ll);}}
if(hh==1){r=255-h0;g=255;b=0;if(L>50){r=r+((1-(r/255))*ll);b=ll;}else{g=255-ll;r=r-(r/255*ll);}}
if(hh==2){r=0;g=255;b=h0;if(L>50){b=b+((1-(b/255))*ll);r=ll;}else{g=255-ll;b=b-(b/255*ll);}}
if(hh==3){r=0;g=255-h0;b=255;if(L>50){g=g+((1-(g/255))*ll);r=ll;}else{b=255-ll;g=g-(g/255*ll);}}
if(hh==4){r=h0;g=0;b=255;if(L>50){r=r+((1-(r/255))*ll);g=ll;}else{b=255-ll;r=r-(r/255*ll);}}
if(hh==5){r=255;g=0;b=255-h0;if(L>50){b=b+((1-(b/255))*ll);g=ll;}else{r=255-ll;b=b-(b/255*ll);}}
gray=L*2.55;s3=1-(S2/100); //gray=(r*.298954)+(g*.586434)+(b*.114612);s3=1-(S2/100);
r=gray-s3*(gray-r);g=gray-s3*(gray-g);b=gray-s3*(gray-b);
v1=Math.min(r,Math.min(g,b));v3=Math.max(r,Math.max(g,b));
rr=r/255;gg=g/255;bb=b/255;
if(rr>.04045)rr=Math.pow((rr+.055)/1.055,2.4); else rr=rr/12.92;
if(gg>.04045)gg=Math.pow((gg+.055)/1.055,2.4); else gg=gg/12.92;
if(bb>.04045)bb=Math.pow((bb+.055)/1.055,2.4); else bb=bb/12.92;
x=(rr*.412453+gg*.35758+bb*.180423)/.95047;y=(rr*.212671+gg*.71516+bb*.072169);z=(rr*.019334+gg*.119193+bb*.950227)/1.08883;
if(x>.008856)x=Math.pow(x,(1/3)); else x=(7.787*x)+(16/116);
if(y>.008856)y=Math.pow(y,(1/3)); else y=(7.787*y)+(16/116);
if(z>.008856)z=Math.pow(z,(1/3)); else z=(7.787*z)+(16/116);
laba=Math.floor(500*(x-y)+.5);labb=Math.floor(200*(y-z)+.5);labl=(116*y)-16;
pos(); }

function swatch(){HL=50;var h4
if(h3>120&&h3<=210){HL=50+(h3-120)/3;}
if(h3>210&&h3<240){HL=80-(h3-210);}
if(h3>240&&h3<=300){HL=50+(h3-240)/2.4;}
if(h3>300&&h3<360){HL=75-(h3-300)/2.4;}
if(HL!=50){if(l3<HL){l3=(l3/HL)*50;}else{l3=100-(100-l3)/(100-HL)*50;} }
if(h3<=30){h4=(h3/1.2)-5;if(h4<0)h4=h4+360;} else{
if(h3>30&&h3<=60){h4=(h3-30)/3+20;}
if(h3>60&&h3<=150){h4=(h3-60)/2+30;}
if(h3>150&&h3<=180){h4=(h3-150)*1.5+75;}
if(h3>180&&h3<=210){h4=(h3-180)*2.2666666+120;}
if(h3>210&&h3<=240){h4=(h3-210)*1.2333333+188;}
if(h3>240&&h3<=270){h4=(h3-240)*1.3666666+225;}
if(h3>270&&h3<=300){h4=(h3-270)*0.4666666+266;}
if(h3>300&&h3<=330){h4=(h3-300)*1.1666666+280;}
if(h3>330&&h3<=360){h4=(h3-330)/.75+315;} }
if(h4==360)h4=0;
ll=Math.abs(50-l3)*5.1; hh=h4/60;h0=(hh-Math.floor(hh))*255;hh=Math.floor(hh);
if(hh==0){rr=255;gg=h0;bb=0;if(l3>50){gg=gg+((1-(gg/255))*ll);bb=ll;}else{rr=255-ll;gg=gg-(gg/255*ll);}}
if(hh==1){rr=255-h0;gg=255;bb=0;if(l3>50){rr=rr+((1-(rr/255))*ll);bb=ll;}else{gg=255-ll;rr=rr-(rr/255*ll);}}
if(hh==2){rr=0;gg=255;bb=h0;if(l3>50){bb=bb+((1-(bb/255))*ll);rr=ll;}else{gg=255-ll;bb=bb-(bb/255*ll);}}
if(hh==3){rr=0;gg=255-h0;bb=255;if(l3>50){gg=gg+((1-(gg/255))*ll);rr=ll;}else{bb=255-ll;gg=gg-(gg/255*ll);}}
if(hh==4){rr=h0;gg=0;bb=255;if(l3>50){rr=rr+((1-(rr/255))*ll);gg=ll;}else{bb=255-ll;rr=rr-(rr/255*ll);}}
if(hh==5){rr=255;gg=0;bb=255-h0;if(l3>50){bb=bb+((1-(bb/255))*ll);gg=ll;}else{rr=255-ll;bb=bb-(bb/255*ll);}}
gray=(rr*.298954)+(gg*.586434)+(bb*.114612);s3=1-(s3/100);
rr=gray-s3*(gray-rr);gg=gray-s3*(gray-gg);bb=gray-s3*(gray-bb); }

function WZDD(){this.elements=new Array(0);this.obj=null;this.n=navigator.userAgent.toLowerCase(); // Thanks to Walter Zorn for the drag & slide controls (c)2002 www.walterzorn.com
this.db=(document.compatMode&&document.compatMode.toLowerCase()!="backcompat")?document.documentElement:(document.body||null);this.op=!!(window.opera&&document.getElementById);this.op6=!!(this.op&&!(this.db&&this.db.innerHTML));
if(this.op&&!this.op6)document.onmousedown=new Function('e','if(((e=e||window.event).target||e.srcElement).tagName=="IMAGE")return false;');
this.ie=!!(this.n.indexOf("msie")>=0&&document.all&&this.db&&!this.op);this.iemac=!!(this.ie&&this.n.indexOf("mac")>=0);this.ie4=!!(this.ie&&!document.getElementById);
this.n4=!!(document.layers&&typeof document.classes!=dd_u);this.n6=!!(typeof window.getComputedStyle!=dd_u&&typeof document.createRange!=dd_u);
this.w3c=!!(!this.op&&!this.ie&&!this.n6&&document.getElementById);this.ce=!!(document.captureEvents&&document.releaseEvents);this.px=(this.n4||this.op6)?'':'px';this.tiv=this.w3c?40:10;}
var dd=new WZDD();
dd.Int=function(d_x,d_y){return isNaN(d_y=parseInt(d_x))?0:d_y;};
dd.getWndW=function(){return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientWidth)?dd.db.clientWidth:(window.innerWidth||0)); };
dd.getWndH=function(){return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientHeight)?dd.db.clientHeight:(window.innerHeight||0)); };
dd.getScrollX=function(){return dd.Int(window.pageXOffset||(dd.db?dd.db.scrollLeft:0));};
dd.getScrollY=function(){return dd.Int(window.pageYOffset||(dd.db?dd.db.scrollTop:0));};
dd.getPageXY=function(d_o){if(dd.n4&&d_o){dd.x=d_o.pageX||0;dd.y=d_o.pageY||0;}
	else{dd.x=dd.y=0;while(d_o){dd.x+=dd.Int(d_o.offsetLeft);dd.y+=dd.Int(d_o.offsetTop);d_o=d_o.offsetParent||null;}} };
dd.getCssXY=function(d_o){if(d_o.div){if(dd.n4){d_o.cssx=d_o.div.x;d_o.cssy=d_o.div.y;}
	else if(dd.ie4){d_o.cssx=d_o.css.pixelLeft;d_o.cssy=d_o.css.pixelTop;}
	else{d_o.css.left=d_o.css.top=0+dd.px;dd.getPageXY(d_o.div);d_o.cssx=d_o.x-dd.x;d_o.cssy=d_o.y-dd.y;d_o.css.left=d_o.cssx+dd.px;d_o.css.top=d_o.cssy+dd.px;}}
	else{d_o.cssx=0;d_o.cssy=0;} };
dd.getImgW=function(d_o){return d_o?dd.Int(d_o.width):0;};
dd.getImgH=function(d_o){return d_o?dd.Int(d_o.height):0;};
dd.getDivW=function(d_o){return dd.Int(dd.n4?(d_o.div?d_o.div.clip.width:0):d_o.div?(d_o.div.offsetWidth||d_o.css.pixelWidth||d_o.css.width||0):0);};
dd.getDivH=function(d_o){return dd.Int(dd.n4?(d_o.div?d_o.div.clip.height:0):d_o.div?(d_o.div.offsetHeight||d_o.css.pixelHeight||d_o.css.height||0):0);};
dd.getWH=function(d_o){d_o.w=dd.getDivW(d_o);d_o.h=dd.getDivH(d_o);
if(d_o.css){d_o.css.width=d_o.w+dd.px;d_o.css.height=d_o.h+dd.px;d_o.dw=dd.getDivW(d_o)-d_o.w;d_o.dh=dd.getDivH(d_o)-d_o.h;d_o.css.width=(d_o.w-d_o.dw)+dd.px;d_o.css.height=(d_o.h-d_o.dh)+dd.px;}
else d_o.dw=d_o.dh=0;};
dd.getCssProp=function(d_o,d_pn6,d_pstyle,d_pn4){
if(d_o&&dd.n6)return ''+window.getComputedStyle(d_o,null).getPropertyValue(d_pn6);
if(d_o&&d_o.currentStyle)return ''+eval('d_o.currentStyle.'+d_pstyle);
if(d_o&&d_o.style)return ''+eval('d_o.style.'+d_pstyle);
if(d_o&&dd.n4)return ''+eval('d_o.'+d_pn4);
return '';};
dd.getDiv=function(d_x,d_d){d_d=d_d||document;
if(dd.n4){if(d_d.layers[d_x])return d_d.layers[d_x];for(var d_i=d_d.layers.length;d_i--;){var d_y=dd.getDiv(d_x,d_d.layers[d_i].document);if(d_y)return d_y;}}
if(dd.ie)return d_d.all[d_x]||null;
if(d_d.getElementById)return d_d.getElementById(d_x)||null;
return null;};
dd.getImg=function(d_o,d_nm,d_xy,d_w){d_w=d_w||window;var d_img;
if(document.images&&(d_img=d_w.document.images[d_nm])&&d_img.name==d_nm){
	if(d_xy){if(dd.n4){dd.getPageXY(d_w);d_o.defx=d_img.x+dd.x;d_o.defy=d_img.y+dd.y;}
	else{dd.getPageXY(d_img);d_o.defx=dd.x;d_o.defy=dd.y;}}
	return d_img;}
if(dd.n4)for(var d_i=d_w.document.layers.length;d_i--;){var d_y=dd.getImg(d_o,d_nm,d_xy,d_w.document.layers[d_i]);
	if(d_y)return d_y;}return null;};
dd.getParent=function(d_o,d_p){if(dd.n4){for(d_p,d_i=dd.elements.length;d_i--;)
{if(!((d_p=dd.elements[d_i]).is_image)&&d_p.div&&(d_p.div.document.layers[d_o.name]||d_o.oimg&&d_p.div.document.images[d_o.oimg.name]))
	d_p.addChild(d_o,d_p.detach,1);}}
else{d_p=d_o.is_image?dd.getImg(d_o,d_o.oimg.name):(d_o.div||null);while(d_p&&!!(d_p=d_p.offsetParent||d_p.parentNode||null))
	{if(d_p.ddObj){d_p.ddObj.addChild(d_o,d_p.ddObj.detach,1);break;}}}};
dd.getCmd=function(d_o,d_cmd,d_cmdStr){var d_i=d_o.id.indexOf(d_cmd),d_j,d_y=(d_i>=0)*1;
if(d_y){d_j=d_i+d_cmd.length;if(d_cmdStr)d_o.cmd+=d_o.id.substring(d_i,d_j);d_o.id=d_o.id.substring(0,d_i)+d_o.id.substring(d_j);}return d_y;};
dd.getCmdVal=function(d_o,d_cmd,d_cmdStr,int0){var d_i=d_o.id.indexOf(d_cmd),d_j,d_y=(d_o.id.indexOf(d_cmd)>=0)?dd.Int(d_o.id.substring(d_o.id.indexOf(d_cmd)+d_cmd.length)):int0?-1:0;
if(!int0&&d_y||int0&&d_y>=0){d_j=d_i+d_cmd.length+(""+d_y).length;if(d_cmdStr)d_o.cmd+=d_o.id.substring(d_i,d_j);d_o.id=d_o.id.substring(0,d_i)+d_o.id.substring(d_j);}return d_y;};
dd.addElt=function(d_o,d_p){dd.elements[d_o.name]=dd.elements[d_o.index=dd.elements.length]=d_o;if(d_p)d_p.copies[d_o.name]=d_p.copies[d_p.copies.length]=d_o;};
dd.mkWzDom=function(){var d_o,d_i=dd.elements.length;while(d_i--)dd.getParent(dd.elements[d_i]);d_i=dd.elements.length;while(d_i--){d_o=dd.elements[d_i];
if(d_o.children&&!d_o.parent){var d_j=d_o.children.length;while(d_j--)d_o.children[d_j].setZ(d_o.z+d_o.children[d_j].z,1);}}};
dd.addProps=function(d_o){var d_i,d_c;
if(d_o.is_image){d_o.div=dd.getDiv(d_o.id);d_o.css=(d_o.div&&typeof d_o.div.style!=dd_u)?d_o.div.style:null;d_o.nimg=(dd.n4&&d_o.div)?d_o.div.document.images[0]:(document.images[d_o.id+'NImG']||null);
if(!d_o.noalt&&!dd.noalt&&d_o.nimg&&d_o.oimg){d_o.nimg.alt=d_o.oimg.alt||'';if(d_o.oimg.title)d_o.nimg.title=d_o.oimg.title;}d_o.bgColor='';}
else{d_o.bgColor=dd.getCssProp(d_o.div,'background-color','backgroundColor','bgColor').toLowerCase();
if(dd.n6&&d_o.div){if((d_c=d_o.bgColor).indexOf('rgb')>=0){d_c=d_c.substring(4,d_c.length-1).split(',');d_o.bgColor='#';
for(d_i=0;d_i<d_c.length;d_i++)d_o.bgColor+=parseInt(d_c[d_i]).toString(0x10);}else d_o.bgColor=d_c;}}
if(dd.scalable)d_o.scalable=d_o.resizable^1;else if(dd.resizable)d_o.resizable=d_o.scalable^1;d_o.setZ(d_o.defz);
d_o.cursor=d_o.cursor||dd.cursor||'auto';d_o._setCrs(d_o.nodrag?'auto':d_o.cursor);d_o.diaphan=d_o.diaphan||dd.diaphan||0;d_o.opacity=1.0;
if(dd.ie&&!dd.iemac&&d_o.div&&d_o.div.style)d_o.div.style.filter="Alpha(opacity=100)";d_o.visible=true;};dd.initz=function(){if(!(dd&&(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c)))return;
if(dd.op6)WINSZ(2);else if(dd.n6||dd.ie||dd.op&&!dd.op6||dd.w3c)dd.recalc(1);
var d_drag=(document.onmousemove==DRAG),d_resize=(document.onmousemove==RESIZE);
if(dd.loadFunc)dd.loadFunc();if(d_drag&&document.onmousemove!=DRAG)dd.setEvtHdl(1,DRAG);
else if(d_resize&&document.onmousemove!=RESIZE)dd.setEvtHdl(1,RESIZE);
if((d_drag||d_resize)&&document.onmouseup!=DROP)dd.setEvtHdl(2,DROP);
dd.setEvtHdl(0,PICK);};dd.finlz=function(){if(dd.ie&&dd.elements){var d_i=dd.elements.length;while(d_i--)dd.elements[d_i].del();}};
dd.setEvtHdl=function(d_typ,d_func){if(!d_typ){if(document.onmousedown!=d_func)dd.downFunc=document.onmousedown||null;document.onmousedown=d_func;}
else if(d_typ&1){if(document.onmousemove!=d_func)dd.moveFunc=document.onmousemove||null;document.onmousemove=d_func;}
else{if(document.onmouseup!=d_func)dd.upFunc=document.onmouseup||null;document.onmouseup=d_func;}
if(dd.ce){var d_e=(!d_typ)?Event.MOUSEDOWN:(d_typ&1)?Event.MOUSEMOVE:Event.MOUSEUP;d_func?document.captureEvents(d_e):document.releaseEvents(d_e);}};
dd.evt=function(d_e){this.but=(this.e=d_e||window.event).which||this.e.button||0;
this.button=(this.e.type=='mousedown')?this.but:(dd.e&&dd.e.button)?dd.e.button:0;
this.src=this.e.target||this.e.srcElement||null;this.src.tag=(""+(this.src.tagName||this.src)).toLowerCase();
this.x=dd.Int(this.e.pageX||this.e.clientX||0);this.y=dd.Int(this.e.pageY||this.e.clientY||0);
if(dd.ie){this.x+=dd.getScrollX()-(dd.ie&&!dd.iemac)*1;this.y+=dd.getScrollY()-(dd.ie&&!dd.iemac)*1;}
this.modifKey=this.e.modifiers?this.e.modifiers&Event.SHIFT_MASK:(this.e.shiftKey||false);};
dd.recalc=function(d_x){var d_o,d_i=dd.elements.length;while(d_i--){if(!(d_o=dd.elements[d_i]).is_image&&d_o.div)
{dd.getWH(d_o);if(d_o.div.pos_rel){dd.getPageXY(d_o.div);
var d_dx=dd.x-d_o.x,d_dy=dd.y-d_o.y;d_o.defx+=d_dx;d_o.x+=d_dx;d_o.defy+=d_dy;d_o.y+=d_dy;
var d_p,d_j=d_o.children.length;while(d_j--){if(!(d_p=d_o.children[d_j]).detached&&(d_o!=d_p.defparent||!(d_p.is_image&&dd.getImg(d_p,d_p.oimg.name,1))))
{d_p.defx+=d_dx;d_p.defy+=d_dy;d_p.moveBy(d_dx,d_dy);}}}}
else if(d_o.is_image&&!dd.op6&&!dd.n4){if(dd.n6&&d_x&&!d_o.defw)d_o.resizeTo(d_o.defw=dd.getImgW(d_o.oimg),d_o.defh=dd.getImgH(d_o.oimg));
var d_defx=d_o.defx,d_defy=d_o.defy;if(!(d_o.parent&&d_o.parent!=d_o.defparent)&&(d_x||!d_o.detached||d_o.horizontal||d_o.vertical)&&dd.getImg(d_o,d_o.oimg.name,1))
d_o.moveBy(d_o.defx-d_defx,d_o.defy-d_defy);}}};
function WINSZ(d_x){if(d_x){if(dd.n4||dd.op6&&d_x&2){dd.iW=innerWidth;dd.iH=innerHeight;
if(dd.op6)setTimeout("WINSZ()",0x1ff);}window.onresize=new Function('WINSZ();');}
else if((dd.n4||dd.op6)&&(innerWidth!=dd.iW||innerHeight!=dd.iH))location.reload();
else if(dd.op6)setTimeout("WINSZ()",0x1ff);
else if(!dd.n4)setTimeout('dd.recalc()',0xa);}
WINSZ(1);

function DDObj(d_o,d_i){this.id=d_o;this.cmd='';this.cpy_n=dd.getCmdVal(this,COPY);
this.maxoffb=dd.getCmdVal(this,MAXOFFBOTTOM,0,1);this.maxoffl=dd.getCmdVal(this,MAXOFFLEFT,0,1);this.maxoffr=dd.getCmdVal(this,MAXOFFRIGHT,0,1);this.maxofft=dd.getCmdVal(this,MAXOFFTOP,0,1);
var d_j=dd_cursors.length;while(d_j--)
	if(dd.getCmd(this,dd_cursors[d_j],1)) this.cursor=dd_cursors[d_j].substring(2);
this.clone=dd.getCmd(this,CLONE,1);this.detach=dd.getCmd(this,DETACH_CHILDREN);
this.scalable=dd.getCmd(this,SCALABLE,1);
this.horizontal=dd.getCmd(this,HORIZONTAL);
this.noalt=dd.getCmd(this,NO_ALT,1);this.nodrag=dd.getCmd(this,NO_DRAG);
this.scroll=dd.getCmd(this,SCROLL,1);this.resizable=dd.getCmd(this,RESIZABLE,1);
this.re_z=dd.getCmd(this,RESET_Z,1);
this.diaphan=dd.getCmd(this,TRANSPARENT,1);
this.vertical=dd.getCmd(this,VERTICAL);
this.maxw=dd.getCmdVal(this,MAXWIDTH,1,1);this.minw=Math.abs(dd.getCmdVal(this,MINWIDTH,1,1));this.maxh=dd.getCmdVal(this,MAXHEIGHT,1,1);this.minh=Math.abs(dd.getCmdVal(this,MINHEIGHT,1,1));
this.name=this.id+(d_i||'');this.oimg=dd.getImg(this,this.id,1);this.is_image=!!this.oimg;this.copies=new Array();this.children=new Array();this.parent=this.original=null;
if(this.oimg){this.id=this.name+'div';this.w=dd.getImgW(this.oimg);this.h=dd.getImgH(this.oimg);
	this.dw=this.dh=0;this.defz=dd.Int(dd.getCssProp(this.oimg,'z-index','zIndex','zIndex'))||1;this.defsrc=this.src=this.oimg.src;
	this.htm='<img name="'+this.id+'NImG"'+' src="'+this.oimg.src+'" '+'width="'+this.w+'" height="'+this.h+'">';
	this.t_htm='<div id="'+this.id+'" style="position:absolute;'+'left:'+(this.cssx=this.x=this.defx)+'px;'+'top:'+(this.cssy=this.y=this.defy)+'px;'+'width:'+this.w+'px;'+'height:'+this.h+'px;">'+this.htm+'<\/div>';}
else{if(!!(this.div=dd.getDiv(this.id))&&typeof this.div.style!=dd_u)this.css=this.div.style;dd.getWH(this);
	if(this.div){this.div.ddObj=this;this.div.pos_rel=(""+(this.div.parentNode?this.div.parentNode.tagName:this.div.parentElement?this.div.parentElement.tagName:'').toLowerCase().indexOf('body')<0);}
	dd.getPageXY(this.div);this.defx=this.x=dd.x;this.defy=this.y=dd.y;dd.getCssXY(this);this.defz=dd.Int(dd.getCssProp(this.div,'z-index','zIndex','zIndex'));}
this.defw=this.w||0;this.defh=this.h||0;}
DDObj.prototype.moveBy=function(d_x,d_y,d_kds,d_o){if(!this.div)return;this.x+=(d_x=dd.Int(d_x));this.y+=(d_y=dd.Int(d_y));
	if(!d_kds||this.is_image||this.parent!=this.defparent){(d_o=this.css||this.div).left=(this.cssx+=d_x)+dd.px;d_o.top=(this.cssy+=d_y)+dd.px;}
	var d_i=this.children.length;while(d_i--){if(!(d_o=this.children[d_i]).detached)d_o.moveBy(d_x,d_y,1);d_o.defx+=d_x;d_o.defy+=d_y;}};
DDObj.prototype.moveTo=function(d_x,d_y){this.moveBy(dd.Int(d_x)-this.x,dd.Int(d_y)-this.y);};
DDObj.prototype.hide=function(d_m,d_o,d_p){if(this.div&&this.visible){d_p=this.css||this.div;
	if(d_m&&!dd.n4){this.display=dd.getCssProp(this.div,"display","display","display");
	if(this.oimg){this.oimg.display=dd.getCssProp(this.oimg,"display","display","display");
	this.oimg.style.display="none";}d_p.display="none";dd.recalc();}else d_p.visibility="hidden";}
	this.visible=false;var d_i=this.children.length;while(d_i--)if(!(d_o=this.children[d_i]).detached)d_o.hide(d_m);};
DDObj.prototype.show=function(d_o,d_p){if(this.div){d_p=this.css||this.div;
	if(d_p.display&&d_p.display=="none"){d_p.display=this.display||"block";if(this.oimg)this.oimg.style.display=this.oimg.display||"inline";dd.recalc();}else d_p.visibility = "visible";}
	this.visible=true;var d_i=this.children.length;while(d_i--)if(!(d_o=this.children[d_i]).detached)d_o.show();};
DDObj.prototype.resizeTo=function(d_w,d_h,d_o){if(!this.div)return;d_w=(this.w=dd.Int(d_w))-this.dw;d_h=(this.h=dd.Int(d_h))-this.dh;
	if(dd.n4){this.div.resizeTo(d_w,d_h);if(this.is_image){this.write('<img src="'+this.src+'" width="'+d_w+'" height="'+d_h+'">');(this.nimg=this.div.document.images[0]).src=this.src;}}
	else if(typeof this.css.pixelWidth!=dd_u){this.css.pixelWidth=d_w;this.css.pixelHeight=d_h;
	if(this.is_image){(d_o=this.nimg.style).pixelWidth=d_w;d_o.pixelHeight=d_h;}}
	else{this.css.width=d_w+dd.px;this.css.height=d_h+dd.px;if(this.is_image){(d_o=this.nimg).width=d_w;d_o.height=d_h;if(!d_o.complete)d_o.src=this.src;}}};
DDObj.prototype.resizeBy=function(d_dw,d_dh){this.resizeTo(this.w+dd.Int(d_dw),this.h+dd.Int(d_dh));};
DDObj.prototype.swapImage=function(d_x,d_cp){if(!this.nimg)return;this.nimg.src=d_x;this.src=this.nimg.src;
	if(d_cp){var d_i=this.copies.length;while(d_i--)this.copies[d_i].src=this.copies[d_i].nimg.src=this.nimg.src;}};
DDObj.prototype.setBgColor=function(d_x){if(dd.n4&&this.div)this.div.bgColor=d_x;else if(this.css)this.css.background=d_x;this.bgColor=d_x;};
DDObj.prototype.write=function(d_x,d_o){this.text=d_x;if(!this.div)return;
	if(dd.n4){(d_o=this.div.document).open();d_o.write(d_x);d_o.close();dd.getWH(this);}
	else if(!dd.op6){this.css.height='auto';this.div.innerHTML=d_x;if(!dd.ie4)dd.recalc();if(dd.ie4||dd.n6)setTimeout('dd.recalc();',0);}};
DDObj.prototype.copy=function(d_n,d_p){if(!this.oimg)return;d_n=d_n||1;while(d_n--){var d_l=this.copies.length,d_o=new DDObj(this.name+this.cmd,d_l+1);
	if(dd.n4){d_o.id=(d_p=new Layer(d_o.w)).name;d_p.clip.height=d_o.h;d_p.visibility='show';(d_p=d_p.document).open();d_p.write(d_o.htm);d_p.close();}
	else if(dd.db.insertAdjacentHTML)dd.db.insertAdjacentHTML("AfterBegin",d_o.t_htm);else if(document.createElement&&dd.db&&dd.db.appendChild)
	{dd.db.appendChild(d_p=document.createElement('div'));d_p.innerHTML=d_o.htm;d_p.id=d_o.id;d_p.style.position='absolute';d_p.style.width=d_o.w+'px';d_p.style.height=d_o.h+'px';}
	else if(dd.db&&dd.db.innerHTML)dd.db.innerHTML+=d_o.t_htm;d_o.defz=this.defz+1+d_l;dd.addProps(d_o);d_o.original=this;dd.addElt(d_o,this);
	if(this.parent){this.parent.addChild(d_o,this.detached);d_o.defparent=this.defparent;}d_o.moveTo(d_o.defx=this.defx,d_o.defy=this.defy);if(dd.n4)d_o.defsrc=d_o.src=this.defsrc;d_o.swapImage(this.src);}};
DDObj.prototype.addChild=function(d_kd,detach,defp){if(typeof d_kd!="object")d_kd=dd.elements[d_kd];
	if(d_kd.parent&&d_kd.parent==this||d_kd==this||!d_kd.is_image&&d_kd.defparent&&!defp)return;this.children[this.children.length]=this.children[d_kd.name]=d_kd;d_kd.detached=detach||0;
	if(defp)d_kd.defparent=this;else if(this==d_kd.defparent&&d_kd.is_image)dd.getImg(this,d_kd.oimg.name,1);if(!d_kd.defparent||this!=d_kd.defparent){d_kd.defx=d_kd.x;d_kd.defy=d_kd.y;}
	if(!detach){d_kd.defz=d_kd.defz+this.defz-(d_kd.parent?d_kd.parent.defz:0)+(!d_kd.is_image*1);d_kd.setZ(d_kd.z+this.z-(d_kd.parent?d_kd.parent.z:0)+(!d_kd.is_image*1),1);}if(d_kd.parent)d_kd.parent._removeChild(d_kd,1);d_kd.parent=this;};
DDObj.prototype._removeChild=function(d_kd, d_newp){if(typeof d_kd!="object")d_kd=this.children[d_kd];var d_oc=this.children,d_nc=new Array();
	for(var d_i=0;d_i<d_oc.length;d_i++)if(d_oc[d_i]!=d_kd)d_nc[d_nc.length]=d_oc[d_i];this.children=d_nc;d_kd.parent=null;if(!d_newp){d_kd.detached=d_kd.defp=0;if(d_kd.is_image)dd.getImg(d_kd,d_kd.oimg.name,1);}};
DDObj.prototype.attachChild=function(d_kd){(d_kd=(typeof d_kd!="object")?this.children[d_kd]:d_kd).detached=0;d_kd.setZ(d_kd.defz+this.z-this.defz,1);};
DDObj.prototype.detachChild=function(d_kd){(d_kd=(typeof d_kd!="object")?this.children[d_kd]:d_kd).detached=1;};
DDObj.prototype.setZ=function(d_x,d_kds,d_o){if(d_kds){var d_dz=d_x-this.z,d_i=this.children.length;while(d_i--)
	if(!(d_o=this.children[d_i]).detached)d_o.setZ(d_o.z+d_dz,1);}dd.z=Math.max(dd.z,this.z=this.div?((this.css||this.div).zIndex=d_x):0);};
DDObj.prototype.maximizeZ=function(){this.setZ(dd.z+1,1);};
DDObj.prototype._resetZ=function(d_o){if(this.re_z||dd.re_z){this.setZ(this.defz);var d_i=this.children.length;while(d_i--)if(!(d_o=this.children[d_i]).detached)d_o.setZ(d_o.defz);}};
DDObj.prototype.setOpacity=function(d_x){this.opacity=d_x;this._setOpaRel(1.0,1);};
DDObj.prototype._setOpaRel=function(d_x,d_kd,d_y,d_o){if(this.diaphan||d_kd){d_y=this.opacity*d_x;
	if(dd.n6)this.css.MozOpacity=d_y;else if(dd.ie&&!dd.iemac){if(this.css)this.css.filter="Alpha(opacity="+parseInt(100*d_y)+")";}else if(this.css)this.css.opacity=d_y;var d_i=this.children.length;while(d_i--)
	if(!(d_o=this.children[d_i]).detached)d_o._setOpaRel(d_x,1);}};
DDObj.prototype.setCursor=function(d_x){this._setCrs(this.cursor=(d_x.indexOf('c:')+1)?d_x.substring(2):d_x);};
DDObj.prototype._setCrs=function(d_x){if(this.css)this.css.cursor=((!dd.ie||dd.iemac)&&d_x=='hand')?'pointer':d_x;};
DDObj.prototype.setDraggable=function(d_x){this.nodrag=!d_x*1;this._setCrs(d_x?this.cursor:'auto');};
DDObj.prototype.setResizable=function(d_x){this.resizable=d_x*1;if(d_x)this.scalable=0;};
DDObj.prototype.setScalable=function(d_x){this.scalable=d_x*1;if(d_x)this.resizable=0;};
DDObj.prototype.del=function(d_os,d_o){var d_i;if(this.parent&&this.parent._removeChild)this.parent._removeChild(this);
	if(this.original){this.hide();if(this.original.copies){d_os=new Array();for(d_i= 0;d_i<this.original.copies.length;d_i++)
	if((d_o=this.original.copies[d_i])!=this)d_os[d_o.name]=d_os[d_os.length]=d_o;this.original.copies=d_os;}}
	else if(this.is_image){this.hide();if(this.oimg){if(dd.n4)this.oimg.src=this.defsrc;else this.oimg.style.visibility='visible';}}
	else if(this.moveTo){if(this.css)this.css.cursor='default';this.moveTo(this.defx,this.defy);this.resizeTo(this.defw,this.defh);}
d_os=new Array();for(d_i=0;d_i<dd.elements.length;d_i++){if((d_o=dd.elements[d_i])!=this)d_os[d_o.name]=d_os[d_o.index=d_os.length]=d_o;else d_o._free();}
dd.elements=d_os;if(!dd.op6&&!dd.n4)dd.recalc();};DDObj.prototype._free=function(){for(var d_i in this)
this[d_i]=null;dd.elements[this.name]=null;};dd.n4RectVis=function(vis){for(var d_i=4;d_i--;){
dd.rectI[d_i].visibility=dd.rectA[d_i].visibility=vis?'show':'hide';if(vis)dd.rectI[d_i].zIndex=dd.rectA[d_i].zIndex=dd.z+2;}};
dd.n4RectPos=function(d_o,d_x,d_y,d_w,d_h){d_o.x=d_x;d_o.y=d_y;d_o.clip.width= d_w;d_o.clip.height= d_h;};
dd.n4Rect=function(d_w,d_h){var d_i;if(!dd.rectI){dd.rectI=new Array();dd.rectA=new Array();}
if(!dd.rectI[0]){for(d_i=4;d_i--;){(dd.rectI[d_i]=new Layer(1)).bgColor='#000000';(dd.rectA[d_i]=new Layer(1)).bgColor='#ffffff';}}
if(!dd.rectI[0].visibility||dd.rectI[0].visibility=='hide')dd.n4RectVis(1);
dd.obj.w=d_w;dd.obj.h=d_h;for(d_i=4;d_i--;){dd.n4RectPos(dd.rectI[d_i],dd.obj.x+(!(d_i-1)?(dd.obj.w-1):0),dd.obj.y+(!(d_i-2)?(dd.obj.h-1):0),d_i&1||dd.obj.w,!(d_i&1)||dd.obj.h);
dd.n4RectPos(dd.rectA[d_i],!(d_i-1)?dd.rectI[1].x+1:(dd.obj.x-1),!(d_i-2)?dd.rectI[2].y+1:(dd.obj.y-1),d_i&1||dd.obj.w+2,!(d_i&1)||dd.obj.h+2);}};
dd.reszTo=function(d_w,d_h){if(dd.n4&&dd.obj.is_image)dd.n4Rect(d_w,d_h);else dd.obj.resizeTo(d_w,d_h);};
dd.embedVis=function(d_vis){var d_o=new Array('iframe','applet','embed','object');var d_i=d_o.length;while(d_i--){var d_p=dd.ie?document.all.tags(d_o[d_i]):document.getElementsByTagName?document.getElementsByTagName(d_o[d_i]):null;
if(d_p){var d_j=d_p.length;while(d_j--){var d_q=d_p[d_j];while(d_q.offsetParent||d_q.parentNode){if((d_q=d_q.parentNode||d_q.offsetParent||null)==dd.obj.div){d_p[d_j].style.visibility=d_vis;break;}}}}}};
dd.maxOffX=function(d_x,d_y){return((dd.obj.maxoffl+1&&(d_y=dd.obj.defx-dd.obj.maxoffl)-d_x>0||dd.obj.maxoffr+1&&(d_y=dd.obj.defx+dd.obj.maxoffr)-d_x<0)?d_y:d_x);};
dd.maxOffY=function(d_x,d_y){return((dd.obj.maxofft+1&&(d_y=dd.obj.defy-dd.obj.maxofft)-d_x>0||dd.obj.maxoffb+1&&(d_y=dd.obj.defy+dd.obj.maxoffb)-d_x<0)?d_y:d_x);};
dd.inWndW=function(d_x,d_y){var d_wx=dd.getScrollX(),d_ww=dd.getWndW();return(((d_y=d_wx+2)-d_x>0)||((d_y=d_wx+d_ww+dd.obj.w-2)-d_x<0)?d_y:d_x);};
dd.inWndH=function(d_x,d_y){var d_wy=dd.getScrollY(),d_wh=dd.getWndH();return(((d_y=d_wy+2)-d_x>0)||((d_y=d_wy+d_wh+dd.obj.h-2)-d_x<0)?d_y:d_x);};
dd.limW=function(d_w){return((dd.obj.minw-d_w>0)?dd.obj.minw:(dd.obj.maxw>0&&dd.obj.maxw-d_w<0)?dd.obj.maxw:d_w);};
dd.limH=function(d_h){return((dd.obj.minh-d_h>0)?dd.obj.minh:(dd.obj.maxh>0&&dd.obj.maxh-d_h<0)?dd.obj.maxh:d_h);};
function DDScroll(){if(!dd.obj||!dd.obj.scroll&&!dd.scroll||dd.op||dd.ie4||dd.whratio){dd.scrx=dd.scry=0;return;}
var d_bnd=0x1c,d_wx=dd.getScrollX(),d_wy=dd.getScrollY();if(dd.msmoved){var d_ww=dd.getWndW(),d_wh=dd.getWndH(),d_y;
dd.scrx=((d_y=dd.e.x-d_ww-d_wx+d_bnd)>0)?(d_y>>=2)*d_y:((d_y=d_wx+d_bnd-dd.e.x)>0)?-(d_y>>=2)*d_y:0;dd.scry=((d_y=dd.e.y-d_wh-d_wy+d_bnd)>0)?(d_y>>=2)*d_y:((d_y=d_wy+d_bnd-dd.e.y)>0)?-(d_y>>=2)*d_y:0;}
if(dd.scrx||dd.scry){window.scrollTo(d_wx+(dd.scrx=dd.obj.is_resized?dd.limW(dd.obj.w+dd.scrx)-dd.obj.w:dd.obj.vertical?0:(dd.maxOffX(dd.obj.x+dd.scrx)-dd.obj.x)),d_wy+(dd.scry=dd.obj.is_resized?dd.limH(dd.obj.h+dd.scry)-dd.obj.h:dd.obj.horizontal?0:(dd.maxOffY(dd.obj.y+dd.scry)-dd.obj.y)));
dd.obj.is_dragged?dd.obj.moveTo(dd.obj.x+dd.getScrollX()-d_wx,dd.obj.y+dd.getScrollY()-d_wy):dd.reszTo(dd.obj.w+dd.getScrollX()-d_wx,dd.obj.h+dd.getScrollY()-d_wy);}
dd.msmoved=0;window.setTimeout('DDScroll()',0x33);}

function PICK(d_ev){dd.e=new dd.evt(d_ev);if(dd.e.x>=dd.getWndW()+dd.getScrollX()||dd.e.y>=dd.getWndH()+dd.getScrollY())return true;
var d_o,d_cmp=-1,d_i=dd.elements.length;while(d_i--){d_o=dd.elements[d_i];if(dd.n4&&dd.e.but>1&&dd.e.src==d_o.oimg&&!d_o.clone) return false;
if(d_o.visible&&dd.e.but<=1&&dd.e.x>=d_o.x&&dd.e.x<=d_o.x+d_o.w&&dd.e.y>=d_o.y&&dd.e.y<=d_o.y+d_o.h)
{if(d_o.z>d_cmp&&dd.e.src.tag.indexOf('input')<0&&dd.e.src.tag.indexOf('textarea')<0&&dd.e.src.tag.indexOf('select')<0&&dd.e.src.tag.indexOf('option')<0);{d_cmp=d_o.z;dd.obj=d_o;}}}
if(dd.obj){if(dd.obj.nodrag)dd.obj=null;else{dd.e.e.cancelBubble=true;var d_rsz=dd.e.modifKey&&(dd.obj.resizable||dd.obj.scalable);
if(dd.op&&!dd.op6){(d_o=document.getElementById('OpBlUr')).style.pixelLeft=dd.e.x;d_o.style.pixelTop=dd.e.y;(d_o=d_o.children[0].children[0]).focus();d_o.blur();}
else if(dd.ie&&!dd.ie4){if(document.selection&&document.selection.empty)document.selection.empty();dd.db.onselectstart=function(){event.returnValue=false;};}
if(d_rsz){dd.obj._setCrs('se-resize');dd.obj.is_resized=1;dd.whratio=dd.obj.scalable?dd.obj.defw/dd.obj.defh:0;
if(dd.ie){if(dd.ie4){window.dd_x=dd.getScrollX();window.dd_y=dd.getScrollY();}
setTimeout('if(dd.obj&&document.selection&&document.selection.empty)'+'{'+'document.selection.empty();'+'if(dd.ie4)window.scrollTo(window.dd_x,window.dd_y);'+'}',0);}
dd.setEvtHdl(1,RESIZE);dd.reszTo(dd.obj.w,dd.obj.h);}
else{dd.obj.is_dragged=1;dd.setEvtHdl(1,DRAG);}
dd.setEvtHdl(2,DROP);dd.embedVis('hidden');dd.obj._setOpaRel(0.64);dd.obj.maximizeZ();dd.ofx=dd.obj.x+dd.obj.w-dd.e.x;dd.ofy=dd.obj.y+dd.obj.h-dd.e.y;
if(window.my_PickFunc)my_PickFunc();DDScroll();return !(dd.obj.is_resized||dd.n4&&dd.obj.is_image||dd.n6||dd.w3c);}}
if(dd.downFunc)return dd.downFunc(d_ev);return true;}

function DRAG(d_ev){if(!dd.obj||!dd.obj.visible)return true;
if(dd.ie4||dd.w3c||dd.n6||dd.obj.children.length>0xf){if(dd.wait)return false;dd.wait=1;setTimeout('dd.wait=0;',dd.tiv);}
dd.e=new dd.evt(d_ev);if(dd.ie&&!dd.e.but){DROP(d_ev);return true;}
dd.msmoved=1;dd.obj.moveTo(dd.obj.vertical?dd.obj.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.w),dd.obj.horizontal?dd.obj.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.h));
if(window.my_DragFunc)my_DragFunc();return false;}

function RESIZE(d_ev){if(!dd.obj||!dd.obj.visible)return true;
if(dd.wait)return false;dd.wait=1;setTimeout('dd.wait = 0;',dd.tiv);dd.e=new dd.evt(d_ev);
if(dd.ie&&!dd.e.but){DROP(d_ev);return true;}dd.msmoved=1;var d_w=dd.limW(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.x),d_h;
if(!dd.whratio)d_h=dd.limH(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.y);
else{d_h=dd.limH(dd.inWndH(Math.round(d_w/dd.whratio)+dd.obj.y)-dd.obj.y);d_w=Math.round(d_h*dd.whratio);}
dd.reszTo(d_w,d_h);if(window.my_ResizeFunc)my_ResizeFunc();return false;}

function DROP(d_ev){if(dd.obj){if(dd.obj.is_dragged){if(!dd.obj.is_image) dd.getWH(dd.obj);}
else if(dd.n4){if(dd.obj.is_image){dd.n4RectVis(0);dd.obj.resizeTo(dd.obj.w,dd.obj.h);}}
if(!dd.n4&&!dd.op6||!dd.obj.is_image)dd.recalc();dd.setEvtHdl(1,dd.moveFunc);dd.setEvtHdl(2,dd.upFunc);
if(dd.db)dd.db.onselectstart=null;dd.obj._setOpaRel(1.0);dd.obj._setCrs(dd.obj.cursor);dd.embedVis('visible');dd.obj._resetZ();
if(window.my_DropFunc){dd.e=new dd.evt(d_ev);my_DropFunc();}
dd.msmoved=dd.obj.is_dragged=dd.obj.is_resized=dd.whratio=0;dd.obj=null;}dd.setEvtHdl(0,PICK);}

function SET_DHTML(){var d_a=arguments,d_ai,d_htm='',d_o,d_i=d_a.length;while (d_i--){if(dd.op6){var d_t0=(new Date()).getTime();while ((new Date()).getTime()-d_t0<0x99);}
if(!(d_ai=d_a[d_i]).indexOf('c:'))dd.cursor=d_ai.substring(2);
else if(d_ai==NO_ALT)dd.noalt=1;else if(d_ai==SCROLL)dd.scroll=1;else if(d_ai==RESET_Z)dd.re_z=1;else if(d_ai==RESIZABLE)dd.resizable=1;else if(d_ai==SCALABLE)dd.scalable=1;else if(d_ai==TRANSPARENT)dd.diaphan=1;else{d_o=new DDObj(d_ai);dd.addElt(d_o);d_htm+=d_o.t_htm||'';
if(d_o.oimg&&d_o.cpy_n){var d_j=0;while(d_j<d_o.cpy_n){var d_p=new DDObj(d_o.name+d_o.cmd, ++d_j);dd.addElt(d_p,d_o);d_p.defz=d_o.defz+d_j;d_p.original=d_o;d_htm+=d_p.t_htm;}}}}
if(dd.n4||dd.n6||dd.ie||dd.op||dd.w3c)document.write((dd.n4?'<div style="position:absolute;"><\/div>\n':(dd.op&&!dd.op6)?'<div id="OpBlUr" style="position:absolute;visibility:hidden;width:0px;height:0px;"><form><input type="text" style="width:0px;height:0px;"><\/form><\/div>':'')+d_htm);
dd.z=0x33;d_i=dd.elements.length;while(d_i--){dd.addProps(d_o=dd.elements[d_i]);if(d_o.is_image&&!d_o.original&&!d_o.clone)dd.n4?d_o.oimg.src=spacer:d_o.oimg.style.visibility='hidden';}
dd.mkWzDom();if(window.onload)dd.loadFunc=window.onload;window.onload=dd.initz;window.onunload=dd.finlz;dd.setEvtHdl(0,PICK);}

function ADD_DHTML(d_o){d_o=new DDObj(d_o);dd.addElt(d_o);dd.addProps(d_o);dd.mkWzDom();}
function my_PickFunc(){}
function my_ResizeFunc(){}
function my_DragFunc(){if(dd.obj.name=='red'||dd.obj.name=='grn'||dd.obj.name=='blu'){r=(dd.elements.red.defy-dd.elements.red.y)*2.125;g=(dd.elements.grn.defy-dd.elements.grn.y)*2.125;b=(dd.elements.blu.defy-dd.elements.blu.y)*2.125;rgb(r,g,b);} 
else if(dd.obj.name=='lum'||dd.obj.name=='sat'||dd.obj.name=='hue'){H2=(dd.elements.hue.defy-dd.elements.hue.y)*3;S2=(dd.elements.sat.defy-dd.elements.sat.y)/1.2;L2=(dd.elements.lum.defy-dd.elements.lum.y)/1.2;hsl(H2,S2,L2);}
else if(dd.obj.name=='aaa'||dd.obj.name=='bbb'){laba=(dd.elements.aaa.defy-dd.elements.aaa.y)*1.558333-88;labb=(dd.elements.bbb.defy-dd.elements.bbb.y)*1.7-109;lab(laba,labb);}
else if(dd.obj.name=='zzz'){ZZ=(dd.elements.zzz.defy-dd.elements.zzz.y)*.708333+5;r=(dd.elements.red.defy-dd.elements.red.y)*2.125;g=(dd.elements.grn.defy-dd.elements.grn.y)*2.125;b=(dd.elements.blu.defy-dd.elements.blu.y)*2.125;rgb(r,g,b);}
else if(dd.obj.name=='vg5'){var rx=gx=bx=0;vg5x=(dd.elements.vg5.x-dd.elements.vg5.defx)/428;r1=dec(vg1x.substr(0,2));g1=dec(vg1x.substr(2,2));b1=dec(vg1x.substr(4,2));r2=dec(vg2x.substr(0,2));g2=dec(vg2x.substr(2,2));b2=dec(vg2x.substr(4,2));rx=(r2-r1);gx=(g2-g1);bx=(b2-b1);r=r1+rx*vg5x;g=g1+gx*vg5x;b=b1+bx*vg5x;rgb(r,g,b);}
else if(dd.obj.name=='vg6'){vg6x=(dd.elements.vg6.x-dd.elements.vg6.defx);h3=HH1+HHx*vg6x;if(h3>360){h3=h3-360;}s3=SS1+SSx*vg6x;l3=LL1+LLx*vg6x;swatch();r=rr;g=gg;b=bb;rgb(r,g,b);}
 }
function my_DropFunc(){temp=dd.elements[dd.obj.name];var syx=dd.getWndW();syx=(syx-850)/2;if(syx<1)syx=0;
if(dd.obj.x>syx+170&&dd.obj.x<syx+275&&dd.obj.y>115&&dd.obj.y<175){temp.moveTo(temp.defx,temp.defy);xvert();cell.bgColor=cellx=col;r=dec(col.substr(0,2));g=dec(col.substr(2,2));b=dec(col.substr(4,2));rgb(r,g,b);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y> 83&&dd.obj.y<132){temp.moveTo(temp.defx,temp.defy);xvert();sv1.style.backgroundColor=sv1x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su1.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>131&&dd.obj.y<180){temp.moveTo(temp.defx,temp.defy);xvert();sv2.style.backgroundColor=sv2x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su2.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>179&&dd.obj.y<228){temp.moveTo(temp.defx,temp.defy);xvert();sv3.style.backgroundColor=sv3x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su3.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>227&&dd.obj.y<276){temp.moveTo(temp.defx,temp.defy);xvert();sv4.style.backgroundColor=sv4x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su4.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>275&&dd.obj.y<324){temp.moveTo(temp.defx,temp.defy);xvert();sv5.style.backgroundColor=sv5x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su5.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>323&&dd.obj.y<372){temp.moveTo(temp.defx,temp.defy);xvert();sv6.style.backgroundColor=sv6x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su6.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>371&&dd.obj.y<420){temp.moveTo(temp.defx,temp.defy);xvert();sv7.style.backgroundColor=sv7x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su7.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+624&&dd.obj.x<syx+724&&dd.obj.y>419&&dd.obj.y<466){temp.moveTo(temp.defx,temp.defy);xvert();sv8.style.backgroundColor=sv8x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);su8.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);}
else if(dd.obj.x>syx+000&&dd.obj.x<syx+140&&dd.obj.y>520&&dd.obj.y<600){temp.moveTo(temp.defx,temp.defy);xvert();vg1.style.backgroundColor=vg1x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);vg1.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);gray=(rr*.298)+(gg*.586)+(bb*.114);if(gray>120){vg1.style.color="000000";}else{vg1.style.color="ffffff";}blend();}
else if(dd.obj.x>syx+592&&dd.obj.x<syx+732&&dd.obj.y>520&&dd.obj.y<600){temp.moveTo(temp.defx,temp.defy);xvert();vg2.style.backgroundColor=vg2x=col;rr=dec(col.substr(0,2));gg=dec(col.substr(2,2));bb=dec(col.substr(4,2));qsep(rr,gg,bb);vg2.innerHTML="Visual:&nbsp;"+Math.round((rr*.1172)+(gg*.2299)+(bb*.0449))+"%<br>RGB:&nbsp;"+hex(rr)+hex(gg)+hex(bb)+"<br>C"+Math.round(c1)+"&nbsp;M"+Math.round(c2)+"&nbsp;Y"+Math.round(c3)+"&nbsp;K"+Math.round(c4);gray=(rr*.298)+(gg*.586)+(bb*.114);if(gray>120){vg2.style.color="000000";}else{vg2.style.color="ffffff";}blend();}
 }
function xvert(){if(dd.obj.name=="sw1"){col=sw1x;}else if(dd.obj.name=="sw2"){col=sw2x;}else if(dd.obj.name=="sw3"){col=sw3x;}else if(dd.obj.name=="sw4"){col=sw4x;}
else if(dd.obj.name=="sw5"){col=sw5x;}else if(dd.obj.name=="sw6"){col=sw6x;}else if(dd.obj.name=="sw7"){col=sw7x;}else if(dd.obj.name=="sw8"){col=sw8x;}
else if(dd.obj.name=="sw9"){col=sw9x;}else if(dd.obj.name=="swa"){col=swax;}else if(dd.obj.name=="swb"){col=swbx;}else if(dd.obj.name=="swc"){col=swcx;}
else if(dd.obj.name=="sv1"){col=sv1x;}else if(dd.obj.name=="sv2"){col=sv2x;}else if(dd.obj.name=="sv3"){col=sv3x;}else if(dd.obj.name=="sv4"){col=sv4x;}
else if(dd.obj.name=="sv5"){col=sv5x;}else if(dd.obj.name=="sv6"){col=sv6x;}else if(dd.obj.name=="sv7"){col=sv7x;}else if(dd.obj.name=="sv8"){col=sv8x;} }
function blend(){var rx=gx=bx=0; var blend="";
r1=dec(vg1x.substr(0,2));g1=dec(vg1x.substr(2,2));b1=dec(vg1x.substr(4,2));r2=dec(vg2x.substr(0,2));g2=dec(vg2x.substr(2,2));b2=dec(vg2x.substr(4,2));rx=(r2-r1)/112;gx=(g2-g1)/112;bx=(b2-b1)/112;blend="<table width=444 height=24 cellpadding=0 cellspacing=0 border=0><tr>";
for(i=1;i<=111;i++){blend=blend+"<td width=4 bgcolor='"+hex(r1+rx*i)+hex(g1+gx*i)+hex(b1+bx*i)+"'></td>";}blend=blend+"</tr></table>";vg3.innerHTML=blend;
rgb2(r1,g1,b1);HH1=H2;SS1=S2;LL1=L2;rgb2(r2,g2,b2);HH2=H2;SS2=S2;LL2=L2;if(HH2-HH1>180){HH1=HH1+360;}if(HH1-HH2>180){HH2=HH2+360;}HHx=(HH2-HH1)/222;SSx=(SS2-SS1)/222;LLx=(LL2-LL1)/222;blend="<table width=444 height=24 cellpadding=0 cellspacing=0 border=0><tr>";
for(i=1;i<=221;i++){h3=HH1+HHx*i;if(h3>360){h3=h3-360;}s3=SS1+SSx*i;l3=LL1+LLx*i;swatch();blend=blend+"<td width=2 bgcolor='"+hex(rr)+hex(gg)+hex(bb)+"'></td>";}blend=blend+"</tr></table>";vg4.innerHTML=blend;
HHx=(HH2-HH1)/428;SSx=(SS2-SS1)/428;LLx=(LL2-LL1)/428;
 }
function pos(){
dd.elements.red.moveTo(dd.elements.red.defx,dd.elements.red.defy-r/2.125);
dd.elements.grn.moveTo(dd.elements.grn.defx,dd.elements.grn.defy-g/2.125);
dd.elements.blu.moveTo(dd.elements.blu.defx,dd.elements.blu.defy-b/2.125);
dd.elements.lum.moveTo(dd.elements.lum.defx,dd.elements.lum.defy-L2*1.2);
dd.elements.sat.moveTo(dd.elements.sat.defx,dd.elements.sat.defy-S2*1.2);
dd.elements.hue.moveTo(dd.elements.hue.defx,dd.elements.hue.defy-H2/3);
dd.elements.aaa.moveTo(dd.elements.aaa.defx,dd.elements.aaa.defy-(laba+88)/1.558333);
dd.elements.bbb.moveTo(dd.elements.bbb.defx,dd.elements.bbb.defy-(labb+109)/1.7);
dd.elements.zzz.moveTo(dd.elements.zzz.defx,dd.elements.zzz.defy-(ZZ-5)/.708333);
dd.elements.vg5.moveTo(dd.elements.vg5.defx+vg5x*428,dd.elements.vg5.defy);
dd.elements.vg6.moveTo(dd.elements.vg6.defx+vg6x,dd.elements.vg6.defy);
document.getElementById('cell').bgColor=cellx=hex(r)+hex(g)+hex(b);
document.getElementById('sw6').style.backgroundColor=document.getElementById('sw6').innerHTML=sw6x=hex(r)+hex(g)+hex(b);if(labl>62){document.getElementById('sw6').style.color="000000";}else{document.getElementById('sw6').style.color="ffffff";}
i=0;hx=L-8;if(hx<0)hx=0;hy=L+8;if(hy>100)hy=100;do{i++;}while(colL[i]<hx);
j=i;do{j++;}while(colL[j]<=hy);
k=9999;kk=0;for(ii=i;ii<=j;ii++){colZ[ii]=2*Math.abs(H-colH[ii])+Math.abs(L-colL[ii])+Math.abs(S2-colS[ii]);if(colZ[ii]<k){k=colZ[ii];kk=ii;}}
k0="&nbsp;";if(colID[kk]>=1107&&colID[kk]<=1310)k0="Metallic Ink";if(colID[kk]>=1311&&colID[kk]<=1436)k0="Pastel Ink";if(colID[kk]>=1093&&colID[kk]<=1106)k0="Fluorescent Ink";
document.getElementById('pan').bgColor=colR[kk]+colG[kk]+colB[kk];document.getElementById('pan1').innerHTML=colN[kk]+"<br>"+k0;
h3=H2;s3=S2;l3=L2+25;if(l3>90){l3=l3-75;}if(L2>85){l3=l3+(L2-85)/2;}if(L2<15){l3=l3-(15-L2);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('sw2').style.backgroundColor=document.getElementById('sw2').innerHTML=sw2x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw2').style.color="000000";}else{document.getElementById('sw2').style.color="ffffff";}
h3=H2;s3=S2;l3=L2-25;if(l3<15){l3=l3+75;}if(L2>85){l3=l3+(L2-85);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('swa').style.backgroundColor=document.getElementById('swa').innerHTML=swax=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('swa').style.color="000000";}else{document.getElementById('swa').style.color="ffffff";}
h3=H2-ZZ;if(h3<0){h3=h3+360;}s3=S2;l3=L2;swatch();document.getElementById('sw5').style.backgroundColor=document.getElementById('sw5').innerHTML=sw5x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw5').style.color="000000";}else{document.getElementById('sw5').style.color="ffffff";}
h3=H2-ZZ;if(h3<0){h3=h3+360;}s3=S2;l3=L2+25;if(l3>90){l3=l3-75;}if(L2>85){l3=l3+(L2-85)/2;}if(L2<15){l3=l3-(15-L2);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('sw1').style.backgroundColor=document.getElementById('sw1').innerHTML=sw1x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw1').style.color="000000";}else{document.getElementById('sw1').style.color="ffffff";}
h3=H2-ZZ;if(h3<0){h3=h3+360;}s3=S2;l3=L2-25;if(l3<15){l3=l3+75;}if(L2>85){l3=l3+(L2-85);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('sw9').style.backgroundColor=document.getElementById('sw9').innerHTML=sw9x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw9').style.color="000000";}else{document.getElementById('sw9').style.color="ffffff";}
h3=H2+ZZ;if(h3>360){h3=h3-360;}s3=S2;l3=L2;swatch();document.getElementById('sw7').style.backgroundColor=document.getElementById('sw7').innerHTML=sw7x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw7').style.color="000000";}else{document.getElementById('sw7').style.color="ffffff";}
h3=H2+ZZ;if(h3>360){h3=h3-360;}s3=S2;l3=L2+25;if(l3>90){l3=l3-75;}if(L2>85){l3=l3+(L2-85)/2;}if(L2<15){l3=l3-(15-L2);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('sw3').style.backgroundColor=document.getElementById('sw3').innerHTML=sw3x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw3').style.color="000000";}else{document.getElementById('sw3').style.color="ffffff";}
h3=H2+ZZ;if(h3>360){h3=h3-360;}s3=S2;l3=L2-25;if(l3<15){l3=l3+75;}if(L2>85){l3=l3+(L2-85);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('swb').style.backgroundColor=document.getElementById('swb').innerHTML=swbx=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('swb').style.color="000000";}else{document.getElementById('swb').style.color="ffffff";}
h3=H2+ZZ*2;if(h3>360){h3=h3-360;}s3=S2;l3=L2;swatch();document.getElementById('sw8').style.backgroundColor=document.getElementById('sw8').innerHTML=sw8x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw8').style.color="000000";}else{document.getElementById('sw8').style.color="ffffff";}
h3=H2+ZZ*2;if(h3>360){h3=h3-360;}s3=S2;l3=L2+25;if(l3>90){l3=l3-75;}if(L2>85){l3=l3+(L2-85)/2;}if(L2<15){l3=l3-(15-L2);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('sw4').style.backgroundColor=document.getElementById('sw4').innerHTML=sw4x=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('sw4').style.color="000000";}else{document.getElementById('sw4').style.color="ffffff";}
h3=H2+ZZ*2;if(h3>360){h3=h3-360;}s3=S2;l3=L2-25;if(l3<15){l3=l3+75;}if(L2>85){l3=l3+(L2-85);}if(l3<50&&s3>50){s3=s3-(50-l3);}else if(l3>50&&s3>50){s3=s3-(l3-50);}swatch();document.getElementById('swc').style.backgroundColor=document.getElementById('swc').innerHTML=swcx=hex(rr)+hex(gg)+hex(bb);if(gray>120){document.getElementById('swc').style.color="000000";}else{document.getElementById('swc').style.color="ffffff";}
document.getElementById('red1').innerHTML=Math.round(r);document.getElementById('grn1').innerHTML=Math.round(g);document.getElementById('blu1').innerHTML=Math.round(b);document.getElementById('lum1').innerHTML=Math.round(L2);document.getElementById('sat1').innerHTML=Math.round(S2);document.getElementById('hue1').innerHTML=Math.round(H2);document.getElementById('aaa1').innerHTML=Math.round(laba);document.getElementById('bbb1').innerHTML=Math.round(labb);document.getElementById('zzz1').innerHTML=Math.round((ZZ-5)/.85);
init3();sep();document.getElementById('cyn1').innerHTML=Math.round(c1*10)/10;document.getElementById('mag1').innerHTML=Math.round(c2*10)/10;document.getElementById('yel1').innerHTML=Math.round(c3*10)/10;document.getElementById('blk1').innerHTML=Math.round(c4*10)/10;
temp=dd.elements.cyn;temp.moveTo(temp.defx,temp.defy-c1*1.2);temp=dd.elements.mag;temp.moveTo(temp.defx,temp.defy-c2*1.2);temp=dd.elements.yel;temp.moveTo(temp.defx,temp.defy-c3*1.2);temp=dd.elements.blk;temp.moveTo(temp.defx,temp.defy-c4*1.2);
document.getElementById('pan2').innerHTML="Visual&nbsp;Strength:&nbsp;"+Math.round((r*.11723)+(g*.22997)+(b*.04494))+"%<br>RGB:&nbsp;"+hex(r)+hex(g)+hex(b)+"<br>Total&nbsp;CMYK&nbsp;Ink:&nbsp;"+Math.round(c1+c2+c3+c4)+"%";
 }
function qsep(r,g,b){v1=Math.min(r,Math.min(g,b));v3=Math.max(r,Math.max(g,b));d=v3-v1;
if(r==v3)H=60*(g-b)/d; else if(g==v3)H=120+60*(b-r)/d; else H=240+60*(r-g)/d;
if(H<0)H=H+360; sep(); }
function sep(){cb=(v1+v3)/510;if(v3>0&&v1<255)cs=Math.min(v1/v3,(255-v3)/(255-v1));else cs=1; c5=100;c6=81.395;c7=76.744;
if(H>pure_red&&H<=pure_yel){ch=1-(H-pure_red)/(pure_yel-pure_red); mango();}
if(H>pure_yel&&H<=pure_grn){ch=(H-pure_yel)/(pure_grn-pure_yel); nuclear();}
if(H>pure_grn&&H<=pure_cyn){ch=1-(H-pure_grn)/(pure_cyn-pure_grn); freeze();}
if(H>pure_cyn&&H<=pure_blu){ch=(H-pure_cyn)/(pure_blu-pure_cyn); sky();}
if(H>pure_blu&&H<=pure_mag){ch=1-(H-pure_blu)/(pure_mag-pure_blu); grape();}
if(H>pure_mag||H<=pure_red){ch=H;if(H>pure_mag)ch=H-360;ch=(ch+360-pure_mag)/(360-pure_mag+pure_red); hot();}
if(cb<.085){cmax=1-cb*(1/.085); c1=(.86*c5-c1)*cmax+c1; c2=(.86*c6-c2)*cmax+c2; c3=(.86*c7-c3)*cmax+c3;}
c5=.86*c5*(1-cb); c6=.86*c6*(1-cb); c7=.86*c7*(1-cb);
c1=(c5-c1)*cs+c1; c2=(c6-c2)*cs+c2; c3=(c7-c3)*cs+c3;
 }
function mango(){cmax=(peek_yel-(peek_yel-peek_red)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=0;c2=ch*100*cmax;c3=100*cmax;c4=0;}
else{cmax=1-(cb/cmax);c1=0;c2=ch*100;c3=100;c4=(100*cmax);
	if(cb<.25){cmax=1-cb*(1/.25);c1=(c5*cmax);c2=(c6-ch*100)*cmax+ch*100;}} }
//				c1=(c5*cmax);c2=(c6-ch*100)*cmax+ch*100;

function nuclear(){cmax=(peek_yel-(peek_yel-peek_grn)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=ch*100*cmax;c2=0;c3=100*cmax;c4=0;}
else{cmax=1-(cb/cmax);c1=(c5-ch*100)*cmax+ch*100;c2=(c6*cmax);c3=100;
	if(cmax>.2)c4=Math.pow((cmax*100-20),2.1)/95; else c4=0;
	if(c4>100)c4=100;} }

function freeze(){cmax=(peek_cyn-(peek_cyn-peek_grn)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=100*cmax;c2=0;c3=ch*100*cmax;c4=0;}
else{cmax=1-(cb/cmax);c1=100;c2=(c6*cmax);c3=(c7-ch*100)*cmax+ch*100;
	if(cmax>.2)c4=Math.pow((cmax*100-20),2.1)/95; else c4=0;
	if(c4>100)c4=100;} }

function sky(){cmax=(peek_cyn-(peek_cyn-peek_blu)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=100*cmax;c2=ch*100*cmax;c3=0;c4=0;}
else{cmax=1-(cb/cmax);c1=100;c2=(c6-ch*100)*cmax+ch*100;c3=(c7*cmax);
	if(cmax>.2)c4=Math.pow((cmax*100-20),2.1)/95; else c4=0;
	if(c4>100)c4=100;} }

function grape(){cmax=(peek_mag-(peek_mag-peek_blu)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=ch*100*cmax;c2=100*cmax;c3=0;c4=0;}
else{cmax=1-(cb/cmax);c1=(c5-ch*100)*cmax+ch*100;c2=100;c3=(c7*cmax);
	if(cmax>.2)c4=Math.pow((cmax*100-20),2.1)/95; else c4=0;
	if(c4>100)c4=100;} }

function hot(){cmax=(peek_mag-(peek_mag-peek_red)*ch)/2;
if(cb>=cmax){cmax=(1-cb)/(1-cmax);c1=0;c2=100*cmax;c3=ch*100*cmax;c4=0;}
else{cmax=1-(cb/cmax);c1=(c5*cmax);c2=100;c3=(c7-ch*100)*cmax+ch*100;
	if(cmax>.2)c4=Math.pow((cmax*100-20),2.1)/95; else c4=0;
	if(c4>100)c4=100;} }
