//---------------------------------------------aedips-raphael-----------------------------------------

/*
 * Raphael 0.8.2 - JavaScript Vector Library
 *
 * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
 * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
 */

window.Raphael=(function(){var t=/[, ]+/,F=document,j=window,m={was:"Raphael" in window,is:window.Raphael},E=function(){return J.apply(E,arguments);},B={},Q={cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},T={cx:"number",cy:"number",fill:"colour","fill-opacity":"number","font-size":"number",height:"number",opacity:"number",path:"path",r:"number",rotation:"csv",rx:"number",ry:"number",scale:"csv",stroke:"colour","stroke-opacity":"number","stroke-width":"number",translation:"csv",width:"number",x:"number",y:"number"},U=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup"];E.version="0.8.2";E.type=(window.SVGAngle||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");E.svg=!(E.vml=E.type=="VML");E.idGenerator=0;E.fn={};E.setWindow=function(R){j=R;F=j.document;};E.hsb2rgb=function(AA,y,AE){if(typeof AA=="object"&&"h" in AA&&"s" in AA&&"b" in AA){AE=AA.b;y=AA.s;AA=AA.h;}var v,w,AF;if(AE==0){return{r:0,g:0,b:0,hex:"#000"};}if(AA>1||y>1||AE>1){AA/=255;y/=255;AE/=255;}var x=Math.floor(AA*6),AB=(AA*6)-x,u=AE*(1-y),e=AE*(1-(y*AB)),AG=AE*(1-(y*(1-AB)));v=[AE,e,u,u,AG,AE,AE][x];w=[AG,AE,AE,e,u,u,AG][x];AF=[u,u,AG,AE,AE,e,u][x];v*=255;w*=255;AF*=255;var AC={r:v,g:w,b:AF};var R=Math.round(v).toString(16);if(R.length==1){R="0"+R;}var z=Math.round(w).toString(16);if(z.length==1){z="0"+z;}var AD=Math.round(AF).toString(16);if(AD.length==1){AD="0"+AD;}AC.hex="#"+R+z+AD;return AC;};E.rgb2hsb=function(R,e,y){if(typeof R=="object"&&"r" in R&&"g" in R&&"b" in R){y=R.b;e=R.g;R=R.r;}if(typeof R=="string"){var AA=E.getRGB(R);R=AA.r;e=AA.g;y=AA.b;}if(R>1||e>1||y>1){R/=255;e/=255;y/=255;}var x=Math.max(R,e,y),i=Math.min(R,e,y),v,u,w=x;if(i==x){return{h:0,s:0,b:x};}else{var z=(x-i);u=z/x;if(R==x){v=(e-y)/z;}else{if(e==x){v=2+((y-R)/z);}else{v=4+((R-e)/z);}}v/=6;if(v<0){v+=1;}if(v>1){v-=1;}}return{h:v,s:u,b:w};};var N={},k=[];E.getRGB=function(R){if(R in N){return N[R];}var AA={aliceblue:"#f0f8ff",amethyst:"#96c",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},w;if((R+"").toLowerCase() in AA){R=AA[R.toString().toLowerCase()];}if(!R){return{r:0,g:0,b:0,hex:"#000"};}if(R=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}var i,u,z,x=(R+"").match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i);if(x){if(x[2]){z=parseInt(x[2].substring(5),16);u=parseInt(x[2].substring(3,5),16);i=parseInt(x[2].substring(1,3),16);}if(x[3]){z=parseInt(x[3].substring(3)+x[3].substring(3),16);u=parseInt(x[3].substring(2,3)+x[3].substring(2,3),16);i=parseInt(x[3].substring(1,2)+x[3].substring(1,2),16);}if(x[4]){x=x[4].split(/\s*,\s*/);i=parseFloat(x[0]);u=parseFloat(x[1]);z=parseFloat(x[2]);}if(x[5]){x=x[5].split(/\s*,\s*/);i=parseFloat(x[0])*2.55;u=parseFloat(x[1])*2.55;z=parseFloat(x[2])*2.55;}if(x[6]){x=x[6].split(/\s*,\s*/);i=parseFloat(x[0]);u=parseFloat(x[1]);z=parseFloat(x[2]);return E.hsb2rgb(i,u,z);}if(x[7]){x=x[7].split(/\s*,\s*/);i=parseFloat(x[0])*2.55;u=parseFloat(x[1])*2.55;z=parseFloat(x[2])*2.55;return E.hsb2rgb(i,u,z);}var x={r:i,g:u,b:z};var e=Math.round(i).toString(16);(e.length==1)&&(e="0"+e);var v=Math.round(u).toString(16);(v.length==1)&&(v="0"+v);var y=Math.round(z).toString(16);(y.length==1)&&(y="0"+y);x.hex="#"+e+v+y;w=x;}else{w={r:-1,g:-1,b:-1,hex:"none"};}if(k.length>20){delete N[k.unshift()];}k.push(R);N[R]=w;return w;};E.getColor=function(e){var i=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75},R=this.hsb2rgb(i.h,i.s,i.b);i.h+=0.075;if(i.h>1){i.h=0;i.s-=0.2;if(i.s<=0){this.getColor.start={h:0,s:1,b:i.b};}}return R.hex;};E.getColor.reset=function(){delete this.start;};var W={},D=[];E.parsePathString=function(R){if(R in W){return W[R];}var u={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[],i=function(){var w="";for(var v=0,x=this.length;v<x;v++){w+=this[v][0]+this[v].join(",").substring(2);}return w;};if(R.toString.toString()==i.toString()){e=R;}if(!e.length){R.replace(/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(w,v,z){var y=[],x=v.toLowerCase();z.replace(/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(AB,AA){AA&&y.push(+AA);});while(y.length>=u[x]){e.push([v].concat(y.splice(0,u[x])));if(!u[x]){break;}}});e.toString=i;}if(D.length>20){delete W[D.unshift()];}D.push(R);W[R]=e;return e;};var Y=function(AF){var R=AF;if(typeof AF=="string"){R=E.parsePathString(AF);}R=V(R);var AA=[],z=[],e=0;for(var v=0,AE=R.length;v<AE;v++){var AB=R[v];switch(AB[0]){case"Z":break;case"A":AA.push(AB[AB.length-2]);z.push(AB[AB.length-1]);break;default:for(var u=1,w=AB.length;u<w;u++){(u%2?AA:z).push(AB[u]);}}}var AD=Math.min.apply(Math,AA),AC=Math.min.apply(Math,z);if(!AA.length){return{x:0,y:0,width:0,height:0,X:0,Y:0};}else{return{x:AD,y:AC,width:Math.max.apply(Math,AA)-AD,height:Math.max.apply(Math,z)-AC,X:AA,Y:z};}},C=function(v){var AC=[];if(typeof v=="string"){v=E.parsePathString(v);}var AE=0,AD=0,u=0;if(v[0][0]=="M"){AE=v[0][1];AD=v[0][2];u++;AC.push(["M",AE,AD]);}for(var AA=u,AG=v.length;AA<AG;AA++){var R=AC[AA]=[],AF=v[AA];if(AF[0]!=AF[0].toLowerCase()){R[0]=AF[0].toLowerCase();switch(R[0]){case"a":R[1]=AF[1];R[2]=AF[2];R[3]=0;R[4]=AF[4];R[5]=AF[5];R[6]=+(AF[6]-AE).toFixed(3);R[7]=+(AF[7]-AD).toFixed(3);break;case"v":R[1]=(AF[1]-AD).toFixed(3);break;default:for(var z=1,AB=AF.length;z<AB;z++){R[z]=+(AF[z]-((z%2)?AE:AD)).toFixed(3);}}}else{R=AC[AA]=[];for(var w=0,e=AF.length;w<e;w++){AC[AA][w]=AF[w];}}switch(AC[AA][0]){case"z":break;case"h":AE+=AC[AA][AC[AA].length-1];break;case"v":AD+=AC[AA][AC[AA].length-1];break;default:AE+=AC[AA][AC[AA].length-2];AD+=AC[AA][AC[AA].length-1];}}AC.toString=v.toString;return AC;},V=function(v){var AC=[];if(typeof v=="string"){v=E.parsePathString(v);}var AE=0,AD=0,u=0;if(v[0][0]=="M"){AE=+v[0][1];AD=+v[0][2];u++;AC[0]=["M",AE,AD];}for(var AA=u,AG=v.length;AA<AG;AA++){var R=AC[AA]=[],AF=v[AA];if(AF[0]!=(AF[0]+"").toUpperCase()){R[0]=(AF[0]+"").toUpperCase();switch(R[0]){case"A":R[1]=AF[1];R[2]=AF[2];R[3]=0;R[4]=AF[4];R[5]=AF[5];R[6]=+(AF[6]+AE).toFixed(3);R[7]=+(AF[7]+AD).toFixed(3);break;case"V":R[1]=+AF[1]+AD;break;case"H":R[1]=+AF[1]+AE;break;default:for(var z=1,AB=AF.length;z<AB;z++){R[z]=+AF[z]+((z%2)?AE:AD);}}}else{R=AC[AA]=[];for(var w=0,e=AF.length;w<e;w++){AC[AA][w]=AF[w];}}switch(R[0]){case"Z":break;case"H":AE=R[1];break;case"V":AD=R[1];break;default:AE=AC[AA][AC[AA].length-2];AD=AC[AA][AC[AA].length-1];}}AC.toString=v.toString;return AC;},X={},K=[],b=function(x,w){if((x+w) in X){return X[x+w];}var v=[V(E.parsePathString(x)),V(E.parsePathString(w))],e=[{x:0,y:0,bx:0,by:0,X:0,Y:0},{x:0,y:0,bx:0,by:0,X:0,Y:0}],R=function(z,AA){if(!z){return["U"];}switch(z[0]){case"M":AA.X=z[1];AA.Y=z[2];break;case"S":var i=AA.x+(AA.x-(AA.bx||AA.x));var AB=AA.y+(AA.y-(AA.by||AA.y));z=["C",i,AB,z[1],z[2],z[3],z[4]];break;case"T":var i=AA.x+(AA.x-(AA.bx||AA.x));var AB=AA.y+(AA.y-(AA.by||AA.y));z=["Q",i,AB,z[1],z[2]];break;case"H":z=["L",z[1],AA.y];break;case"V":z=["L",AA.x,z[1]];break;case"Z":z=["L",AA.X,AA.Y];break;}return z;},y=function(AB,AA,AD){if(v[AB][AD][0]=="M"&&v[AA][AD][0]!="M"){v[AA].splice(AD,0,["M",e[AA].x,e[AA].y]);e[AB].bx=v[AB][AD][v[AB][AD].length-4]||0;e[AB].by=v[AB][AD][v[AB][AD].length-3]||0;e[AB].x=v[AB][AD][v[AB][AD].length-2];e[AB].y=v[AB][AD][v[AB][AD].length-1];return true;}else{if(v[AB][AD][0]=="L"&&v[AA][AD][0]=="C"){v[AB][AD]=["C",e[AB].x,e[AB].y,v[AB][AD][1],v[AB][AD][2],v[AB][AD][1],v[AB][AD][2]];}else{if(v[AB][AD][0]=="L"&&v[AA][AD][0]=="Q"){v[AB][AD]=["Q",v[AB][AD][1],v[AB][AD][2],v[AB][AD][1],v[AB][AD][2]];}else{if(v[AB][AD][0]=="Q"&&v[AA][AD][0]=="C"){var z=v[AA][AD][v[AA][AD].length-2];var AF=v[AA][AD][v[AA][AD].length-1];v[AA].splice(AD+1,0,["Q",z,AF,z,AF]);v[AB].splice(AD,0,["C",e[AB].x,e[AB].y,e[AB].x,e[AB].y,e[AB].x,e[AB].y]);AD++;e[AA].bx=v[AA][AD][v[AA][AD].length-4]||0;e[AA].by=v[AA][AD][v[AA][AD].length-3]||0;e[AA].x=v[AA][AD][v[AA][AD].length-2];e[AA].y=v[AA][AD][v[AA][AD].length-1];return true;}else{if(v[AB][AD][0]=="A"&&v[AA][AD][0]=="C"){var z=v[AA][AD][v[AA][AD].length-2];var AF=v[AA][AD][v[AA][AD].length-1];v[AA].splice(AD+1,0,["A",0,0,v[AB][AD][3],v[AB][AD][4],v[AB][AD][5],z,AF]);v[AB].splice(AD,0,["C",e[AB].x,e[AB].y,e[AB].x,e[AB].y,e[AB].x,e[AB].y]);AD++;e[AA].bx=v[AA][AD][v[AA][AD].length-4]||0;e[AA].by=v[AA][AD][v[AA][AD].length-3]||0;e[AA].x=v[AA][AD][v[AA][AD].length-2];e[AA].y=v[AA][AD][v[AA][AD].length-1];return true;}else{if(v[AB][AD][0]=="U"){v[AB][AD][0]=v[AA][AD][0];for(var AC=1,AE=v[AA][AD].length;AC<AE;AC++){v[AB][AD][AC]=(AC%2)?e[AB].x:e[AB].y;}}}}}}}return false;};for(var u=0;u<Math.max(v[0].length,v[1].length);u++){v[0][u]=R(v[0][u],e[0]);v[1][u]=R(v[1][u],e[1]);if(v[0][u][0]!=v[1][u][0]&&(y(0,1,u)||y(1,0,u))){continue;}e[0].bx=v[0][u][v[0][u].length-4]||0;e[0].by=v[0][u][v[0][u].length-3]||0;e[0].x=v[0][u][v[0][u].length-2];e[0].y=v[0][u][v[0][u].length-1];e[1].bx=v[1][u][v[1][u].length-4]||0;e[1].by=v[1][u][v[1][u].length-3]||0;e[1].x=v[1][u][v[1][u].length-2];e[1].y=v[1][u][v[1][u].length-1];}if(K.length>20){delete X[K.unshift()];}K.push(x+w);X[x+w]=v;return v;},M=function(AC){if(typeof AC=="string"){AC=AC.split(/\s*\-\s*/);var u=AC.shift();if(u.toLowerCase()=="v"){u=90;}else{if(u.toLowerCase()=="h"){u=0;}else{u=parseFloat(u);}}u=-u;var AA={angle:u,type:"linear",dots:[],vector:[0,0,Math.cos(u*Math.PI/180).toFixed(3),Math.sin(u*Math.PI/180).toFixed(3)]};var AB=1/(Math.max(Math.abs(AA.vector[2]),Math.abs(AA.vector[3]))||1);AA.vector[2]*=AB;AA.vector[3]*=AB;if(AA.vector[2]<0){AA.vector[0]=-AA.vector[2];AA.vector[2]=0;}if(AA.vector[3]<0){AA.vector[1]=-AA.vector[3];AA.vector[3]=0;}AA.vector[0]=AA.vector[0].toFixed(3);AA.vector[1]=AA.vector[1].toFixed(3);AA.vector[2]=AA.vector[2].toFixed(3);AA.vector[3]=AA.vector[3].toFixed(3);for(var x=0,AD=AC.length;x<AD;x++){var R={};var z=AC[x].match(/^([^:]*):?([\d\.]*)/);R.color=E.getRGB(z[1]).hex;z[2]&&(R.offset=z[2]+"%");AA.dots.push(R);}for(var x=1,AD=AA.dots.length-1;x<AD;x++){if(!AA.dots[x].offset){var e=parseFloat(AA.dots[x-1].offset||0),v=false;for(var w=x+1;w<AD;w++){if(AA.dots[w].offset){v=AA.dots[w].offset;break;}}if(!v){v=100;w=AD;}v=parseFloat(v);var y=(v-e)/(w-x+1);for(;x<w;x++){e+=y;AA.dots[x].offset=e+"%";}}}return AA;}else{return AC;}},d=function(){var i,e,v,u,R;if(typeof arguments[0]=="string"||typeof arguments[0]=="object"){if(typeof arguments[0]=="string"){i=F.getElementById(arguments[0]);}else{i=arguments[0];}if(i.tagName){if(arguments[1]==null){return{container:i,width:i.style.pixelWidth||i.offsetWidth,height:i.style.pixelHeight||i.offsetHeight};}else{return{container:i,width:arguments[1],height:arguments[2]};}}}else{if(typeof arguments[0]=="number"&&arguments.length>3){return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]};}}},A=function(R,i){var e=this;for(var u in i){if(i.hasOwnProperty(u)&&!(u in R)){switch(typeof i[u]){case"function":(function(v){R[u]=R===e?v:function(){return v.apply(e,arguments);};})(i[u]);break;case"object":R[u]=R[u]||{};A.call(this,R[u],i[u]);break;default:R[u]=i[u];break;}}}};if(E.svg){E.toString=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version;};var s=function(u,R,v){var e=F.createElementNS(v.svgns,"path");if(v.canvas){v.canvas.appendChild(e);}var i=new L(e,v);i.isAbsolute=true;i.type="path";i.last={x:0,y:0,bx:0,by:0};i.absolutely=function(){this.isAbsolute=true;return this;};i.relatively=function(){this.isAbsolute=false;return this;};i.moveTo=function(w,AB){var AA=this.isAbsolute?"M":"m";AA+=parseFloat(w).toFixed(3)+" "+parseFloat(AB).toFixed(3)+" ";var z=this[0].getAttribute("d")||"";(z=="M0,0")&&(z="");this[0].setAttribute("d",z+AA);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(w);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AB);this.attrs.path=z+AA;return this;};i.lineTo=function(w,AB){this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(w);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AB);var AA=this.isAbsolute?"L":"l";AA+=parseFloat(w).toFixed(3)+" "+parseFloat(AB).toFixed(3)+" ";var z=this[0].getAttribute("d")||"";this[0].setAttribute("d",z+AA);this.attrs.path=z+AA;return this;};i.arcTo=function(AD,AC,z,AB,w,AF){var AE=this.isAbsolute?"A":"a";AE+=[parseFloat(AD).toFixed(3),parseFloat(AC).toFixed(3),0,z,AB,parseFloat(w).toFixed(3),parseFloat(AF).toFixed(3)].join(" ");var AA=this[0].getAttribute("d")||"";this[0].setAttribute("d",AA+AE);this.last.x=parseFloat(w);this.last.y=parseFloat(AF);this.attrs.path=AA+AE;return this;};i.cplineTo=function(AA,AH,AC){if(!AC){return this.lineTo(AA,AH);}else{var z={};var AI=parseFloat(AA);var AF=parseFloat(AH);var AJ=parseFloat(AC);var AE=this.isAbsolute?"C":"c";var AD=[+this.last.x+AJ,+this.last.y,AI-AJ,AF,AI,AF];for(var AB=0,AK=AD.length;AB<AK;AB++){AE+=AD[AB].toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+AD[4];this.last.y=(this.isAbsolute?0:this.last.y)+AD[5];this.last.bx=AD[2];this.last.by=AD[3];var AG=this[0].getAttribute("d")||"";this[0].setAttribute("d",AG+AE);this.attrs.path=AG+AE;return this;}};i.curveTo=function(){var z={},AB=[0,1,2,3,"s",5,"c"];var AA=AB[arguments.length];if(this.isAbsolute){AA=AA.toUpperCase();}for(var x=0,y=arguments.length;x<y;x++){AA+=parseFloat(arguments[x]).toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1]);this.last.bx=parseFloat(arguments[arguments.length-4]);this.last.by=parseFloat(arguments[arguments.length-3]);var w=this.node.getAttribute("d")||"";this.node.setAttribute("d",w+AA);this.attrs.path=w+AA;return this;};i.qcurveTo=function(){var z={},AB=[0,1,"t",3,"q"];var AA=AB[arguments.length];if(this.isAbsolute){AA=AA.toUpperCase();}for(var x=0,y=arguments.length;x<y;x++){AA+=parseFloat(arguments[x]).toFixed(3)+" ";}this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[arguments.length-2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[arguments.length-1]);if(arguments.length!=2){this.last.qx=parseFloat(arguments[arguments.length-4]);this.last.qy=parseFloat(arguments[arguments.length-3]);}var w=this.node.getAttribute("d")||"";this.node.setAttribute("d",w+AA);this.attrs.path=w+AA;return this;};i.addRoundedCorner=function(z,x){var y=0.5522*z,w=this.isAbsolute,AB=this;if(w){this.relatively();w=function(){AB.absolutely();};}else{w=function(){};}var AA={l:function(){return{u:function(){AB.curveTo(-y,0,-z,-(z-y),-z,-z);},d:function(){AB.curveTo(-y,0,-z,z-y,-z,z);}};},r:function(){return{u:function(){AB.curveTo(y,0,z,-(z-y),z,-z);},d:function(){AB.curveTo(y,0,z,z-y,z,z);}};},u:function(){return{r:function(){AB.curveTo(0,-y,-(y-z),-z,z,-z);},l:function(){AB.curveTo(0,-y,y-z,-z,-z,-z);}};},d:function(){return{r:function(){AB.curveTo(0,y,-(y-z),z,z,z);},l:function(){AB.curveTo(0,y,y-z,z,-z,z);}};}};AA[x[0]]()[x[1]]();w();return AB;};i.andClose=function(){var w=this[0].getAttribute("d")||"";this[0].setAttribute("d",w+"Z ");this.attrs.path=w+"Z ";return this;};if(R){i.attrs.path=""+R;i.absolutely();B.pathfinder(i,i.attrs.path);}if(u){!u.gradient&&(u.fill=u.fill||"none");u.stroke=u.stroke||"#000";}else{u={fill:"none",stroke:"#000"};}c(i,u);return i;};var l=function(y,w,z){w=M(w);var v=F.createElementNS(z.svgns,(w.type||"linear")+"Gradient");v.id="raphael-gradient-"+E.idGenerator++;if(w.vector&&w.vector.length){v.setAttribute("x1",w.vector[0]);v.setAttribute("y1",w.vector[1]);v.setAttribute("x2",w.vector[2]);v.setAttribute("y2",w.vector[3]);}z.defs.appendChild(v);var x=true;for(var e=0,u=w.dots.length;e<u;e++){var R=F.createElementNS(z.svgns,"stop");if(w.dots[e].offset){x=false;}R.setAttribute("offset",w.dots[e].offset?w.dots[e].offset:(e==0)?"0%":"100%");R.setAttribute("stop-color",E.getRGB(w.dots[e].color).hex||"#fff");v.appendChild(R);}if(x&&typeof w.dots[u-1].opacity!="undefined"){R.setAttribute("stop-opacity",w.dots[u-1].opacity);}y.setAttribute("fill","url(#"+v.id+")");y.style.fill="";y.style.opacity=1;y.style.fillOpacity=1;y.setAttribute("opacity",1);y.setAttribute("fill-opacity",1);};var S=function(e){if(e.pattern){var R=e.getBBox();e.pattern.setAttribute("patternTransform","translate(".concat(R.x,",",R.y,")"));}};var c=function(i,w){var AB={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},u=i.node,AE=i.attrs;addDashes=function(AO,AN){AN=AB[AN.toString().toLowerCase()];if(AN){var AL=AO.attrs["stroke-width"]||"1",AI={round:AL,square:AL,butt:0}[AO.attrs["stroke-linecap"]||w["stroke-linecap"]]||0,AM=[];for(var AJ=0,AK=AN.length;AJ<AK;AJ++){AM.push(AN[AJ]*AL+((AJ%2)?1:-1)*AI);}AN=AM.join(",");u.setAttribute("stroke-dasharray",AN);}};for(var z in w){if(!(z in Q)){continue;}var AD=w[z];AE[z]=AD;switch(z){case"href":case"title":case"target":var v=u.parentNode;if(v.tagName.toLowerCase()!="a"){var R=F.createElementNS(i.paper.svgns,"a");v.insertBefore(R,u);R.appendChild(u);v=R;}v.setAttributeNS(i.paper.xlink,z,AD);break;case"path":if(i.type=="path"){u.setAttribute("d","M0,0");B.pathfinder(i,AD);}case"width":u.setAttribute(z,AD);if(AE.fx){z="x";AD=AE.x;}else{break;}case"x":if(AE.fx){AD=-AE.x-(AE.width||0);}case"rx":case"cx":u.setAttribute(z,AD);S(i);break;case"height":u.setAttribute(z,AD);if(AE.fy){z="y";AD=AE.y;}else{break;}case"y":if(AE.fy){AD=-AE.y-(AE.height||0);}case"ry":case"cy":u.setAttribute(z,AD);S(i);break;case"r":if(i.type=="rect"){u.setAttribute("rx",AD);u.setAttribute("ry",AD);}else{u.setAttribute(z,AD);}break;case"src":if(i.type=="image"){u.setAttributeNS(i.paper.xlink,"href",AD);}break;case"stroke-width":u.style.strokeWidth=AD;u.setAttribute(z,AD);if(AE["stroke-dasharray"]){addDashes(i,AE["stroke-dasharray"]);}break;case"stroke-dasharray":addDashes(i,AD);break;case"rotation":i.rotate(AD,true);break;case"translation":var AH=(AD+"").split(t);i.translate((+AH[0]+1||2)-1,(+AH[1]+1||2)-1);break;case"scale":var AH=(AD+"").split(t);i.scale(+AH[0]||1,+AH[1]||+AH[0]||1,+AH[2]||null,+AH[3]||null);break;case"fill":var y=(AD+"").match(/^url\(([^\)]+)\)$/i);if(y){var e=F.createElementNS(i.paper.svgns,"pattern");var AG=F.createElementNS(i.paper.svgns,"image");e.id="raphael-pattern-"+E.idGenerator++;e.setAttribute("x",0);e.setAttribute("y",0);e.setAttribute("patternUnits","userSpaceOnUse");AG.setAttribute("x",0);AG.setAttribute("y",0);AG.setAttributeNS(i.paper.xlink,"href",y[1]);e.appendChild(AG);var x=F.createElement("img");x.style.position="absolute";x.style.top="-9999em";x.style.left="-9999em";x.onload=function(){e.setAttribute("width",this.offsetWidth);e.setAttribute("height",this.offsetHeight);AG.setAttribute("width",this.offsetWidth);AG.setAttribute("height",this.offsetHeight);F.body.removeChild(this);B.safari();};F.body.appendChild(x);x.src=y[1];i.paper.defs.appendChild(e);u.style.fill="url(#"+e.id+")";u.setAttribute("fill","url(#"+e.id+")");i.pattern=e;S(i);break;}delete w.gradient;delete AE.gradient;if(typeof AE.opacity!="undefined"&&typeof w.opacity=="undefined"){u.style.opacity=AE.opacity;u.setAttribute("opacity",AE.opacity);}if(typeof AE["fill-opacity"]!="undefined"&&typeof w["fill-opacity"]=="undefined"){u.style.fillOpacity=i.attrs["fill-opacity"];u.setAttribute("fill-opacity",AE["fill-opacity"]);}case"stroke":u.style[z]=E.getRGB(AD).hex;u.setAttribute(z,E.getRGB(AD).hex);break;case"gradient":l(u,AD,i.paper);break;case"opacity":case"fill-opacity":if(AE.gradient){var AC=F.getElementById(u.getAttribute("fill").replace(/^url\(#|\)$/g,""));if(AC){var AF=AC.getElementsByTagName("stop");AF[AF.length-1].setAttribute("stop-opacity",AD);}break;}default:var AA=z.replace(/(\-.)/g,function(AI){return AI.substring(1).toUpperCase();});u.style[AA]=AD;u.setAttribute(z,AD);break;}}p(i,w);};var h=1.2;var p=function(R,v){if(R.type!="text"||!("text" in v||"font" in v||"font-size" in v||"x" in v||"y" in v)){return ;}var AA=R.attrs,e=R.node,AC=e.firstChild?parseInt(F.defaultView.getComputedStyle(e.firstChild,"").getPropertyValue("font-size"),10):10;if("text" in v){while(e.firstChild){e.removeChild(e.firstChild);}var u=(v.text+"").split("\n");for(var w=0,AB=u.length;w<AB;w++){var y=F.createElementNS(R.paper.svgns,"tspan");w&&y.setAttribute("dy",AC*h);w&&y.setAttribute("x",AA.x);y.appendChild(F.createTextNode(u[w]));e.appendChild(y);}}else{var u=e.getElementsByTagName("tspan");for(var w=0,AB=u.length;w<AB;w++){w&&u[w].setAttribute("dy",AC*h);w&&u[w].setAttribute("x",AA.x);}}e.setAttribute("y",AA.y);var x=R.getBBox(),z=AA.y-(x.y+x.height/2);z&&e.setAttribute("y",AA.y+z);};var L=function(e,R){var u=0,i=0;this[0]=e;this.node=e;this.paper=R;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,x:0,y:0},sx:1,sy:1};};L.prototype.rotate=function(e,R,u){if(e==null){return this._.rt.deg;}var i=this.getBBox();e=e.toString().split(t);if(e.length-1){R=parseFloat(e[1]);u=parseFloat(e[2]);}e=parseFloat(e[0]);if(R!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}if(u==null){R=null;}R=R==null?i.x+i.width/2:R;u=u==null?i.y+i.height/2:u;if(this._.rt.deg){this.transformations[0]=("rotate("+this._.rt.deg+" "+R+" "+u+")");}else{this.transformations[0]="";}this.node.setAttribute("transform",this.transformations.join(" "));return this;};L.prototype.hide=function(){this.node.style.display="none";return this;};L.prototype.show=function(){this.node.style.display="block";return this;};L.prototype.remove=function(){this.node.parentNode.removeChild(this.node);};L.prototype.getBBox=function(){var v=this.node.getBBox();if(this.type=="text"){v={x:v.x,y:Infinity,width:v.width,height:0};for(var R=0,e=this.node.getNumberOfChars();R<e;R++){var u=this.node.getExtentOfChar(R);(u.y<v.y)&&(v.y=u.y);(u.y+u.height-v.y>v.height)&&(v.height=u.y+u.height-v.y);}}return v;};L.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate();}return this.attrs[arguments[0]];}if(arguments.length==1&&arguments[0] instanceof j.Array){var R={};for(var e in arguments[0]){R[arguments[0][e]]=this.attrs[arguments[0][e]];}return R;}if(arguments.length==2){var i={};i[arguments[0]]=arguments[1];c(this,i);}else{if(arguments.length==1&&typeof arguments[0]=="object"){c(this,arguments[0]);}}return this;};L.prototype.toFront=function(){this.node.parentNode.appendChild(this.node);return this;};L.prototype.toBack=function(){if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);}return this;};L.prototype.insertAfter=function(R){if(R.node.nextSibling){R.node.parentNode.insertBefore(this.node,R.node.nextSibling);}else{R.node.parentNode.appendChild(this.node);}return this;};L.prototype.insertBefore=function(R){R.node.parentNode.insertBefore(this.node,R.node);return this;};var Z=function(e,R,w,v){var u=F.createElementNS(e.svgns,"circle");u.setAttribute("cx",R);u.setAttribute("cy",w);u.setAttribute("r",v);u.setAttribute("fill","none");u.setAttribute("stroke","#000");if(e.canvas){e.canvas.appendChild(u);}var i=new L(u,e);i.attrs=i.attrs||{};i.attrs.cx=R;i.attrs.cy=w;i.attrs.r=v;i.attrs.stroke="#000";i.type="circle";return i;};var g=function(i,R,AB,e,z,AA){var v=F.createElementNS(i.svgns,"rect");v.setAttribute("x",R);v.setAttribute("y",AB);v.setAttribute("width",e);v.setAttribute("height",z);if(AA){v.setAttribute("rx",AA);v.setAttribute("ry",AA);}v.setAttribute("fill","none");v.setAttribute("stroke","#000");if(i.canvas){i.canvas.appendChild(v);}var u=new L(v,i);u.attrs=u.attrs||{};u.attrs.x=R;u.attrs.y=AB;u.attrs.width=e;u.attrs.height=z;u.attrs.stroke="#000";if(AA){u.attrs.rx=u.attrs.ry=AA;}u.type="rect";return u;};var G=function(e,R,z,w,v){var u=F.createElementNS(e.svgns,"ellipse");u.setAttribute("cx",R);u.setAttribute("cy",z);u.setAttribute("rx",w);u.setAttribute("ry",v);u.setAttribute("fill","none");u.setAttribute("stroke","#000");if(e.canvas){e.canvas.appendChild(u);}var i=new L(u,e);i.attrs=i.attrs||{};i.attrs.cx=R;i.attrs.cy=z;i.attrs.rx=w;i.attrs.ry=v;i.attrs.stroke="#000";i.type="ellipse";return i;};var P=function(i,AA,R,AB,e,z){var v=F.createElementNS(i.svgns,"image");v.setAttribute("x",R);v.setAttribute("y",AB);v.setAttribute("width",e);v.setAttribute("height",z);v.setAttribute("preserveAspectRatio","none");v.setAttributeNS(i.xlink,"href",AA);if(i.canvas){i.canvas.appendChild(v);}var u=new L(v,i);u.attrs=u.attrs||{};u.attrs.x=R;u.attrs.y=AB;u.attrs.width=e;u.attrs.height=z;u.type="image";return u;};var f=function(e,R,w,v){var u=F.createElementNS(e.svgns,"text");u.setAttribute("x",R);u.setAttribute("y",w);u.setAttribute("text-anchor","middle");if(e.canvas){e.canvas.appendChild(u);}var i=new L(u,e);i.attrs=i.attrs||{};i.attrs.x=R;i.attrs.y=w;i.type="text";c(i,{font:Q.font,stroke:"none",fill:"#000",text:v});return i;};var a=function(e,R){this.width=e||this.width;this.height=R||this.height;this.canvas.setAttribute("width",this.width);this.canvas.setAttribute("height",this.height);return this;};var J=function(){var u=d.apply(null,arguments);var i=u.container,e=u.x,z=u.y,v=u.width,R=u.height;if(!i){throw new Error("SVG container not found.");}B.canvas=F.createElementNS(B.svgns,"svg");B.canvas.setAttribute("width",v||512);B.width=v||512;B.canvas.setAttribute("height",R||342);B.height=R||342;if(i==1){F.body.appendChild(B.canvas);B.canvas.style.position="absolute";B.canvas.style.left=e+"px";B.canvas.style.top=z+"px";}else{if(i.firstChild){i.insertBefore(B.canvas,i.firstChild);}else{i.appendChild(B.canvas);}}i={canvas:B.canvas,clear:function(){while(this.canvas.firstChild){this.canvas.removeChild(this.canvas.firstChild);}this.defs=F.createElementNS(B.svgns,"defs");this.canvas.appendChild(this.defs);}};for(var w in B){if(w!="create"){i[w]=B[w];}}A.call(i,i,E.fn);i.clear();i.raphael=E;return i;};B.remove=function(){this.canvas.parentNode.removeChild(this.canvas);};B.svgns="http://www.w3.org/2000/svg";B.xlink="http://www.w3.org/1999/xlink";B.safari=function(){if({"Apple Computer, Inc.":1,"Google Inc.":1}[navigator.vendor]){var R=this.rect(-this.width,-this.height,this.width*3,this.height*3).attr({stroke:"none"});setTimeout(function(){R.remove();});}};}if(E.vml){E.toString=function(){return"Your browser doesn\u2019t support SVG.\nYou are running Rapha\u00ebl "+this.version;};s=function(y,R,w){var u=r("group"),x=u.style;x.position="absolute";x.left=0;x.top=0;x.width=w.width+"px";x.height=w.height+"px";var i=r("shape"),e=i.style;e.width=w.width+"px";e.height=w.height+"px";i.path="";if(y["class"]){i.className="rvml "+y["class"];}i.coordsize=this.coordsize;i.coordorigin=this.coordorigin;u.appendChild(i);var v=new L(i,u,w);v.isAbsolute=true;v.type="path";v.path=[];v.last={x:0,y:0,bx:0,by:0,isAbsolute:true};v.Path="";v.absolutely=function(){this.isAbsolute=true;return this;};v.relatively=function(){this.isAbsolute=false;return this;};v.moveTo=function(z,AB){var AA=this.isAbsolute?"m":"t";AA+=Math.round(parseFloat(z))+" "+Math.round(parseFloat(AB));this.node.path=this.Path+=AA;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(z);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AB);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"M":"m")+[z,AB];return this;};v.lineTo=function(z,AB){var AA=this.isAbsolute?"l":"r";AA+=Math.round(parseFloat(z))+" "+Math.round(parseFloat(AB));this[0].path=this.Path+=AA;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(z);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AB);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"L":"l")+[z,AB];return this;};v.arcTo=function(AB,z,AI,AC,AA,AM){AA=(this.isAbsolute?0:this.last.x)+AA;AM=(this.isAbsolute?0:this.last.y)+AM;var AD=this.last.x,AO=this.last.y,AN=(AD-AA)/2,AL=(AO-AM)/2,AH=(AI==AC?-1:1)*Math.sqrt(Math.abs(AB*AB*z*z-AB*AB*AL*AL-z*z*AN*AN)/(AB*AB*AL*AL+z*z*AN*AN)),AG=AH*AB*AL/z+(AD+AA)/2,AF=AH*-z*AN/AB+(AO+AM)/2,AJ=AC?(this.isAbsolute?"wa":"wr"):(this.isAbsolute?"at":"ar"),AE=Math.round(AG-AB),AK=Math.round(AF-z);AJ+=[AE,AK,Math.round(AE+AB*2),Math.round(AK+z*2),Math.round(AD),Math.round(AO),Math.round(parseFloat(AA)),Math.round(parseFloat(AM))].join(", ");this.node.path=this.Path+=AJ;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(AA);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(AM);this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"A":"a")+[AB,z,0,AI,AC,AA,AM];return this;};v.cplineTo=function(z,AF,AB){if(!AB){return this.lineTo(z,AF);}else{var AG=Math.round(Math.round(parseFloat(z)*100)/100),AE=Math.round(Math.round(parseFloat(AF)*100)/100),AH=Math.round(Math.round(parseFloat(AB)*100)/100),AD=this.isAbsolute?"c":"v",AC=[Math.round(this.last.x)+AH,Math.round(this.last.y),AG-AH,AE,AG,AE],AA=[this.last.x+AB,this.last.y,z-AB,AF,z,AF];AD+=AC.join(" ")+" ";this.last.x=(this.isAbsolute?0:this.last.x)+AC[4];this.last.y=(this.isAbsolute?0:this.last.y)+AC[5];this.last.bx=AC[2];this.last.by=AC[3];this.node.path=this.Path+=AD;this.attrs.path+=(this.isAbsolute?"C":"c")+AA;return this;}};v.curveTo=function(){var AB=this.isAbsolute?"c":"v";if(arguments.length==6){this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[4]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[5]);AB+=[Math.round(parseFloat(arguments[0])),Math.round(parseFloat(arguments[1])),Math.round(parseFloat(arguments[2])),Math.round(parseFloat(arguments[3])),Math.round(parseFloat(arguments[4])),Math.round(parseFloat(arguments[5]))].join(" ")+" ";this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"C":"c")+Array.prototype.splice.call(arguments,0,arguments.length);}if(arguments.length==4){var AA=this.last.x*2-this.last.bx;var z=this.last.y*2-this.last.by;this.last.bx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[0]);this.last.by=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[1]);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);AB+=[Math.round(AA),Math.round(z),Math.round(parseFloat(arguments[0])),Math.round(parseFloat(arguments[1])),Math.round(parseFloat(arguments[2])),Math.round(parseFloat(arguments[3]))].join(" ")+" ";this.attrs.path+=(this.isAbsolute?"S":"s")+Array.prototype.splice.call(arguments,0,arguments.length);}this.node.path=this.Path+=AB;return this;};v.qcurveTo=function(){var z="qb";if(arguments.length==4){this.last.qx=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[0]);this.last.qy=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[1]);this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);z+=[Math.round(this.last.qx),Math.round(this.last.qy),Math.round(this.last.x),Math.round(this.last.y)].join(" ")+" ";this.last.isAbsolute=this.isAbsolute;this.attrs.path+=(this.isAbsolute?"Q":"q")+Array.prototype.splice.call(arguments,0,arguments.length);}if(arguments.length==2){this.last.qx=this.last.x*2-this.last.qx;this.last.qy=this.last.y*2-this.last.qy;this.last.x=(this.isAbsolute?0:this.last.x)+parseFloat(arguments[2]);this.last.y=(this.isAbsolute?0:this.last.y)+parseFloat(arguments[3]);z+=[Math.round(this.last.qx),Math.round(this.last.qy),Math.round(this.last.x),Math.round(this.last.y)].join(" ")+" ";this.attrs.path+=(this.isAbsolute?"T":"t")+Array.prototype.splice.call(arguments,0,arguments.length);}this.node.path=this.Path+=z;this.path.push({type:"qcurve",arg:[].slice.call(arguments,0),pos:this.isAbsolute});return this;};v.addRoundedCorner=function(AC,AA){var AB=0.5522*AC,z=this.isAbsolute,AE=this;if(z){this.relatively();z=function(){AE.absolutely();};}else{z=function(){};}var AD={l:function(){return{u:function(){AE.curveTo(-AB,0,-AC,-(AC-AB),-AC,-AC);},d:function(){AE.curveTo(-AB,0,-AC,AC-AB,-AC,AC);}};},r:function(){return{u:function(){AE.curveTo(AB,0,AC,-(AC-AB),AC,-AC);},d:function(){AE.curveTo(AB,0,AC,AC-AB,AC,AC);}};},u:function(){return{r:function(){AE.curveTo(0,-AB,-(AB-AC),-AC,AC,-AC);},l:function(){AE.curveTo(0,-AB,AB-AC,-AC,-AC,-AC);}};},d:function(){return{r:function(){AE.curveTo(0,AB,-(AB-AC),AC,AC,AC);},l:function(){AE.curveTo(0,AB,AB-AC,AC,-AC,AC);}};}};AD[AA.charAt(0)]()[AA.charAt(1)]();z();return AE;};v.andClose=function(){this.node.path=(this.Path+="x");this.attrs.path+="z";return this;};if(R){v.absolutely();v.attrs.path="";B.pathfinder(v,""+R);}if(y){y.fill=y.fill||"none";y.stroke=y.stroke||"#000";}else{y={fill:"none",stroke:"#000"};}c(v,y);if(y.gradient){l(v,y.gradient);}w.canvas.appendChild(u);return v;};var c=function(R,i){var e=R.node,AD=e.style,w=R;R.attrs=R.attrs||{};for(var v in i){R.attrs[v]=i[v];}i.href&&(e.href=i.href);i.title&&(e.title=i.title);i.target&&(e.target=i.target);if(i.path&&R.type=="path"){R.Path="";R.path=[];B.pathfinder(R,i.path);}if(i.rotation!=null){R.rotate(i.rotation,true);}if(i.translation){var AC=(i.translation+"").split(t);R.translate(AC[0],AC[1]);}if(i.scale){var AC=(i.scale+"").split(t);R.scale(+AC[0]||1,+AC[1]||+AC[0]||1,+AC[2]||null,+AC[3]||null);}if(R.type=="image"&&i.src){e.src=i.src;}if(R.type=="image"&&i.opacity){e.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(i.opacity*100)+")";e.style.filter=(e.filterMatrix||"")+(e.filterOpacity||"");}i.font&&(AD.font=i.font);i["font-family"]&&(AD.fontFamily=i["font-family"]);i["font-size"]&&(AD.fontSize=i["font-size"]);i["font-weight"]&&(AD.fontWeight=i["font-weight"]);i["font-style"]&&(AD.fontStyle=i["font-style"]);if(typeof i.opacity!="undefined"||typeof i["stroke-width"]!="undefined"||typeof i.fill!="undefined"||typeof i.stroke!="undefined"||i["stroke-width"]||i["stroke-opacity"]||i["fill-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"]){R=R.shape||e;var AB=(R.getElementsByTagName("fill")&&R.getElementsByTagName("fill")[0])||r("fill");if("fill-opacity" in i||"opacity" in i){AB.opacity=((+i["fill-opacity"]+1||2)-1)*((+i.opacity+1||2)-1);}i.fill&&(AB.on=true);if(typeof AB.on=="undefined"||i.fill=="none"){AB.on=false;}if(AB.on&&i.fill){var u=i.fill.match(/^url\(([^\)]+)\)$/i);if(u){AB.src=u[1];AB.type="tile";}else{AB.color=E.getRGB(i.fill).hex;AB.src="";AB.type="solid";}}R.appendChild(AB);var AA=(R.getElementsByTagName("stroke")&&R.getElementsByTagName("stroke")[0])||r("stroke");if((i.stroke&&i.stroke!="none")||i["stroke-width"]||typeof i["stroke-opacity"]!="undefined"||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"]){AA.on=true;}if(i.stroke=="none"||typeof AA.on=="undefined"||i.stroke==0){AA.on=false;}if(AA.on&&i.stroke){AA.color=E.getRGB(i.stroke).hex;}AA.opacity=((+i["stroke-opacity"]+1||2)-1)*((+i.opacity+1||2)-1);i["stroke-linejoin"]&&(AA.joinstyle=i["stroke-linejoin"]||"miter");AA.miterlimit=i["stroke-miterlimit"]||8;i["stroke-linecap"]&&(AA.endcap={butt:"flat",square:"square",round:"round"}[i["stroke-linecap"]]||"miter");i["stroke-width"]&&(AA.weight=(parseFloat(i["stroke-width"])||1)*12/16);if(i["stroke-dasharray"]){var x={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};AA.dashstyle=x[i["stroke-dasharray"]]||"";}R.appendChild(AA);}if(w.type=="text"){var z=F.createElement("span"),AD=z.style,y=w.attrs;AD.padding=0;AD.margin=0;AD.lineHeight=1;AD.display="inline";y.font&&(AD.font=y.font);y["font-family"]&&(AD.fontFamily=y["font-family"]);y["font-size"]&&(AD.fontSize=y["font-size"]);y["font-weight"]&&(AD.fontWeight=y["font-weight"]);y["font-style"]&&(AD.fontStyle=y["font-style"]);w.node.parentNode.appendChild(z);z.innerText=w.node.string;w.W=y.w=z.offsetWidth;w.H=y.h=z.offsetHeight;w.X=y.x;w.Y=y.y+Math.round(w.H/2);w.node.parentNode.removeChild(z);switch(y["text-anchor"]){case"start":w.node.style["v-text-align"]="left";w.bbx=Math.round(w.W/2);break;case"end":w.node.style["v-text-align"]="right";w.bbx=-Math.round(w.W/2);break;default:w.node.style["v-text-align"]="center";break;}}};var O=function(e,R,v,u){var i=Math.round(Math.atan((parseFloat(v)-parseFloat(e))/(parseFloat(u)-parseFloat(R)))*57.29)||0;if(!i&&parseFloat(e)<parseFloat(R)){i=180;}i-=180;if(i<0){i+=360;}return i;};var l=function(y,x){x=M(x);y.attrs=y.attrs||{};var e=y.attrs;y.attrs.gradient=x;y=y.shape||y[0];var w=y.getElementsByTagName("fill");if(w.length){w=w[0];}else{w=r("fill");}if(x.dots.length){w.on=true;w.method="none";w.type=((x.type+"").toLowerCase()=="radial")?"gradientTitle":"gradient";if(typeof x.dots[0].color!="undefined"){w.color=E.getRGB(x.dots[0].color).hex;}if(typeof x.dots[x.dots.length-1].color!="undefined"){w.color2=E.getRGB(x.dots[x.dots.length-1].color).hex;}var z=[];for(var u=0,v=x.dots.length;u<v;u++){if(x.dots[u].offset){z.push(x.dots[u].offset+" "+E.getRGB(x.dots[u].color).hex);}}var R=typeof x.dots[x.dots.length-1].opacity=="undefined"?(typeof e.opacity=="undefined"?1:e.opacity):x.dots[x.dots.length-1].opacity;if(z.length){w.colors.value=z.join(",");R=typeof e.opacity=="undefined"?1:e.opacity;}else{w.colors&&(w.colors.value="0% "+w.color);}w.opacity=R;if(typeof x.angle!="undefined"){w.angle=(-x.angle+270)%360;}else{if(x.vector){w.angle=O.apply(null,x.vector);}}if((x.type+"").toLowerCase()=="radial"){w.focus="100%";w.focusposition="0.5 0.5";}}};var L=function(v,x,R){var w=0,i=0,e=0,u=1;this[0]=v;this.node=v;this.X=0;this.Y=0;this.attrs={};this.Group=x;this.paper=R;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};};L.prototype.rotate=function(e,R,i){if(e==null){return this._.rt.deg;}e=e.toString().split(t);if(e.length-1){R=parseFloat(e[1]);i=parseFloat(e[2]);}e=parseFloat(e[0]);if(R!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}if(i==null){R=null;}this._.rt.cx=R;this._.rt.cy=i;this.setBox(null,R,i);this.Group.style.rotation=this._.rt.deg;return this;};L.prototype.setBox=function(z,AA,v){var e=this.Group.style,AB=(this.shape&&this.shape.style)||this.node.style;z=z||{};for(var AC in z){this.attrs[AC]=z[AC];}AA=AA||this._.rt.cx;v=v||this._.rt.cy;var AF=this.attrs,AI,AH,AJ,AE;switch(this.type){case"circle":AI=AF.cx-AF.r;AH=AF.cy-AF.r;AJ=AE=AF.r*2;break;case"ellipse":AI=AF.cx-AF.rx;AH=AF.cy-AF.ry;AJ=AF.rx*2;AE=AF.ry*2;break;case"rect":case"image":AI=AF.x;AH=AF.y;AJ=AF.width||0;AE=AF.height||0;break;case"text":this.textpath.v=["m",Math.round(AF.x),", ",Math.round(AF.y-2),"l",Math.round(AF.x)+1,", ",Math.round(AF.y-2)].join("");AI=AF.x-Math.round(this.W/2);AH=AF.y-this.H/2;AJ=this.W;AE=this.H;break;case"path":if(!this.attrs.path){AI=0;AH=0;AJ=this.paper.width;AE=this.paper.height;}else{var AD=Y(this.attrs.path),AI=AD.x;AH=AD.y;AJ=AD.width;AE=AD.height;}break;default:AI=0;AH=0;AJ=this.paper.width;AE=this.paper.height;break;}AA=(AA==null)?AI+AJ/2:AA;v=(v==null)?AH+AE/2:v;var u=AA-this.paper.width/2,AG=v-this.paper.height/2;if(this.type=="path"||this.type=="text"){(e.left!=u+"px")&&(e.left=u+"px");(e.top!=AG+"px")&&(e.top=AG+"px");this.X=this.type=="text"?AI:-u;this.Y=this.type=="text"?AH:-AG;this.W=AJ;this.H=AE;(AB.left!=-u+"px")&&(AB.left=-u+"px");(AB.top!=-AG+"px")&&(AB.top=-AG+"px");}else{(e.left!=u+"px")&&(e.left=u+"px");(e.top!=AG+"px")&&(e.top=AG+"px");this.X=AI;this.Y=AH;this.W=AJ;this.H=AE;(e.width!=this.paper.width+"px")&&(e.width=this.paper.width+"px");(e.height!=this.paper.height+"px")&&(e.height=this.paper.height+"px");(AB.left!=AI-u+"px")&&(AB.left=AI-u+"px");(AB.top!=AH-AG+"px")&&(AB.top=AH-AG+"px");(AB.width!=AJ+"px")&&(AB.width=AJ+"px");(AB.height!=AE+"px")&&(AB.height=AE+"px");var AK=(+z.r||0)/(Math.min(AJ,AE));if(this.type=="rect"&&this.arcsize!=AK&&(AK||this.arcsize)){var R=r(AK?"roundrect":"rect");R.arcsize=AK;this.Group.appendChild(R);this.node.parentNode.removeChild(this.node);this.node=R;this.arcsize=AK;c(this,this.attrs);this.setBox(this.attrs);}}};L.prototype.hide=function(){this.Group.style.display="none";return this;};L.prototype.show=function(){this.Group.style.display="block";return this;};L.prototype.getBBox=function(){if(this.type=="path"){return Y(this.attr("path"));}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};L.prototype.remove=function(){this[0].parentNode.removeChild(this[0]);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);};L.prototype.attr=function(){if(arguments.length==1&&typeof arguments[0]=="string"){if(arguments[0]=="translation"){return this.translate();}return this.attrs[arguments[0]];}if(this.attrs&&arguments.length==1&&arguments[0] instanceof j.Array){var R={};for(var e=0,u=arguments[0].length;e<u;e++){R[arguments[0][e]]=this.attrs[arguments[0][e]];}return R;}var v;if(arguments.length==2){v={};v[arguments[0]]=arguments[1];}if(arguments.length==1&&typeof arguments[0]=="object"){v=arguments[0];}if(v){if(v.gradient){l(this,v.gradient);}if(v.text&&this.type=="text"){this.node.string=v.text;}if(v.id){this.node.id=v.id;}c(this,v);this.setBox(v);}return this;};L.prototype.toFront=function(){this.Group.parentNode.appendChild(this.Group);return this;};L.prototype.toBack=function(){if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);}return this;};L.prototype.insertAfter=function(R){if(R.Group.nextSibling){R.Group.parentNode.insertBefore(this.Group,R.Group.nextSibling);}else{R.Group.parentNode.appendChild(this.Group);}return this;};L.prototype.insertBefore=function(R){R.Group.parentNode.insertBefore(this.Group,R.Group);return this;};var Z=function(e,R,z,v){var u=r("group");var w=r("oval");u.appendChild(w);var i=new L(w,u,e);i.type="circle";c(i,{stroke:"#000",fill:"none"});i.attrs.cx=R;i.attrs.cy=z;i.attrs.r=v;i.setBox({x:R-v,y:z-v,width:v*2,height:v*2});e.canvas.appendChild(u);return i;};var g=function(e,AB,AA,AC,u,R){var v=r("group"),i=r(R?"roundrect":"rect"),AD=(+R||0)/(Math.min(AC,u));i.arcsize=AD;v.appendChild(i);var z=new L(i,v,e);z.type="rect";c(z,{stroke:"#000"});z.attrs.x=AB;z.attrs.y=AA;z.attrs.w=AC;z.attrs.h=u;z.attrs.r=+R;z.arcsize=AD;z.setBox({x:AB,y:AA,width:AC,height:u});e.canvas.appendChild(v);return z;};var G=function(e,R,AA,w,v){var u=r("group");var z=r("oval");u.appendChild(z);var i=new L(z,u,e);i.type="ellipse";c(i,{stroke:"#000"});i.attrs.cx=R;i.attrs.cy=AA;i.attrs.rx=w;i.attrs.ry=v;i.setBox({x:R-w,y:AA-v,width:w*2,height:v*2});e.canvas.appendChild(u);return i;};var P=function(e,R,AB,AA,AC,u){var v=r("group");var i=r("image");i.src=R;v.appendChild(i);var z=new L(i,v,e);z.type="image";z.attrs.x=AB;z.attrs.y=AA;z.attrs.w=AC;z.attrs.h=u;z.setBox({x:AB,y:AA,width:AC,height:u});e.canvas.appendChild(v);return z;};var f=function(e,AC,AB,AD){var w=r("group"),v=w.style;var u=r("shape"),AA=u.style;var AE=r("path"),R=AE.style;AE.v=["m",Math.round(AC),", ",Math.round(AB-2),"l",Math.round(AC)+1,", ",Math.round(AB-2)].join("");AE.textpathok=true;AA.width=e.width;AA.height=e.height;v.position="absolute";v.left=0;v.top=0;v.width=e.width;v.height=e.height;var i=r("textpath");i.string=AD;i.on=true;i.coordsize=e.coordsize;i.coordorigin=e.coordorigin;u.appendChild(i);u.appendChild(AE);w.appendChild(u);var z=new L(i,w,e);z.shape=u;z.textpath=AE;z.type="text";z.attrs.x=AC;z.attrs.y=AB;z.attrs.w=1;z.attrs.h=1;c(z,{font:Q.font,stroke:"none",fill:"#000"});z.setBox();e.canvas.appendChild(w);return z;};var a=function(e,R){this.width=e||this.width;this.height=R||this.height;this.canvas.style.width=this.width+"px";this.canvas.style.height=this.height+"px";this.canvas.parentNode.style.clip="rect(0 "+this.width+"px "+this.height+"px 0)";this.canvas.coordsize=this.width+" "+this.height;return this;};F.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{if(!F.namespaces.rvml){F.namespaces.add("rvml","urn:schemas-microsoft-com:vml");}var r=function(R){return F.createElement("<rvml:"+R+' class="rvml">');};}catch(q){var r=function(R){return F.createElement("<"+R+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}var J=function(){var v=d.apply(null,arguments);var i=v.container,AE=v.x,AD=v.y,u=v.width,AG=v.height;if(!i){throw new Error("VML container not found.");}var AB=F.createElement("div"),AA=F.createElement("div"),R=B.canvas=r("group"),z=AB.style,w=R.style;B.width=u;B.height=AG;u=u||"512px";AG=AG||"342px";z.clip="rect(0 "+u+"px "+AG+"px 0)";z.top="-2px";z.left="-2px";z.position="absolute";w.position="absolute";AA.style.position="relative";w.width=u;w.height=AG;R.coordsize=(/%$/.test(u)?u:parseFloat(u))+" "+(/%$/.test(AG)?AG:parseFloat(AG));R.coordorigin="0 0";var AC=r("rect"),AF=AC.style;AF.left=AF.top=0;AF.width=w.width;AF.height=w.height;AC.filled=AC.stroked="f";R.appendChild(AC);AB.appendChild(R);AA.appendChild(AB);if(i==1){F.body.appendChild(AA);z.position="absolute";z.left=AE+"px";z.top=AD+"px";z.width=u;z.height=AG;i={style:{width:u,height:AG}};}else{z.width=i.style.width=u;z.height=i.style.height=AG;if(i.firstChild){i.insertBefore(AA,i.firstChild);}else{i.appendChild(AA);}}for(var e in B){i[e]=B[e];}A.call(i,i,E.fn);i.clear=function(){var x=[];for(var y=0,AH=R.childNodes.length;y<AH;y++){if(R.childNodes[y]!=AC){x.push(R.childNodes[y]);}}for(y=0,AH=x.length;y<AH;y++){R.removeChild(x[y]);}};i.raphael=E;return i;};B.remove=function(){this.canvas.parentNode.parentNode.parentNode.removeChild(this.canvas.parentNode.parentNode);};B.safari=function(){};}var H=(function(){if(F.addEventListener){return function(v,i,e,R){var u=function(w){return e.call(R,w);};v.addEventListener(i,u,false);return function(){v.removeEventListener(i,u,false);return true;};};}else{if(F.attachEvent){return function(w,u,i,e){var v=function(x){return i.call(e,x||j.event);};w.attachEvent("on"+u,v);var R=function(){w.detachEvent("on"+u,v);return true;};if(u=="mouseover"){w.attachEvent("onmouseenter",v);return function(){w.detachEvent("onmouseenter",v);return R();};}else{if(u=="mouseout"){w.attachEvent("onmouseleave",v);return function(){w.detachEvent("onmouseleave",v);return R();};}}return R;};}}})();for(var n=U.length;n--;){(function(R){L.prototype[R]=function(e){if(typeof e=="function"){this.events=this.events||{};this.events[R]=this.events[R]||{};this.events[R][e]=this.events[R][e]||[];this.events[R][e].push(H(this.shape||this.node,R,e,this));}return this;};L.prototype["un"+R]=function(e){this.events&&this.events[R]&&this.events[R][e]&&this.events[R][e].length&&this.events[R][e].shift()()&&!this.events[R][e].length&&delete this.events[R][e];};})(U[n]);}B.circle=function(R,i,e){return Z(this,R,i,e);};B.rect=function(R,v,e,i,u){return g(this,R,v,e,i,u);};B.ellipse=function(R,u,i,e){return G(this,R,u,i,e);};B.path=function(e,R){return s(e,R,this);};B.image=function(u,R,v,e,i){return P(this,u,R,v,e,i);};B.text=function(R,i,e){return f(this,R,i,e);};B.drawGrid=function(AD,AC,AE,AA,z,AB,u){u=u||"#000";var AF=["M",AD,AC,"L",AD+AE,AC,AD+AE,AC+AA,AD,AC+AA,AD,AC],R=AA/AB,e=AE/z;for(var v=1;v<AB;v++){AF=AF.concat(["M",AD,AC+v*R,"L",AD+AE,AC+v*R]);}for(var v=1;v<z;v++){AF=AF.concat(["M",AD+v*e,AC,"L",AD+v*e,AC+AA]);}return this.path({stroke:u,"stroke-width":1},AF.join(","));};B.pathfinder=function(x,w){var e={M:function(i,z){this.moveTo(i,z);},C:function(AA,AC,y,AB,i,z){this.curveTo(AA,AC,y,AB,i,z);},Q:function(y,AA,i,z){this.qcurveTo(y,AA,i,z);},T:function(i,z){this.qcurveTo(i,z);},S:function(y,AA,i,z){x.curveTo(y,AA,i,z);},L:function(i,z){x.lineTo(i,z);},H:function(i){this.lineTo(i,this.last.y);},V:function(i){this.lineTo(this.last.x,i);},A:function(AC,AB,z,AA,AD,i,AE){this.arcTo(AC,AB,AA,AD,i,AE);},Z:function(){this.andClose();}};w=V(w);for(var u=0,v=w.length;u<v;u++){var R=w[u].shift();e[R].apply(x,w[u]);w[u].unshift(R);}};B.set=function(R){return new I(R);};B.setSize=a;L.prototype.stop=function(){clearTimeout(this.animation_in_progress);};L.prototype.scale=function(AG,AF,u,e){if(AG==null&&AF==null){return{x:this._.sx,y:this._.sy,toString:function(){return this.x.toFixed(3)+" "+this.y.toFixed(3);}};}AF=AF||AG;!+AF&&(AF=AG);var AK,AI,AJ,AH,AU=this.attrs;if(AG!=0){var AE=this.type=="path"?Y(AU.path):this.getBBox(),AB=AE.x+AE.width/2,w=AE.y+AE.height/2;u=(+u||u==0)?u:AB;e=(+e||e==0)?e:w;var AD=Math.round(AG/Math.abs(AG)),AA=Math.round(AF/Math.abs(AF)),AN=this.node.style,AW=u+(AB-u)*AG*AD/this._.sx,AV=e+(w-e)*AF*AA/this._.sy;switch(this.type){case"rect":case"image":var AC=AU.width*AG*AD/this._.sx,AM=AU.height*AF*AA/this._.sy,z=AW-AC/2,v=AV-AM/2;this.attr({width:AC,height:AM,x:z,y:v});break;case"circle":case"ellipse":this.attr({rx:AU.rx*AG/this._.sx,ry:AU.ry*AF/this._.sy,r:AU.r*AG/this._.sx,cx:AW,cy:AV});break;case"path":var AP=C(AU.path),AQ=true;for(var AS=0,AL=AP.length;AS<AL;AS++){var AO=AP[AS];if(AO[0].toUpperCase()=="M"&&AQ){continue;}else{AQ=false;}if(E.svg&&AO[0].toUpperCase()=="A"){AO[AP[AS].length-2]*=AG/this._.sx;AO[AP[AS].length-1]*=AF/this._.sy;AO[1]*=AG/this._.sx;AO[2]*=AF/this._.sy;AO[5]=+(AD+AA?!!+AO[5]:!+AO[5]);}else{for(var AR=1,AT=AO.length;AR<AT;AR++){AO[AR]*=(AR%2)?AG/this._.sx:AF/this._.sy;}}}var R=Y(AP),AK=AW-R.x-R.width/2,AI=AV-R.y-R.height/2;AP=C(AP);AP[0][1]+=AK;AP[0][2]+=AI;this.attr({path:AP.join(" ")});break;}if(this.type in {text:1,image:1}&&(AD!=1||AA!=1)){if(this.transformations){this.transformations[2]="scale(".concat(AD,",",AA,")");this.node.setAttribute("transform",this.transformations.join(" "));AK=(AD==-1)?-AU.x-(AC||0):AU.x;AI=(AA==-1)?-AU.y-(AM||0):AU.y;this.attr({x:AK,y:AI});AU.fx=AD-1;AU.fy=AA-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11=".concat(AD,", M12=0, M21=0, M22=",AA,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");AN.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"");}}else{if(this.transformations){this.transformations[2]="";this.node.setAttribute("transform",this.transformations.join(" "));AU.fx=0;AU.fy=0;}else{this.node.filterMatrix="";AN.filter=(this.node.filterMatrix||"")+(this.node.filterOpacity||"");}}AU.scale=[AG,AF,u,e].join(" ");this._.sx=AG;this._.sy=AF;}return this;};E.easing_formulas={linear:function(u,R,i,e){return u/e;},"<":function(u,R,i,e){return i*(u/=e)*u+R;},">":function(u,R,i,e){return -i*(u/=e)*(u-2)+R;},"<>":function(u,R,i,e){if((u/=e/2)<1){return i/2*u*u+R;}return -i/2*((--u)*(u-2)-1)+R;},bounce:function(u,R,i,e){if((u/=e)<(1/2.75)){return i*(7.5625*u*u)+R;}else{if(u<(2/2.75)){return i*(7.5625*(u-=(1.5/2.75))*u+0.75)+R;}else{if(u<(2.5/2.75)){return i*(7.5625*(u-=(2.25/2.75))*u+0.9375)+R;}else{return i*(7.5625*(u-=(2.625/2.75))*u+0.984375)+R;}}}},elastic:function(x,e,w,u){var i=1.70158,v=0,i,R=w;if(x==0){return e;}if((x/=u)==1){return e+w;}if(!v){v=u*0.3;}if(R<Math.abs(w)){R=w;i=v/4;}else{i=v/(2*Math.PI)*Math.asin(w/R);}return R*Math.pow(2,-10*x)*Math.sin((x*u-i)*(2*Math.PI)/v)+w+e;}};E.easing=function(v,u,R,i,e){return(E.easing_formulas[v]||E.easing_formulas.linear)(u,R,i,e);};L.prototype.animate=function(AM,AE,AD,v){clearTimeout(this.animation_in_progress);if(typeof AD=="function"||!AD){v=AD||null;AD="linear";}var AH={},e={},AB={},AA={x:0,y:0};for(var AF in AM){if(AF in T){AH[AF]=this.attr(AF);(typeof AH[AF]=="undefined")&&(AH[AF]=Q[AF]);e[AF]=AM[AF];switch(T[AF]){case"number":AB[AF]=(e[AF]-AH[AF])/AE;break;case"colour":AH[AF]=E.getRGB(AH[AF]);var AG=E.getRGB(e[AF]);AB[AF]={r:(AG.r-AH[AF].r)/AE,g:(AG.g-AH[AF].g)/AE,b:(AG.b-AH[AF].b)/AE};break;case"path":var w=b(AH[AF],e[AF]);AH[AF]=w[0];e[AF]=w[1];AB[AF]=[];for(var AJ=0,z=AH[AF].length;AJ<z;AJ++){AB[AF][AJ]=[0];for(var AI=1,AL=AH[AF][AJ].length;AI<AL;AI++){AB[AF][AJ][AI]=(e[AF][AJ][AI]-AH[AF][AJ][AI])/AE;}}break;case"csv":var R=(AM[AF]+"").split(t),y=(AH[AF]+"").split(t);switch(AF){case"translation":AH[AF]=[0,0];AB[AF]=[R[0]/AE,R[1]/AE];break;case"rotation":AH[AF]=(y[1]==R[1]&&y[2]==R[2])?y:[0,R[1],R[2]];AB[AF]=[(R[0]-AH[AF][0])/AE,0,0];break;case"scale":AM[AF]=R;AH[AF]=(AH[AF]+"").split(t);AB[AF]=[(R[0]-AH[AF][0])/AE,(R[1]-AH[AF][1])/AE,0,0];}e[AF]=R;}}}var u=+new Date,AC=0,x=this;(function AK(){var AO=new Date-u,AV={},AN;if(AO<AE){pos=E.easing(AD,AO,0,1,AE);for(var AS in AH){switch(T[AS]){case"number":AN=+AH[AS]+pos*AE*AB[AS];break;case"colour":AN="rgb("+[Math.round(AH[AS].r+pos*AE*AB[AS].r),Math.round(AH[AS].g+pos*AE*AB[AS].g),Math.round(AH[AS].b+pos*AE*AB[AS].b)].join(",")+")";break;case"path":AN=[];for(var AQ=0,AW=AH[AS].length;AQ<AW;AQ++){AN[AQ]=[AH[AS][AQ][0]];for(var AP=1,AR=AH[AS][AQ].length;AP<AR;AP++){AN[AQ][AP]=AH[AS][AQ][AP]+pos*AE*AB[AS][AQ][AP];}AN[AQ]=AN[AQ].join(" ");}AN=AN.join(" ");break;case"csv":switch(AS){case"translation":var AU=AB[AS][0]*(AO-AC),AT=AB[AS][1]*(AO-AC);AA.x+=AU;AA.y+=AT;AN=[AU,AT].join(" ");break;case"rotation":AN=+AH[AS][0]+pos*AE*AB[AS][0];AH[AS][1]&&(AN+=","+AH[AS][1]+","+AH[AS][2]);break;case"scale":AN=[+AH[AS][0]+pos*AE*AB[AS][0],+AH[AS][1]+pos*AE*AB[AS][1],(2 in AM[AS]?AM[AS][2]:""),(3 in AM[AS]?AM[AS][3]:"")].join(" ");}break;}if(AS=="font-size"){AV[AS]=AN+"px";}else{AV[AS]=AN;}}x.attr(AV);x.animation_in_progress=setTimeout(AK);B.safari();}else{(AA.x||AA.y)&&x.translate(-AA.x,-AA.y);x.attr(AM);clearTimeout(x.animation_in_progress);B.safari();(typeof v=="function")&&v.call(x);}AC=AO;})();return this;};L.prototype.translate=function(R,i){if(R==null){return{x:this._.tx,y:this._.ty};}this._.tx+=+R;this._.ty+=+i;switch(this.type){case"circle":case"ellipse":this.attr({cx:this.attrs.cx+R,cy:this.attrs.cy+i});break;case"rect":case"image":case"text":this.attr({x:this.attrs.x+(+R),y:this.attrs.y+(+i)});break;case"path":var e=C(this.attrs.path);e[0][1]+=+R;e[0][2]+=+i;this.attr({path:e.join(" ")});break;}return this;};var I=function(){this.items=[];this.length=0;for(var R=0,e=arguments.length;R<e;R++){if(arguments[R]&&(arguments[R].constructor==L||arguments[R].constructor==I)){this[this.items.length]=this.items[this.items.length]=arguments[R];this.length++;}}};I.prototype.push=function(e){if(e&&e.constructor==L||e.constructor==I){var R=this.items.length;this[R]=this.items[R]=e;this.length++;}return this;};I.prototype.pull=function(u){var e=this.items.splice(u,1)[0];for(var R=u,i=this.items.length;R<i;R++){this[R]=this[R+1];}delete this[i+1];this.length--;return e;};for(var o in L.prototype){I.prototype[o]=(function(R){return function(){for(var e=0,u=this.items.length;e<u;e++){this.items[e][R].apply(this.items[e],arguments);}return this;};})(o);}I.prototype.attr=function(e,x){if(e&&e instanceof Array&&typeof e[0]=="object"){for(var R=0,w=e.length;R<w;R++){this.items[R].attr(e[R]);}}else{for(var u=0,v=this.items.length;u<v;u++){this.items[u].attr.apply(this.items[u],arguments);}}return this;};I.prototype.getBBox=function(){var R=[],AA=[],e=[],v=[];for(var u=this.items.length;u--;){var z=this.items[u].getBBox();R.push(z.x);AA.push(z.y);e.push(z.x+z.width);v.push(z.y+z.height);}R=Math.min.apply(Math,R);AA=Math.min.apply(Math,AA);return{x:R,y:AA,width:Math.max.apply(Math,e)-R,height:Math.max.apply(Math,v)-AA};};E.registerFont=function(R){if(!R.face){return ;}this.fonts=this.fonts||{};if(this.fonts[R.face["font-family"]]){this.fonts[R.face["font-family"]].push(R);}else{this.fonts[R.face["font-family"]]=[R];}if(!R.svg){R.face["units-per-em"]=parseInt(R.face["units-per-em"],10);for(var e in R.glyphs){var i=R.glyphs[e];if(i.d){i.d="M"+i.d.replace(/[mlcxtrv]/g,function(u){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[u]||"M";})+"z";}}}};B.getFont=function(z,AA,e,v){v=v||"normal";e=e||"normal";AA=+AA||{normal:400,bold:700,lighter:300,bolder:800}[AA]||400;var w=E.fonts[z];if(!w){var u=new RegExp("(^|\\s)"+z.replace(/[^\w\d\s+!~.:_-]/g,"")+"(\\s|$)","i");for(var R in E.fonts){if(u.test(R)){w=E.fonts[R];break;}}}var x;if(w){for(var y=0,AB=w.length;y<AB;y++){x=w[y];if(x.face["font-weight"]==AA&&(x.face["font-style"]==e||!x.face["font-style"])&&x.face["font-stretch"]==v){break;}}}return x;};B.print=function(AD,AC,AA,e,AH){var w=this.set(),AB=(AA+"").split(""),R=0,AG="",v;if(e){v=(AH||16)/e.face["units-per-em"];for(var z=0,AE=AB.length;z<AE;z++){var u=z&&e.glyphs[AB[z-1]]||{},AF=e.glyphs[AB[z]];R+=z?(u.w||e.w)+(u.k&&u.k[AB[z]]||0):0;AF&&AF.d&&w.push(this.path({fill:"#000",stroke:"none"},AF.d).translate(R,0));}w.scale(v,v,0,AC).translate(AD,(AH||16)/2);}return w;};E.ninja=function(){var R=window.Raphael;if(m.was){window.Raphael=m.is;}else{try{delete window.Raphael;}catch(i){window.Raphael=void (0);}}return R;};E.el=L.prototype;return E;})();

//---------------------------------------------aedips - moo.fx----------------------------------------
/*
moo.fx, simple effects library built with prototype.js (http://prototype.conio.net).
by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE.
for more info (http://moofx.mad4milk.net).
Friday, February 24, 2006
v 1.2.2
*/

var fx = new Object();
//base
fx.Base = function(){};
fx.Base.prototype = {
	setOptions: function(options) {
	this.options = {
		duration: 500,
		onComplete: '',
		transition: fx.sinoidal
	}
	Object.extend(this.options, options || {});
	},

	go: function() {
		this.startTime = (new Date).getTime();
		this.timer = setInterval (this.step.bind(this), 13);
	},

	step: function() {
		var time  = (new Date).getTime();
		if (time >= this.options.duration+this.startTime) {
			this.now = this.to;
			clearInterval (this.timer);
			this.timer = null;
			if (this.options.onComplete) setTimeout(this.options.onComplete.bind(this), 10);
		}
		else {
			var Tpos = (time - this.startTime) / (this.options.duration);
			this.now = this.options.transition(Tpos) * (this.to-this.from) + this.from;
		}
		this.increase();
	},

	custom: function(from, to) {
		if (this.timer != null) return;
		this.from = from;
		this.to = to;
		this.go();
	},

	hide: function() {
		this.now = 0;
		this.increase();
	},

	clearTimer: function() {
		clearInterval(this.timer);
		this.timer = null;
	}
}

//stretchers
fx.Layout = Class.create();
fx.Layout.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.el.style.overflow = "hidden";
		this.el.iniWidth = this.el.offsetWidth;
		this.el.iniHeight = this.el.offsetHeight;
		this.setOptions(options);
	}
});

fx.Height = Class.create();
Object.extend(Object.extend(fx.Height.prototype, fx.Layout.prototype), {	
	increase: function() {
		this.el.style.height = this.now + "px";
	},

	toggle: function() {
		if (this.el.offsetHeight > 0) this.custom(this.el.offsetHeight, 0);
		else this.custom(0, this.el.scrollHeight);
	}
});

fx.Width = Class.create();
Object.extend(Object.extend(fx.Width.prototype, fx.Layout.prototype), {	
	increase: function() {
		this.el.style.width = this.now + "px";
	},

	toggle: function(){
		if (this.el.offsetWidth > 0) this.custom(this.el.offsetWidth, 0);
		else this.custom(0, this.el.iniWidth);
	}
});

//fader
fx.Opacity = Class.create();
fx.Opacity.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.now = 1;
		this.increase();
		this.setOptions(options);
	},

	increase: function() {
		if (this.now == 1 && (/Firefox/.test(navigator.userAgent))) this.now = 0.9999;
		this.setOpacity(this.now);
	},
	
	setOpacity: function(opacity) {
		if (opacity == 0) this.el.style.visibility = "hidden";
		else this.el.style.visibility = "visible";
		if (window.ActiveXObject) this.el.style.filter = "alpha(opacity=" + opacity*100 + ")";
		this.el.style.opacity = opacity;
	},

	toggle: function() {
		if (this.now > 0) this.custom(1, 0);
		else this.custom(0, 1);
	}
});

//transitions
fx.sinoidal = function(pos){
	return ((-Math.cos(pos*Math.PI)/2) + 0.5);
	//this transition is from script.aculo.us
}
fx.linear = function(pos){
	return pos;
}
fx.cubic = function(pos){
	return Math.pow(pos, 3);
}
fx.circ = function(pos){
	return Math.sqrt(pos);
}

//---------------------------------------------aedips - moo.fx.pack-----------------------------------------

/*
moo.fx pack, effects extensions for moo.fx.
by Valerio Proietti (http://mad4milk.net) MIT-style LICENSE
for more info visit (http://moofx.mad4milk.net).
Friday, February 24, 2006
v 1.2.2
*/

//smooth scroll
fx.Scroll = Class.create();
fx.Scroll.prototype = Object.extend(new fx.Base(), {
	initialize: function(options) {
		this.setOptions(options);
	},

	scrollTo: function(el){
		var dest = Position.cumulativeOffset($(el))[1];
		var client = window.innerHeight || document.documentElement.clientHeight;
		var full = document.documentElement.scrollHeight;
		var top = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
		if (dest+client > full) this.custom(top, dest - client + (full-dest));
		else this.custom(top, dest);
	},

	increase: function(){
		window.scrollTo(0, this.now);
	}
});

//text size modify, now works with pixels too.
fx.Text = Class.create();
fx.Text.prototype = Object.extend(new fx.Base(), {
	initialize: function(el, options) {
		this.el = $(el);
		this.setOptions(options);
		if (!this.options.unit) this.options.unit = "em";
	},

	increase: function() {
		this.el.style.fontSize = this.now + this.options.unit;
	}
});

//composition effect: widht/height/opacity
fx.Combo = Class.create();
fx.Combo.prototype = {
	setOptions: function(options) {
		this.options = {
			opacity: true,
			height: true,
			width: false
		}
		Object.extend(this.options, options || {});
	},

	initialize: function(el, options) {
		this.el = $(el);
		this.setOptions(options);
		if (this.options.opacity) {
			this.el.o = new fx.Opacity(el, options);
			options.onComplete = null;
		}
		if (this.options.height) {
			this.el.h = new fx.Height(el, options);
			options.onComplete = null;	
		}
		if (this.options.width) this.el.w = new fx.Width(el, options);
	},
	
	toggle: function() { this.checkExec('toggle'); },

	hide: function(){ this.checkExec('hide'); },
	
	clearTimer: function(){ this.checkExec('clearTimer'); },
	
	checkExec: function(func){
		if (this.el.o) this.el.o[func]();
		if (this.el.h) this.el.h[func]();
		if (this.el.w) this.el.w[func]();
	},
	
	//only if width+height
	resizeTo: function(hto, wto) {
		if (this.el.h && this.el.w) {
			this.el.h.custom(this.el.offsetHeight, this.el.offsetHeight + hto);
			this.el.w.custom(this.el.offsetWidth, this.el.offsetWidth + wto);
		}
	},

	customSize: function(hto, wto) {
		if (this.el.h && this.el.w) {
			this.el.h.custom(this.el.offsetHeight, hto);
			this.el.w.custom(this.el.offsetWidth, wto);
		}
	}
}

fx.Accordion = Class.create();
fx.Accordion.prototype = {
	setOptions: function(options) {
		this.options = {
			delay: 100,
			opacity: false
		}
		Object.extend(this.options, options || {});
	},

	initialize: function(togglers, elements, options) {
		this.elements = elements;
		this.setOptions(options);
		var options = options || '';
		elements.each(function(el, i){
			options.onComplete = function(){
				if (el.offsetHeight > 0) el.style.height = '1%';
			}
			el.fx = new fx.Combo(el, options);
			el.fx.hide();
		});

		togglers.each(function(tog, i){
			tog.onclick = function(){
				this.showThisHideOpen(elements[i]);
			}.bind(this);
		}.bind(this));
	},

	showThisHideOpen: function(toShow){
		if (toShow.offsetHeight == 0) setTimeout(function(){this.clearAndToggle(toShow);}.bind(this), this.options.delay);
		this.elements.each(function(el, i){
			if (el.offsetHeight > 0 && el != toShow) this.clearAndToggle(el);
		}.bind(this));
	},

	clearAndToggle: function(el){
		el.fx.clearTimer();
		el.fx.toggle();
	}
}

var Remember = new Object();
Remember = function(){};
Remember.prototype = {
	initialize: function(el, options){
		this.el = $(el);
		this.days = 365;
		this.options = options;
		this.effect();
		var cookie = this.readCookie();
		if (cookie) {
			this.fx.now = cookie;
			this.fx.increase();
		}
	},

	//cookie functions based on code by Peter-Paul Koch
	setCookie: function(value) {
		var date = new Date();
		date.setTime(date.getTime()+(this.days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
		document.cookie = this.el+this.el.id+this.prefix+"="+value+expires+"; path=/";
	},

	readCookie: function() {
		var nameEQ = this.el+this.el.id+this.prefix + "=";
		var ca = document.cookie.split(';');
		for(var i=0;c=ca[i];i++) {
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return false;
	},

	custom: function(from, to){
		if (this.fx.now != to) {
			this.setCookie(to);
			this.fx.custom(from, to);
		}
	}
}

fx.RememberHeight = Class.create();
fx.RememberHeight.prototype = Object.extend(new Remember(), {
	effect: function(){
		this.fx = new fx.Height(this.el, this.options);
		this.prefix = 'height';
	},
	
	toggle: function(){
		if (this.el.offsetHeight == 0) this.setCookie(this.el.scrollHeight);
		else this.setCookie(0);
		this.fx.toggle();
	},
	
	resize: function(to){
		this.setCookie(this.el.offsetHeight+to);
		this.fx.custom(this.el.offsetHeight,this.el.offsetHeight+to);
	},

	hide: function(){
		if (!this.readCookie()) {
			this.fx.hide();
		}
	}
});

fx.RememberText = Class.create();
fx.RememberText.prototype = Object.extend(new Remember(), {
	effect: function(){
		this.fx = new fx.Text(this.el, this.options);
		this.prefix = 'text';
	}
});

//useful for-replacement
Array.prototype.each = function(func){
	for(var i=0;ob=this[i];i++) func(ob, i);
}

//Easing Equations (c) 2003 Robert Penner, all rights reserved.
//This work is subject to the terms in http://www.robertpenner.com/easing_terms_of_use.html.

//expo
fx.expoIn = function(pos){
	return Math.pow(2, 10 * (pos - 1));
}
fx.expoOut = function(pos){
	return (-Math.pow(2, -10 * pos) + 1);
}

//quad
fx.quadIn = function(pos){
	return Math.pow(pos, 2);
}
fx.quadOut = function(pos){
	return -(pos)*(pos-2);
}

//circ
fx.circOut = function(pos){
	return Math.sqrt(1 - Math.pow(pos-1,2));
}
fx.circIn = function(pos){
	return -(Math.sqrt(1 - Math.pow(pos, 2)) - 1);
}

//back
fx.backIn = function(pos){
	return (pos)*pos*((2.7)*pos - 1.7);
}
fx.backOut = function(pos){
	return ((pos-1)*(pos-1)*((2.7)*(pos-1) + 1.7) + 1);
}

//sine
fx.sineOut = function(pos){
	return Math.sin(pos * (Math.PI/2));
}
fx.sineIn = function(pos){
	return -Math.cos(pos * (Math.PI/2)) + 1;
}
fx.sineInOut = function(pos){
	return -(Math.cos(Math.PI*pos) - 1)/2;
}


//---------------------------------------------aedips- lytebox----------------------------------------

//***********************************************************************************************************************************/
//	LyteBox v3.22
//
//	 Author: Markus F. Hay
//  Website: http://www.dolem.com/lytebox
//	   Date: October 2, 2007
//	License: Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/)
// Browsers: Tested successfully on WinXP with the following browsers (using no DOCTYPE and Strict/Transitional/Loose DOCTYPES):
//				* Firefox: 2.0.0.7, 1.5.0.12
//				* Internet Explorer: 7.0, 6.0 SP2, 5.5 SP2
//				* Opera: 9.23
//
// Releases: For up-to-date and complete release information, visit http://www.dolem.com/forum/showthread.php?tid=62
//				* v3.22 (10/02/07)
//				* v3.21 (09/30/07)
//				* v3.20 (07/12/07)
//				* v3.10 (05/28/07)
//				* v3.00 (05/15/07)
//				* v2.02 (11/13/06)
//
//   Credit: LyteBox was originally derived from the Lightbox class (v2.02) that was written by Lokesh Dhakar. For more
//			 information please visit http://huddletogether.com/projects/lightbox2/
//***********************************************************************************************************************************/
Array.prototype.removeDuplicates = function () { for (var i = 1; i < this.length; i++) { if (this[i][0] == this[i-1][0]) { this.splice(i,1); } } }
Array.prototype.empty = function () { for (var i = 0; i <= this.length; i++) { this.shift(); } }
String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ''); }

function LyteBox() {
	/*** Start Global Configuration ***/
		this.theme				= 'grey';	// themes: grey (default), red, green, blue, gold
		this.hideFlash			= true;		// controls whether or not Flash objects should be hidden
		this.outerBorder		= true;		// controls whether to show the outer grey (or theme) border
		this.resizeSpeed		= 8;		// controls the speed of the image resizing (1=slowest and 10=fastest)
		this.maxOpacity			= 80;		// higher opacity = darker overlay, lower opacity = lighter overlay
		this.navType			= 1;		// 1 = "Prev/Next" buttons on top left and left (default), 2 = "<< prev | next >>" links next to image number
		this.autoResize			= true;		// controls whether or not images should be resized if larger than the browser window dimensions
		this.doAnimations		= true;		// controls whether or not "animate" Lytebox, i.e. resize transition between images, fade in/out effects, etc.
		
		this.borderSize			= 12;		// if you adjust the padding in the CSS, you will need to update this variable -- otherwise, leave this alone...
	/*** End Global Configuration ***/
	
	/*** Configure Slideshow Options ***/
		this.slideInterval		= 4000;		// Change value (milliseconds) to increase/decrease the time between "slides" (10000 = 10 seconds)
		this.showNavigation		= true;		// true to display Next/Prev buttons/text during slideshow, false to hide
		this.showClose			= true;		// true to display the Close button, false to hide
		this.showDetails		= true;		// true to display image details (caption, count), false to hide
		this.showPlayPause		= true;		// true to display pause/play buttons next to close button, false to hide
		this.autoEnd			= true;		// true to automatically close Lytebox after the last image is reached, false to keep open
		this.pauseOnNextClick	= false;	// true to pause the slideshow when the "Next" button is clicked
        this.pauseOnPrevClick 	= true;		// true to pause the slideshow when the "Prev" button is clicked
	/*** End Slideshow Configuration ***/
	
	if(this.resizeSpeed > 10) { this.resizeSpeed = 10; }
	if(this.resizeSpeed < 1) { resizeSpeed = 1; }
	this.resizeDuration = (11 - this.resizeSpeed) * 0.15;
	this.resizeWTimerArray		= new Array();
	this.resizeWTimerCount		= 0;
	this.resizeHTimerArray		= new Array();
	this.resizeHTimerCount		= 0;
	this.showContentTimerArray	= new Array();
	this.showContentTimerCount	= 0;
	this.overlayTimerArray		= new Array();
	this.overlayTimerCount		= 0;
	this.imageTimerArray		= new Array();
	this.imageTimerCount		= 0;
	this.timerIDArray			= new Array();
	this.timerIDCount			= 0;
	this.slideshowIDArray		= new Array();
	this.slideshowIDCount		= 0;
	this.imageArray	 = new Array();
	this.activeImage = null;
	this.slideArray	 = new Array();
	this.activeSlide = null;
	this.frameArray	 = new Array();
	this.activeFrame = null;
	this.checkFrame();
	this.isSlideshow = false;
	this.isLyteframe = false;
	/*@cc_on
		/*@if (@_jscript)
			this.ie = (document.all && !window.opera) ? true : false;
		/*@else @*/
			this.ie = false;
		/*@end
	@*/
	this.ie7 = (this.ie && window.XMLHttpRequest);	
	this.initialize();
}
LyteBox.prototype.initialize = function() {
	this.updateLyteboxItems();
	var objBody = this.doc.getElementsByTagName("body").item(0);	
	if (this.doc.getElementById('lbOverlay')) {
		objBody.removeChild(this.doc.getElementById("lbOverlay"));
		objBody.removeChild(this.doc.getElementById("lbMain"));
	}
	var objOverlay = this.doc.createElement("div");
		objOverlay.setAttribute('id','lbOverlay');
		objOverlay.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		if ((this.ie && !this.ie7) || (this.ie7 && this.doc.compatMode == 'BackCompat')) {
			objOverlay.style.position = 'absolute';
		}
		objOverlay.style.display = 'none';
		objBody.appendChild(objOverlay);
	var objLytebox = this.doc.createElement("div");
		objLytebox.setAttribute('id','lbMain');
		objLytebox.style.display = 'none';
		objBody.appendChild(objLytebox);
	var objOuterContainer = this.doc.createElement("div");
		objOuterContainer.setAttribute('id','lbOuterContainer');
		objOuterContainer.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objLytebox.appendChild(objOuterContainer);
	var objIframeContainer = this.doc.createElement("div");
		objIframeContainer.setAttribute('id','lbIframeContainer');
		objIframeContainer.style.display = 'none';
		objOuterContainer.appendChild(objIframeContainer);
	var objIframe = this.doc.createElement("iframe");
		objIframe.setAttribute('id','lbIframe');
		objIframe.setAttribute('name','lbIframe');
		objIframe.style.display = 'none';
		objIframeContainer.appendChild(objIframe);
	var objImageContainer = this.doc.createElement("div");
		objImageContainer.setAttribute('id','lbImageContainer');
		objOuterContainer.appendChild(objImageContainer);
	var objLyteboxImage = this.doc.createElement("img");
		objLyteboxImage.setAttribute('id','lbImage');
		objImageContainer.appendChild(objLyteboxImage);
	var objLoading = this.doc.createElement("div");
		objLoading.setAttribute('id','lbLoading');
		objOuterContainer.appendChild(objLoading);
	var objDetailsContainer = this.doc.createElement("div");
		objDetailsContainer.setAttribute('id','lbDetailsContainer');
		objDetailsContainer.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objLytebox.appendChild(objDetailsContainer);
	var objDetailsData =this.doc.createElement("div");
		objDetailsData.setAttribute('id','lbDetailsData');
		objDetailsData.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objDetailsContainer.appendChild(objDetailsData);
	var objDetails = this.doc.createElement("div");
		objDetails.setAttribute('id','lbDetails');
		objDetailsData.appendChild(objDetails);
	var objCaption = this.doc.createElement("span");
		objCaption.setAttribute('id','lbCaption');
		objDetails.appendChild(objCaption);
	var objHoverNav = this.doc.createElement("div");
		objHoverNav.setAttribute('id','lbHoverNav');
		objImageContainer.appendChild(objHoverNav);
	var objBottomNav = this.doc.createElement("div");
		objBottomNav.setAttribute('id','lbBottomNav');
		objDetailsData.appendChild(objBottomNav);
	var objPrev = this.doc.createElement("a");
		objPrev.setAttribute('id','lbPrev');
		objPrev.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPrev.setAttribute('href','#');
		objHoverNav.appendChild(objPrev);
	var objNext = this.doc.createElement("a");
		objNext.setAttribute('id','lbNext');
		objNext.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objNext.setAttribute('href','#');
		objHoverNav.appendChild(objNext);
	var objNumberDisplay = this.doc.createElement("span");
		objNumberDisplay.setAttribute('id','lbNumberDisplay');
		objDetails.appendChild(objNumberDisplay);
	var objNavDisplay = this.doc.createElement("span");
		objNavDisplay.setAttribute('id','lbNavDisplay');
		objNavDisplay.style.display = 'none';
		objDetails.appendChild(objNavDisplay);
	var objClose = this.doc.createElement("a");
		objClose.setAttribute('id','lbClose');
		objClose.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objClose.setAttribute('href','#');
		objBottomNav.appendChild(objClose);
	var objPause = this.doc.createElement("a");
		objPause.setAttribute('id','lbPause');
		objPause.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPause.setAttribute('href','#');
		objPause.style.display = 'none';
		objBottomNav.appendChild(objPause);
	var objPlay = this.doc.createElement("a");
		objPlay.setAttribute('id','lbPlay');
		objPlay.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPlay.setAttribute('href','#');
		objPlay.style.display = 'none';
		objBottomNav.appendChild(objPlay);
};
LyteBox.prototype.updateLyteboxItems = function() {	
	var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
	for (var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		var relAttribute = String(anchor.getAttribute('rel'));
		if (anchor.getAttribute('href')) {
			if (relAttribute.toLowerCase().match('lytebox')) {
				anchor.onclick = function () { myLytebox.start(this, false, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteshow')) {
				anchor.onclick = function () { myLytebox.start(this, true, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteframe')) {
				anchor.onclick = function () { myLytebox.start(this, false, true); return false; }
			}
		}
	}
};
LyteBox.prototype.start = function(imageLink, doSlide, doFrame) {
	if (this.ie && !this.ie7) {	this.toggleSelects('hide');	}
	if (this.hideFlash) { this.toggleFlash('hide'); }
	this.isLyteframe = (doFrame ? true : false);
	var pageSize	= this.getPageSize();
	var objOverlay	= this.doc.getElementById('lbOverlay');
	var objBody		= this.doc.getElementsByTagName("body").item(0);
	objOverlay.style.height = pageSize[1] + "px";
	objOverlay.style.display = '';
	this.appear('lbOverlay', (this.doAnimations ? 0 : this.maxOpacity));
	var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
	if (this.isLyteframe) {
		this.frameArray = [];
		this.frameNum = 0;
		if ((imageLink.getAttribute('rel') == 'lyteframe')) {
			var rev = imageLink.getAttribute('rev');
			this.frameArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'), (rev == null || rev == '' ? 'width: 400px; height: 400px; scrolling: auto;' : rev)));
		} else {
			if (imageLink.getAttribute('rel').indexOf('lyteframe') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						var rev = anchor.getAttribute('rev');
						this.frameArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), (rev == null || rev == '' ? 'width: 400px; height: 400px; scrolling: auto;' : rev)));
					}
				}
				this.frameArray.removeDuplicates();
				while(this.frameArray[this.frameNum][0] != imageLink.getAttribute('href')) { this.frameNum++; }
			}
		}
	} else {
		this.imageArray = [];
		this.imageNum = 0;
		this.slideArray = [];
		this.slideNum = 0;
		if ((imageLink.getAttribute('rel') == 'lytebox')) {
			this.imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
		} else {
			if (imageLink.getAttribute('rel').indexOf('lytebox') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						this.imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
					}
				}
				this.imageArray.removeDuplicates();
				while(this.imageArray[this.imageNum][0] != imageLink.getAttribute('href')) { this.imageNum++; }
			}
			if (imageLink.getAttribute('rel').indexOf('lyteshow') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						this.slideArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
					}
				}
				this.slideArray.removeDuplicates();
				while(this.slideArray[this.slideNum][0] != imageLink.getAttribute('href')) { this.slideNum++; }
			}
		}
	}
	var object = this.doc.getElementById('lbMain');
		object.style.top = (this.getPageScroll() + (pageSize[3] / 15)) + "px";
		object.style.display = '';
	if (!this.outerBorder) {
		this.doc.getElementById('lbOuterContainer').style.border = 'none';
		this.doc.getElementById('lbDetailsContainer').style.border = 'none';
	} else {
		this.doc.getElementById('lbOuterContainer').style.borderBottom = '';
		this.doc.getElementById('lbOuterContainer').setAttribute((this.ie ? 'className' : 'class'), this.theme);
	}
	this.doc.getElementById('lbOverlay').onclick = function() { myLytebox.end(); return false; }
	this.doc.getElementById('lbMain').onclick = function(e) {
		var e = e;
		if (!e) {
			if (window.parent.frames[window.name] && (parent.document.getElementsByTagName('frameset').length <= 0)) {
				e = window.parent.window.event;
			} else {
				e = window.event;
			}
		}
		var id = (e.target ? e.target.id : e.srcElement.id);
		if (id == 'lbMain') { myLytebox.end(); return false; }
	}
	this.doc.getElementById('lbClose').onclick = function() { myLytebox.end(); return false; }
	this.doc.getElementById('lbPause').onclick = function() { myLytebox.togglePlayPause("lbPause", "lbPlay"); return false; }
	this.doc.getElementById('lbPlay').onclick = function() { myLytebox.togglePlayPause("lbPlay", "lbPause"); return false; }	
	this.isSlideshow = doSlide;
	this.isPaused = (this.slideNum != 0 ? true : false);
	if (this.isSlideshow && this.showPlayPause && this.isPaused) {
		this.doc.getElementById('lbPlay').style.display = '';
		this.doc.getElementById('lbPause').style.display = 'none';
	}
	if (this.isLyteframe) {
		this.changeContent(this.frameNum);
	} else {
		if (this.isSlideshow) {
			this.changeContent(this.slideNum);
		} else {
			this.changeContent(this.imageNum);
		}
	}
};
LyteBox.prototype.changeContent = function(imageNum) {
	if (this.isSlideshow) {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	this.activeImage = this.activeSlide = this.activeFrame = imageNum;
	if (!this.outerBorder) {
		this.doc.getElementById('lbOuterContainer').style.border = 'none';
		this.doc.getElementById('lbDetailsContainer').style.border = 'none';
	} else {
		this.doc.getElementById('lbOuterContainer').style.borderBottom = '';
		this.doc.getElementById('lbOuterContainer').setAttribute((this.ie ? 'className' : 'class'), this.theme);
	}
	this.doc.getElementById('lbLoading').style.display = '';
	this.doc.getElementById('lbImage').style.display = 'none';
	this.doc.getElementById('lbIframe').style.display = 'none';
	this.doc.getElementById('lbPrev').style.display = 'none';
	this.doc.getElementById('lbNext').style.display = 'none';
	this.doc.getElementById('lbIframeContainer').style.display = 'none';
	this.doc.getElementById('lbDetailsContainer').style.display = 'none';
	this.doc.getElementById('lbNumberDisplay').style.display = 'none';
	if (this.navType == 2 || this.isLyteframe) {
		object = this.doc.getElementById('lbNavDisplay');
		object.innerHTML = '&nbsp;&nbsp;&nbsp;<span id="lbPrev2_Off" style="display: none;" class="' + this.theme + '">&laquo; prev</span><a href="#" id="lbPrev2" class="' + this.theme + '" style="display: none;">&laquo; prev</a> <b id="lbSpacer" class="' + this.theme + '">||</b> <span id="lbNext2_Off" style="display: none;" class="' + this.theme + '">next &raquo;</span><a href="#" id="lbNext2" class="' + this.theme + '" style="display: none;">next &raquo;</a>';
		object.style.display = 'none';
	}
	if (this.isLyteframe) {
		var iframe = myLytebox.doc.getElementById('lbIframe');
		var styles = this.frameArray[this.activeFrame][2];
		var aStyles = styles.split(';');
		for (var i = 0; i < aStyles.length; i++) {
			if (aStyles[i].indexOf('width:') >= 0) {
				var w = aStyles[i].replace('width:', '');
				iframe.width = w.trim();
			} else if (aStyles[i].indexOf('height:') >= 0) {
				var h = aStyles[i].replace('height:', '');
				iframe.height = h.trim();
			} else if (aStyles[i].indexOf('scrolling:') >= 0) {
				var s = aStyles[i].replace('scrolling:', '');
				iframe.scrolling = s.trim();
			} else if (aStyles[i].indexOf('border:') >= 0) {
				// Not implemented yet, as there are cross-platform issues with setting the border (from a GUI standpoint)
				//var b = aStyles[i].replace('border:', '');
				//iframe.style.border = b.trim();
			}
		}
		this.resizeContainer(parseInt(iframe.width), parseInt(iframe.height));
	} else {
		imgPreloader = new Image();
		imgPreloader.onload = function() {
			var imageWidth = imgPreloader.width;
			var imageHeight = imgPreloader.height;
			if (myLytebox.autoResize) {
				var pagesize = myLytebox.getPageSize();
				var x = pagesize[2] - 150;
				var y = pagesize[3] - 150;
				if (imageWidth > x) {
					imageHeight = Math.round(imageHeight * (x / imageWidth));
					imageWidth = x; 
					if (imageHeight > y) { 
						imageWidth = Math.round(imageWidth * (y / imageHeight));
						imageHeight = y; 
					}
				} else if (imageHeight > y) { 
					imageWidth = Math.round(imageWidth * (y / imageHeight));
					imageHeight = y; 
					if (imageWidth > x) {
						imageHeight = Math.round(imageHeight * (x / imageWidth));
						imageWidth = x;
					}
				}
			}
			var lbImage = myLytebox.doc.getElementById('lbImage')
			lbImage.src = (myLytebox.isSlideshow ? myLytebox.slideArray[myLytebox.activeSlide][0] : myLytebox.imageArray[myLytebox.activeImage][0]);
			lbImage.width = imageWidth;
			lbImage.height = imageHeight;
			myLytebox.resizeContainer(imageWidth, imageHeight);
			imgPreloader.onload = function() {};
		}
		imgPreloader.src = (this.isSlideshow ? this.slideArray[this.activeSlide][0] : this.imageArray[this.activeImage][0]);
	}
};
LyteBox.prototype.resizeContainer = function(imgWidth, imgHeight) {
	this.wCur = this.doc.getElementById('lbOuterContainer').offsetWidth;
	this.hCur = this.doc.getElementById('lbOuterContainer').offsetHeight;
	this.xScale = ((imgWidth  + (this.borderSize * 2)) / this.wCur) * 100;
	this.yScale = ((imgHeight  + (this.borderSize * 2)) / this.hCur) * 100;
	var wDiff = (this.wCur - this.borderSize * 2) - imgWidth;
	var hDiff = (this.hCur - this.borderSize * 2) - imgHeight;
	if (!(hDiff == 0)) {
		this.hDone = false;
		this.resizeH('lbOuterContainer', this.hCur, imgHeight + this.borderSize*2, this.getPixelRate(this.hCur, imgHeight));
	} else {
		this.hDone = true;
	}
	if (!(wDiff == 0)) {
		this.wDone = false;
		this.resizeW('lbOuterContainer', this.wCur, imgWidth + this.borderSize*2, this.getPixelRate(this.wCur, imgWidth));
	} else {
		this.wDone = true;
	}
	if ((hDiff == 0) && (wDiff == 0)) {
		if (this.ie){ this.pause(250); } else { this.pause(100); } 
	}
	this.doc.getElementById('lbPrev').style.height = imgHeight + "px";
	this.doc.getElementById('lbNext').style.height = imgHeight + "px";
	this.doc.getElementById('lbDetailsContainer').style.width = (imgWidth + (this.borderSize * 2) + (this.ie && this.doc.compatMode == "BackCompat" && this.outerBorder ? 2 : 0)) + "px";
	this.showContent();
};
LyteBox.prototype.showContent = function() {
	if (this.wDone && this.hDone) {
		for (var i = 0; i < this.showContentTimerCount; i++) { window.clearTimeout(this.showContentTimerArray[i]); }
		if (this.outerBorder) {
			this.doc.getElementById('lbOuterContainer').style.borderBottom = 'none';
		}
		this.doc.getElementById('lbLoading').style.display = 'none';
		if (this.isLyteframe) {
			this.doc.getElementById('lbIframe').style.display = '';
			this.appear('lbIframe', (this.doAnimations ? 0 : 100));
		} else {
			this.doc.getElementById('lbImage').style.display = '';
			this.appear('lbImage', (this.doAnimations ? 0 : 100));
			this.preloadNeighborImages();
		}
		if (this.isSlideshow) {
			if(this.activeSlide == (this.slideArray.length - 1)) {
				if (this.autoEnd) {
					this.slideshowIDArray[this.slideshowIDCount++] = setTimeout("myLytebox.end('slideshow')", this.slideInterval);
				}
			} else {
				if (!this.isPaused) {
					this.slideshowIDArray[this.slideshowIDCount++] = setTimeout("myLytebox.changeContent("+(this.activeSlide+1)+")", this.slideInterval);
				}
			}
			this.doc.getElementById('lbHoverNav').style.display = (this.showNavigation && this.navType == 1 ? '' : 'none');
			this.doc.getElementById('lbClose').style.display = (this.showClose ? '' : 'none');
			this.doc.getElementById('lbDetails').style.display = (this.showDetails ? '' : 'none');
			this.doc.getElementById('lbPause').style.display = (this.showPlayPause && !this.isPaused ? '' : 'none');
			this.doc.getElementById('lbPlay').style.display = (this.showPlayPause && !this.isPaused ? 'none' : '');
			this.doc.getElementById('lbNavDisplay').style.display = (this.showNavigation && this.navType == 2 ? '' : 'none');
		} else {
			this.doc.getElementById('lbHoverNav').style.display = (this.navType == 1 && !this.isLyteframe ? '' : 'none');
			if ((this.navType == 2 && !this.isLyteframe && this.imageArray.length > 1) || (this.frameArray.length > 1 && this.isLyteframe)) {
				this.doc.getElementById('lbNavDisplay').style.display = '';
			} else {
				this.doc.getElementById('lbNavDisplay').style.display = 'none';
			}
			this.doc.getElementById('lbClose').style.display = '';
			this.doc.getElementById('lbDetails').style.display = '';
			this.doc.getElementById('lbPause').style.display = 'none';
			this.doc.getElementById('lbPlay').style.display = 'none';
		}
		this.doc.getElementById('lbImageContainer').style.display = (this.isLyteframe ? 'none' : '');
		this.doc.getElementById('lbIframeContainer').style.display = (this.isLyteframe ? '' : 'none');
		try {
			this.doc.getElementById('lbIframe').src = this.frameArray[this.activeFrame][0];
		} catch(e) { }
	} else {
		this.showContentTimerArray[this.showContentTimerCount++] = setTimeout("myLytebox.showContent()", 200);
	}
};
LyteBox.prototype.updateDetails = function() {
	var object = this.doc.getElementById('lbCaption');
	var sTitle = (this.isSlideshow ? this.slideArray[this.activeSlide][1] : (this.isLyteframe ? this.frameArray[this.activeFrame][1] : this.imageArray[this.activeImage][1]));
	object.style.display = '';
	object.innerHTML = (sTitle == null ? '' : sTitle);
	this.updateNav();
	this.doc.getElementById('lbDetailsContainer').style.display = '';
	object = this.doc.getElementById('lbNumberDisplay');
	if (this.isSlideshow && this.slideArray.length > 1) {
		object.style.display = '';
		object.innerHTML = "Image " + eval(this.activeSlide + 1) + " of " + this.slideArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 && this.showNavigation ? '' : 'none');
	} else if (this.imageArray.length > 1 && !this.isLyteframe) {
		object.style.display = '';
		object.innerHTML = "Image " + eval(this.activeImage + 1) + " of " + this.imageArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 ? '' : 'none');
	} else if (this.frameArray.length > 1 && this.isLyteframe) {
		object.style.display = '';
		object.innerHTML = "Page " + eval(this.activeFrame + 1) + " of " + this.frameArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = '';
	} else {
		this.doc.getElementById('lbNavDisplay').style.display = 'none';
	}
	this.appear('lbDetailsContainer', (this.doAnimations ? 0 : 100));
};
LyteBox.prototype.updateNav = function() {
	if (this.isSlideshow) {
		if (this.activeSlide != 0) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
				object.style.display = '';
				object.onclick = function() {
					if (myLytebox.pauseOnPrevClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
					myLytebox.changeContent(myLytebox.activeSlide - 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
		}
		if (this.activeSlide != (this.slideArray.length - 1)) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
				object.style.display = '';
				object.onclick = function() {
					if (myLytebox.pauseOnNextClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
					myLytebox.changeContent(myLytebox.activeSlide + 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
		}
	} else if (this.isLyteframe) {
		if(this.activeFrame != 0) {
			var object = this.doc.getElementById('lbPrev2');
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeFrame - 1); return false;
				}
		} else {
			this.doc.getElementById('lbPrev2_Off').style.display = '';
		}
		if(this.activeFrame != (this.frameArray.length - 1)) {
			var object = this.doc.getElementById('lbNext2');
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeFrame + 1); return false;
				}
		} else {
			this.doc.getElementById('lbNext2_Off').style.display = '';
		}		
	} else {
		if(this.activeImage != 0) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeImage - 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
		}
		if(this.activeImage != (this.imageArray.length - 1)) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeImage + 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
		}
	}
	this.enableKeyboardNav();
};
LyteBox.prototype.enableKeyboardNav = function() { document.onkeydown = this.keyboardAction; };
LyteBox.prototype.disableKeyboardNav = function() { document.onkeydown = ''; };
LyteBox.prototype.keyboardAction = function(e) {
	var keycode = key = escape = null;
	keycode	= (e == null) ? event.keyCode : e.which;
	key		= String.fromCharCode(keycode).toLowerCase();
	escape  = (e == null) ? 27 : e.DOM_VK_ESCAPE;
	if ((key == 'x') || (key == 'c') || (keycode == escape)) {
		myLytebox.end();
	} else if ((key == 'p') || (keycode == 37)) {
		if (myLytebox.isSlideshow) {
			if(myLytebox.activeSlide != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeSlide - 1);
			}
		} else if (myLytebox.isLyteframe) {
			if(myLytebox.activeFrame != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeFrame - 1);
			}
		} else {
			if(myLytebox.activeImage != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeImage - 1);
			}
		}
	} else if ((key == 'n') || (keycode == 39)) {
		if (myLytebox.isSlideshow) {
			if(myLytebox.activeSlide != (myLytebox.slideArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeSlide + 1);
			}
		} else if (myLytebox.isLyteframe) {
			if(myLytebox.activeFrame != (myLytebox.frameArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeFrame + 1);
			}
		} else {
			if(myLytebox.activeImage != (myLytebox.imageArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeImage + 1);
			}
		}
	}
};
LyteBox.prototype.preloadNeighborImages = function() {
	if (this.isSlideshow) {
		if ((this.slideArray.length - 1) > this.activeSlide) {
			preloadNextImage = new Image();
			preloadNextImage.src = this.slideArray[this.activeSlide + 1][0];
		}
		if(this.activeSlide > 0) {
			preloadPrevImage = new Image();
			preloadPrevImage.src = this.slideArray[this.activeSlide - 1][0];
		}
	} else {
		if ((this.imageArray.length - 1) > this.activeImage) {
			preloadNextImage = new Image();
			preloadNextImage.src = this.imageArray[this.activeImage + 1][0];
		}
		if(this.activeImage > 0) {
			preloadPrevImage = new Image();
			preloadPrevImage.src = this.imageArray[this.activeImage - 1][0];
		}
	}
};
LyteBox.prototype.togglePlayPause = function(hideID, showID) {
	if (this.isSlideshow && hideID == "lbPause") {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	this.doc.getElementById(hideID).style.display = 'none';
	this.doc.getElementById(showID).style.display = '';
	if (hideID == "lbPlay") {
		this.isPaused = false;
		if (this.activeSlide == (this.slideArray.length - 1)) {
			this.end();
		} else {
			this.changeContent(this.activeSlide + 1);
		}
	} else {
		this.isPaused = true;
	}
};
LyteBox.prototype.end = function(caller) {
	var closeClick = (caller == 'slideshow' ? false : true);
	if (this.isSlideshow && this.isPaused && !closeClick) { return; }
	this.disableKeyboardNav();
	this.doc.getElementById('lbMain').style.display = 'none';
	this.fade('lbOverlay', (this.doAnimations ? this.maxOpacity : 0));
	this.toggleSelects('visible');
	if (this.hideFlash) { this.toggleFlash('visible'); }
	if (this.isSlideshow) {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	if (this.isLyteframe) {
		 this.initialize();
	}
};
LyteBox.prototype.checkFrame = function() {
	if (window.parent.frames[window.name] && (parent.document.getElementsByTagName('frameset').length <= 0)) {
		this.isFrame = true;
		this.lytebox = "window.parent." + window.name + ".myLytebox";
		this.doc = parent.document;
	} else {
		this.isFrame = false;
		this.lytebox = "myLytebox";
		this.doc = document;
	}
};
LyteBox.prototype.getPixelRate = function(cur, img) {
	var diff = (img > cur) ? img - cur : cur - img;
	if (diff >= 0 && diff <= 100) { return 10; }
	if (diff > 100 && diff <= 200) { return 15; }
	if (diff > 200 && diff <= 300) { return 20; }
	if (diff > 300 && diff <= 400) { return 25; }
	if (diff > 400 && diff <= 500) { return 30; }
	if (diff > 500 && diff <= 600) { return 35; }
	if (diff > 600 && diff <= 700) { return 40; }
	if (diff > 700) { return 45; }
};
LyteBox.prototype.appear = function(id, opacity) {
	var object = this.doc.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + (opacity + 10) + ")";
	if (opacity == 100 && (id == 'lbImage' || id == 'lbIframe')) {
		try { object.removeAttribute("filter"); } catch(e) {}	/* Fix added for IE Alpha Opacity Filter bug. */
		this.updateDetails();
	} else if (opacity >= this.maxOpacity && id == 'lbOverlay') {
		for (var i = 0; i < this.overlayTimerCount; i++) { window.clearTimeout(this.overlayTimerArray[i]); }
		return;
	} else if (opacity >= 100 && id == 'lbDetailsContainer') {
		try { object.removeAttribute("filter"); } catch(e) {}	/* Fix added for IE Alpha Opacity Filter bug. */
		for (var i = 0; i < this.imageTimerCount; i++) { window.clearTimeout(this.imageTimerArray[i]); }
		this.doc.getElementById('lbOverlay').style.height = this.getPageSize()[1] + "px";
	} else {
		if (id == 'lbOverlay') {
			this.overlayTimerArray[this.overlayTimerCount++] = setTimeout("myLytebox.appear('" + id + "', " + (opacity+20) + ")", 1);
		} else {
			this.imageTimerArray[this.imageTimerCount++] = setTimeout("myLytebox.appear('" + id + "', " + (opacity+10) + ")", 1);
		}
	}
};
LyteBox.prototype.fade = function(id, opacity) {
	var object = this.doc.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
	if (opacity <= 0) {
		try {
			object.display = 'none';
		} catch(err) { }
	} else if (id == 'lbOverlay') {
		this.overlayTimerArray[this.overlayTimerCount++] = setTimeout("myLytebox.fade('" + id + "', " + (opacity-20) + ")", 1);
	} else {
		this.timerIDArray[this.timerIDCount++] = setTimeout("myLytebox.fade('" + id + "', " + (opacity-10) + ")", 1);
	}
};
LyteBox.prototype.resizeW = function(id, curW, maxW, pixelrate, speed) {
	if (!this.hDone) {
		this.resizeWTimerArray[this.resizeWTimerCount++] = setTimeout("myLytebox.resizeW('" + id + "', " + curW + ", " + maxW + ", " + pixelrate + ")", 100);
		return;
	}
	var object = this.doc.getElementById(id);
	var timer = speed ? speed : (this.resizeDuration/2);
	var newW = (this.doAnimations ? curW : maxW);
	object.style.width = (newW) + "px";
	if (newW < maxW) {
		newW += (newW + pixelrate >= maxW) ? (maxW - newW) : pixelrate;
	} else if (newW > maxW) {
		newW -= (newW - pixelrate <= maxW) ? (newW - maxW) : pixelrate;
	}
	this.resizeWTimerArray[this.resizeWTimerCount++] = setTimeout("myLytebox.resizeW('" + id + "', " + newW + ", " + maxW + ", " + pixelrate + ", " + (timer+0.02) + ")", timer+0.02);
	if (parseInt(object.style.width) == maxW) {
		this.wDone = true;
		for (var i = 0; i < this.resizeWTimerCount; i++) { window.clearTimeout(this.resizeWTimerArray[i]); }
	}
};
LyteBox.prototype.resizeH = function(id, curH, maxH, pixelrate, speed) {
	var timer = speed ? speed : (this.resizeDuration/2);
	var object = this.doc.getElementById(id);
	var newH = (this.doAnimations ? curH : maxH);
	object.style.height = (newH) + "px";
	if (newH < maxH) {
		newH += (newH + pixelrate >= maxH) ? (maxH - newH) : pixelrate;
	} else if (newH > maxH) {
		newH -= (newH - pixelrate <= maxH) ? (newH - maxH) : pixelrate;
	}
	this.resizeHTimerArray[this.resizeHTimerCount++] = setTimeout("myLytebox.resizeH('" + id + "', " + newH + ", " + maxH + ", " + pixelrate + ", " + (timer+.02) + ")", timer+.02);
	if (parseInt(object.style.height) == maxH) {
		this.hDone = true;
		for (var i = 0; i < this.resizeHTimerCount; i++) { window.clearTimeout(this.resizeHTimerArray[i]); }
	}
};
LyteBox.prototype.getPageScroll = function() {
	if (self.pageYOffset) {
		return this.isFrame ? parent.pageYOffset : self.pageYOffset;
	} else if (this.doc.documentElement && this.doc.documentElement.scrollTop){
		return this.doc.documentElement.scrollTop;
	} else if (document.body) {
		return this.doc.body.scrollTop;
	}
};
LyteBox.prototype.getPageSize = function() {	
	var xScroll, yScroll, windowWidth, windowHeight;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = this.doc.scrollWidth;
		yScroll = (this.isFrame ? parent.innerHeight : self.innerHeight) + (this.isFrame ? parent.scrollMaxY : self.scrollMaxY);
	} else if (this.doc.body.scrollHeight > this.doc.body.offsetHeight){
		xScroll = this.doc.body.scrollWidth;
		yScroll = this.doc.body.scrollHeight;
	} else {
		xScroll = this.doc.getElementsByTagName("html").item(0).offsetWidth;
		yScroll = this.doc.getElementsByTagName("html").item(0).offsetHeight;
		xScroll = (xScroll < this.doc.body.offsetWidth) ? this.doc.body.offsetWidth : xScroll;
		yScroll = (yScroll < this.doc.body.offsetHeight) ? this.doc.body.offsetHeight : yScroll;
	}
	if (self.innerHeight) {
		windowWidth = (this.isFrame) ? parent.innerWidth : self.innerWidth;
		windowHeight = (this.isFrame) ? parent.innerHeight : self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowWidth = this.doc.documentElement.clientWidth;
		windowHeight = this.doc.documentElement.clientHeight;
	} else if (document.body) {
		windowWidth = this.doc.getElementsByTagName("html").item(0).clientWidth;
		windowHeight = this.doc.getElementsByTagName("html").item(0).clientHeight;
		windowWidth = (windowWidth == 0) ? this.doc.body.clientWidth : windowWidth;
		windowHeight = (windowHeight == 0) ? this.doc.body.clientHeight : windowHeight;
	}
	var pageHeight = (yScroll < windowHeight) ? windowHeight : yScroll;
	var pageWidth = (xScroll < windowWidth) ? windowWidth : xScroll;
	return new Array(pageWidth, pageHeight, windowWidth, windowHeight);
};
LyteBox.prototype.toggleFlash = function(state) {
	var objects = this.doc.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++) {
		objects[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	var embeds = this.doc.getElementsByTagName("embed");
	for (var i = 0; i < embeds.length; i++) {
		embeds[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	if (this.isFrame) {
		for (var i = 0; i < parent.frames.length; i++) {
			try {
				objects = parent.frames[i].window.document.getElementsByTagName("object");
				for (var j = 0; j < objects.length; j++) {
					objects[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
			try {
				embeds = parent.frames[i].window.document.getElementsByTagName("embed");
				for (var j = 0; j < embeds.length; j++) {
					embeds[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
		}
	}
};
LyteBox.prototype.toggleSelects = function(state) {
	var selects = this.doc.getElementsByTagName("select");
	for (var i = 0; i < selects.length; i++ ) {
		selects[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	if (this.isFrame) {
		for (var i = 0; i < parent.frames.length; i++) {
			try {
				selects = parent.frames[i].window.document.getElementsByTagName("select");
				for (var j = 0; j < selects.length; j++) {
					selects[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
		}
	}
};
LyteBox.prototype.pause = function(numberMillis) {
	var now = new Date();
	var exitTime = now.getTime() + numberMillis;
	while (true) {
		now = new Date();
		if (now.getTime() > exitTime) { return; }
	}
};
if (window.addEventListener) {
	window.addEventListener("load",initLytebox,false);
} else if (window.attachEvent) {
	window.attachEvent("onload",initLytebox);
} else {
	window.onload = function() {initLytebox();}
}
function initLytebox() { myLytebox = new LyteBox(); }

//---------------------------------------------aedips- glassbox----------------------------------------

/**
 * @name glassbox
 * @overview  Javascript User Interface (UI) Library
 
 * @homepage <a href="http://www.glassbox-js.com">www.glassbox-js.com</a>
 * @status development 
 * @version 2.0.0
 * @last&nbsp;mod 2009/02/23

 * @supported<br/>browsers 
   Internet Explorer 6 higher <br/>
   Firefox 1.5 higher <br/>
   Opera 9.x higher <br/>
   Safari 2.x higher <br/>

 * @author Uli Preuss</a>
 * @copyright &copy; 2006-2009 <a href="http://www.glassbox-js.com">glassbox-js</a>
 
 * @licence The MIT License:
   <br/><br/>
   Permission is hereby granted, free of charge, to any person obtaining a copy 
   of this software and associated documentation files (the "Software"), to deal 
   in the Software without restriction, including without limitation the rights 
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
   copies of the Software, and to permit persons to whom the Software is 
   furnished to do so, subject to the following conditions:
   <br/><br/> 
   The above copyright notice and this permission notice shall be included in all 
   copies or substantial portions of the Software.
   <br/><br/> 
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
   SOFTWARE.
   <br/><br/>
*/

/* Configuration */
var path_to_glassbox = "scripts/";
var path_to_background_images = "images/backgrounds/";

// You must define path to root directory in any html-pages outside the root directory
// Relative path (for example "../")
var path_to_root_dir = ""; // Default
var mypath_to_background_images = ""; // Default
/* End Configuration */

if ( typeof(GlassBox) == 'undefined' ) {
  /** 
  * @constructor 
  * @desc GlassBox object
  * @example
  * var myBox = new GlassBox();
  */ 
  var GlassBox = function() {
 
    THIS = this,
    /** 
    * @memberOf GlassBox
    * @desc GlassBox Version
    * @type string
    * @example
    * alert( myBox.version );
    */
    this.version = "2.0.0",
    this.version_comment = "Modified: open/close glassbox, Fixed: IE7 PNG Bug and a lot more ..",
    /** 
    * @memberOf GlassBox
    * @desc Date of last modification
    * @type string
    * @example
    * alert( myBox.last_mod );
    */
    this.last_mod = "2009/02/23",
  
    this.bb_hor = "",
    this.bb_ver = "",
    this.skin_path =  path_to_root_dir + path_to_glassbox + "skins/",
    this.skin_default = "default",
    
    this.gb_path = path_to_root_dir + path_to_glassbox,
	this.img_bg_path = mypath_to_background_images != "" 
		? mypath_to_background_images : path_to_root_dir + path_to_background_images,
    
    this.multicontent_arr = new Array(),
    this.exists = false,
    this.is_false = true,
    this.dblclick = true,
	this.isvscreen = false;  
	   
    this.is_IE = /MSIE (5\.5|6|7)/.test( navigator.userAgent ),
    this.is_Opera = /Opera/.test( navigator.userAgent ),
                
    /** 
    * @memberOf GlassBox
    * @desc Object Initialization 
    * @param {string} id Id of the XHTML element 
    * @param {string} width Width of the new GlassBox (use CSS property values)
    * @param {string} height Height of the new GlassBox (use CSS property values)
    * @param {string} overflow Overflow/Scrollbars (use CSS property values)
    * @param {string} skinname Name of the Border Style (default, white, ..)
    * @param {string} multicontent_num (optional) Number of XHTML element 
    * @example
    * myBox.init( 'myBox', '150px', '270px', 'hidden', 'white' );
    */
    this.init = function( id, width, height, overflow, skinname, resize, dblclick, multicontent_num ) {

      this.id = id;
      if($( this.id + "_contentBoxBg" ) != null) {
      	this.remove();
      }
      if( this.exists == false ) {
        this.width = width;
        this.height = height;
        this.overflow = overflow;
      
        if( resize != null && resize != "" ) {
          if( resize == false ) this.resize = false;
          else if( resize == true ) this.resize = true;
        }
        if( dblclick == false ) this.dblclick = false;
        else if( dblclick == true ) this.dblclick = true;
        
        if( skinname != null && skinname != "" ) this.skinfolder = this.skin_path + skinname;
        else this.skinfolder = this.skin_path + this.skin_default;
      
        // No user skin 
        if(this.bb_hor == "" || this.bb_ver == "") {
          if( skinname == "facebookstyle" ) {
            this.bb_hor = "25px";
            this.bb_ver = "25px";          
          }
          else if( skinname == "greyline" ) {
            this.bb_hor = "25px";
            this.bb_ver = "27px";
          }
          else { // Default skin
            this.bb_hor = "25px";
            this.bb_ver = "21px";
          }
        }
        
        this.glassbox = $( this.id );
    
        if( multicontent_num != null ) {
          if( this.is_false == true ) {
            var pageArray = new Array();
            var className = "glassbox_mc";
            var divs = document.getElementsByTagName("div");
            var pattern = new RegExp( "\\b" + className + "\\b" );
            for ( i = 0, j = 0; i < divs.length; i++ ) {
              if ( pattern.test( divs[i].className ) ) {
                pageArray[j] = divs[i];
                j++;
              }
            }
            this.header = "<h1>" + pageArray[0].getElementsByTagName( "h1" )[0].innerHTML + "</h1>";
            for( i=0;i< pageArray.length;i++ ) {
              this.multicontent_arr[i] = pageArray[i].innerHTML;
            }
            this.glassboxContent = this.multicontent_arr[0];
            this.is_false = false;
          }
          else {
            if( multicontent_num == 1 ) {
              this.glassboxContent = this.multicontent_arr[ multicontent_num-1 ];
            }
            else {
              this.glassboxContent = this.header + this.multicontent_arr[ multicontent_num-1 ];
            }
          }
        }
        else {
          if(typeof this.glassboxContent == "undefined") {
            this.glassboxContent = this.glassbox.innerHTML;
          }
        }
        if(this.glassbox != null) {
          this.glassbox.innerHTML = "";
        }

        this.glassboxWidth = parseInt( this.width );
        this.boxborder_lr1 = parseInt( this.bb_hor );
	    if(isNaN(this.glassboxWidth)) {
			this.content_width = "auto";
			this.glassboxWidth = "auto";
		}
        else this.content_width = this.glassboxWidth - ( 2 * this.boxborder_lr1 ) + "px" ;

        this.glassboxHeight = parseInt( this.height );
        this.boxborder_tb1 = parseInt( this.bb_ver );
	    if(isNaN(this.glassboxHeight)) {
			this.content_height = "auto";
			this.glassboxHeight = "auto";
		}
        else this.content_height = this.glassboxHeight - ( 2 * this.boxborder_tb1 ) + "px" ;

        var sd = getScreenDimensions ();  
        this.screenWidth = sd.screenWidth;
        this.screenHeight = sd.screenHeight;
      }
    },
    
    /** 
    * @memberOf GlassBox
    * @desc Full vertical size (height)
    * @param {string} left Position left (use CSS property values) 
    * @param {string} margin Margin (use CSS property values)
    * @example
    * myBox.vscreen( '50px', '5px' );
    */
    this.vscreen = function( left, margin ){
      this.isvscreen = true;      
      this.glassboxHeight = this.screenHeight - ( parseInt( margin ) * 2 );
      this.boxborder_tb1 = parseInt( this.bb_ver );
      this.content_height = this.glassboxHeight - ( 2 * this.boxborder_tb1 ) + "px" ;
      this.glassbox.style.position = "absolute";
      this.glassbox.style.left = left;
      this.glassbox.style.top = parseInt( margin ) + "px";    
      this.createGlassbox();
    },
    
    /** 
    * @memberOf GlassBox
    * @desc inline position
    * @example
    * myBox.ipos();
    */
    this.ipos = function(){
      this.createGlassbox();
    },
    
    /** 
    * @memberOf GlassBox
    * @desc Absolute position
    * @param {string} left Position left (use CSS property values) 
    * @param {string} top Position top (use CSS property values)
    * @example
    * myBox.apos( '690px', '35px' );
    */
    this.apos = function( left, top ){
      this.glassbox.style.position = "absolute";
      this.glassbox.style.left = left;
      this.glassbox.style.top = top;
      this.createGlassbox();
    },
    
    /** 
    * @memberOf GlassBox
    * @desc Display object as a lightbox (with overlay)
    * @param {bool} exitbut Display exit button
    * @param {string} opac (optional) Opacity (use CSS property values)
    * @example
    * myBox.lbo( true, 0.50 ); 
    */
    this.lbo = function( exitbut, opac ){
     if( this.exists != true ) {
        if( opac ) {
          this.overlay = document.createElement( "div" );
          this.overlay.setAttribute( "id", this.id + "_overlay" );
          this.overlay.style.position = "absolute";
          this.overlay.style.backgroundColor = "#000000";
          this.overlay.style.left = "0px";
          this.overlay.style.top = "0px";
          this.overlay.style.width = this.screenWidth + "px";
          this.overlay.style.height = this.screenHeight + "px";
          this.overlay.style.opacity = opac;
          this.overlay.style.filter = "alpha( opacity=" + opac * 100 + " )";
          this.overlay.style.zIndex = 999;
          this.overlay.style.display = "block";
          var htmlbody = document.getElementsByTagName( "body" )[0];
          htmlbody.appendChild( this.overlay );
        }
        if( exitbut != false ) {
          var exitButton = document.createElement( "div" );
          exitButton.setAttribute( "id","exitButton" );
          exitButton.style.position = "absolute";
          exitButton.style.left = this.glassboxWidth - 39 + "px";
          exitButton.style.top = 23 + "px";
          exitButton.style.zIndex = 1001;
          exitButton.title = "close";
          this.glassbox.appendChild( exitButton );
    
          var exitLink = document.createElement( "a" );
          exitLink.href = "javascript:THIS.fade();";
          exitButton.appendChild( exitLink );
    
          var exitImage = document.createElement( "img" );
          exitImage.setAttribute( "id", "exitImage" );
          exitImage.style.border = 0;
          exitImage.src = this.skin_path + "exitButton.png";
          exitLink.appendChild( exitImage );
    
          if(typeof Effect != 'undefined') {
            new Effect.Appear( "exitButton" );
          }
          else {
            $( "exitButton" ).style.display = "block";
          }
        }
        //this.glassbox.style.cursor = "pointer";
        //this.glassbox.style.cursor = "hand";
        this.glassbox.style.position = "absolute";
        this.glassbox.style.left = Math.round( ( this.screenWidth - this.glassboxWidth ) / 2 ) + "px";
        this.glassbox.style.top = Math.round( ( this.screenHeight - this.glassboxHeight ) / 2 ) + "px";
        this.glassbox.style.zIndex = 1000;
        this.glassbox.style.minWidth = this.glassboxWidth + "px";
    
        this.createGlassbox();
        this.exists = true;
      }
      else {
        $( this.id + "_overlay" ).style.display = "block";
      }
      this.appear();
    },
    
    /** 
    * @memberOf GlassBox
    * @desc Effect.Appear
    * @example
    * myBox.fade();
    */
    this.appear = function( ms ){
      if(typeof Effect != 'undefined') {
        this.glassbox.style.display = "none";
        new Effect.Appear( this.id );
      }
      else{
        this.glassbox.style.display = "block";
      }
      /** 
      * @private 
      */
      this.glassbox.ondblclick = function () {
        if(THIS.dblclick == true) THIS.fade();
      };
      if( ms ) {
        setTimeout( "THIS.fade()", ms );
      }
    },
  
    /** 
    * @memberOf GlassBox
    * @desc Effect.Fade
    * @param {number} ms (optional) Only for a period of time (in milliseconds)
    * @example
    * myBox.appear(3000);
    */
    this.fade = function(){
      if(typeof Effect != 'undefined') {
        new Effect.Fade( THIS.id , {
          afterFinish: function() { 
            THIS.remove() 
          }
        });
        if($( THIS.id + "_overlay" )) {
          new Effect.Fade( THIS.id + "_overlay", { 
            afterFinish: function() { 
          	  this.overlay = $( THIS.id + "_overlay" );
          	  this.overlay.parentNode.removeChild( this.overlay );
            }
          });  
        }
      }
     else {
        $( THIS.id ).style.display = "none";
        if($( THIS.id + "_overlay" )) {
          $( THIS.id + "_overlay" ).style.display = "none";
        }
        this.remove();
      }
    },

    /** 
    * @private 
    */
    this.remove = function(){
      //this.glassbox.parentNode.removeChild(this.glassbox);
      $( this.id ).innerHTML = $( this.id + "_content" ).innerHTML;
    },

    /** 
    * @memberOf GlassBox
    * @desc Draggable Object
    * @example
    * myBox.draggable();
    */
    this.draggable = function(title){
      try { // .. if Scriptaculous library is included
        new Draggable( this.id );
        this.glassbox.title = title;
      }
      catch(e) {}
    },

    /** 
    * @memberOf GlassBox
    * @desc Sets the z-index of the object
    * @param {string} zindex Only for a period of time (in milliseconds)
    * @example
    * myBox.zindex('100');
    */
    this.zindex = function( zindex ){
      this.glassbox.style.zIndex = zindex;
    },
    
    /** 
    * @private 
    */
    this.noro = function( rightmargin ){ //no right overflow
      if( rightmargin == null ) rightmargin = 0;
      var leftMarginScreen = this.screenWidth - ( parseInt( this.glassbox.style.left) + parseInt( this.glassboxWidth ) );
      if( leftMarginScreen < 0 ) {
        this.glassbox.style.left = ( parseInt( this.glassbox.style.left ) + leftMarginScreen + rightmargin + 14 ) + "px";
      }
    },
    
    /** 
    * @private 
    */
    this.createGlassbox = function(){

      var toprow = document.createElement( "div" );
      toprow.setAttribute( "id", this.id + "_toprow" );
      toprow.style.width = this.glassboxWidth;
      toprow.style.minWidth = this.glassboxWidth + "px";
      this.glassbox.appendChild( toprow );

      var topleft = document.createElement( "div" );
      topleft.setAttribute( "id", this.id + "_topleft" );
      topleft.style.width = this.bb_hor;
      topleft.style.height = this.bb_ver;
      topleft.style.cssFloat = "left";
      topleft.style.styleFloat = "left";
      topleft.style.backgroundImage = "url( " + this.skinfolder + "/topleft.png )";
      if ( this.is_IE  ){ 
        topleft.style.filter = this.iepngfix(this.skinfolder + "/topleft.png");
        topleft.style.backgroundImage = "none";
      }
      toprow.appendChild( topleft );
    
      var top = document.createElement( "div" );
      top.setAttribute( "id", this.id + "_top" );
      top.style.width = this.content_width;
      top.style.height = this.bb_ver;
      top.style.cssFloat = "left";
      top.style.styleFloat = "left";
      top.style.backgroundImage = "url( " + this.skinfolder + "/top.png )";
      if ( this.is_IE  ){ 
        top.style.filter = this.iepngfix(this.skinfolder + "/top.png");
        top.style.backgroundImage = "none";
      }
      toprow.appendChild( top );
    
      var topright = document.createElement( "div" );
      topright.setAttribute( "id", this.id + "_topright" );
      topright.style.width = this.bb_hor;
      topright.style.height = this.bb_ver;
      topright.style.cssFloat = "left";
      topright.style.styleFloat = "left";
      topright.style.backgroundImage = "url( " + this.skinfolder + "/topright.png )";
      if ( this.is_IE  ){ 
        topright.style.filter = this.iepngfix(this.skinfolder + "/topright.png");
        topright.style.backgroundImage = "none";
      }
      toprow.appendChild( topright );
      
      var clear = document.createElement( "div" );
      clear.style.clear = "both";
      this.glassbox.appendChild( clear );
    
      var middlerow = document.createElement( "div" );
      middlerow.setAttribute( "id", this.id + "_middlerow" );
      middlerow.style.width = this.glassboxWidth;
      this.glassbox.appendChild( middlerow );

      var left = document.createElement( "div" );
      left.setAttribute( "id", this.id + "_left" );
      left.style.width = this.bb_hor;
      left.style.height = this.content_height;
      left.style.cssFloat = "left";
      left.style.styleFloat = "left";
      left.style.backgroundImage = "url( " + this.skinfolder + "/left.png )";
      if ( this.is_IE  ){ 
        left.style.filter = this.iepngfix(this.skinfolder + "/left.png");
        left.style.backgroundImage = "none";
      }
      middlerow.appendChild( left );
    
      // Content
    
      var contentBox = document.createElement( "div" );
      contentBox.setAttribute( "id", this.id + "_contentBox" );
      contentBox.style.width = this.content_width;
      contentBox.style.height = this.content_height;
      contentBox.style.cssFloat = "left";
      contentBox.style.styleFloat = "left";
      middlerow.appendChild( contentBox );
    
      var contentBoxBg = document.createElement( "div" );
      contentBoxBg.setAttribute( "id", this.id + "_contentBoxBg" );
      contentBoxBg.style.width = "100%";
      contentBoxBg.style.height = "100%";
      contentBoxBg.style.overflow = this.overflow;
      contentBoxBg.style.backgroundColor = "#ffffff";
      contentBox.appendChild( contentBoxBg );
      this.contentBoxBg = contentBoxBg;    
    
      var content = document.createElement( "div" );
      content.setAttribute( "id", this.id + "_content" );
      content.innerHTML = this.glassboxContent;
      contentBoxBg.appendChild( content );
      this.content = content; 
      
      // End Content
    
      var right = document.createElement( "div" );
      right.style.width = this.bb_hor;
      right.style.height = this.content_height;
      right.style.cssFloat = "left";
      right.style.styleFloat = "left";
      right.setAttribute( "class", "boxmiddle" );
      right.setAttribute( "id", this.id + "_right" );
      right.style.backgroundImage = "url( " + this.skinfolder + "/right.png )";
      if ( this.is_IE  ){ 
        right.style.filter = this.iepngfix(this.skinfolder + "/right.png");
        right.style.backgroundImage = "none";
      }
      middlerow.appendChild( right );
    
      var clear = document.createElement( "div" );
      clear.style.clear = "both";
      this.glassbox.appendChild( clear );
    
      var bottomrow = document.createElement( "div" );
      bottomrow.setAttribute( "id", this.id + "_bottomrow" );
      bottomrow.style.width = this.glassboxWidth;
      this.glassbox.appendChild( bottomrow );

      var bottomleft = document.createElement( "div" );
      bottomleft.setAttribute( "id",  this.id + "_bottomleft" );
      bottomleft.style.width = this.bb_hor;
      bottomleft.style.height = this.bb_ver;
      bottomleft.style.cssFloat = "left";
      bottomleft.style.styleFloat = "left";
      bottomleft.style.backgroundImage = "url( " + this.skinfolder + "/bottomleft.png )";
      if ( this.is_IE  ){ 
        bottomleft.style.filter = this.iepngfix(this.skinfolder + "/bottomleft.png");
        bottomleft.style.backgroundImage = "none";
      }
      bottomrow.appendChild( bottomleft );
      
      var bottom = document.createElement( "div" );
      bottom.setAttribute( "id", this.id + "_bottom" );
      bottom.style.width = this.content_width;
      bottom.style.height = this.bb_ver;
      bottom.style.cssFloat = "left";
      bottom.style.styleFloat = "left";
      bottom.style.backgroundImage = "url( " + this.skinfolder + "/bottom.png )";
      if ( this.is_IE  ){ 
        bottom.style.filter = this.iepngfix(this.skinfolder + "/bottom.png");
        bottom.style.backgroundImage = "none";
      }
      bottomrow.appendChild( bottom );
    
      var bottomright = document.createElement( "div" );
      bottomright.setAttribute( "id", this.id + "_bottomright" );
      bottomright.style.width = this.bb_hor;
      bottomright.style.height = this.bb_ver;
      bottomright.style.cssFloat = "left";
      bottomright.style.styleFloat = "left";
      bottomright.style.backgroundImage = "url( " + this.skinfolder + "/bottomright.png )";
      if ( this.is_IE ){ 
        bottomright.style.filter = this.iepngfix(this.skinfolder + "/bottomright.png");
        bottomright.style.backgroundImage = "none";
      }
      bottomrow.appendChild( bottomright );
    
      var clear = document.createElement( "div" );
      clear.style.clear = "both";
      this.glassbox.appendChild( clear );      

      if(this.isvscreen == false ) this.adjustBoxBorder();
      
    },
    
    /** 
    * @public 
    */  
    this.adjustBoxBorder = function() { 
    	   
      var top = $(this.id + "_top");
      var bottom = $(this.id + "_bottom");
      var left = $(this.id + "_left");
      var right = $(this.id + "_right");
      var content = $(this.id + "_content");
      var contentWidth = parseFloat(getElementProperty(content, 'width'));
      var contentHeight = parseFloat(getElementProperty(content, 'height'));
      var skinWidth = parseInt(this.bb_ver);
      var skinHeight = parseInt(this.bb_hor);
      var paddingTop = parseFloat(getElementProperty(content, 'padding-top'));
      var paddingRight = parseFloat(getElementProperty(content, 'padding-right'));
      var paddingBottom = parseFloat(getElementProperty(content, 'padding-bottom'));
      var paddingLeft = parseFloat(getElementProperty(content, 'padding-left'));
      
      if ( this.is_IE ) { 
        if(this.width == "auto" || this.width == "") {
          top.style.width = bottom.style.width = contentWidth - skinWidth + "px";
          contentBox.style.width = contentWidth - skinWidth + "px";
        }
        if(this.height == "auto" || this.height == "") {
          left.style.height = right.style.height = contentHeight - parseInt(this.bb_hor) + "px";
          contentBox.style.height = contentHeight - parseInt(this.bb_hor) + "px";
        }
      }
      else if ( this.is_Opera ){   
        if( parseFloat(navigator.appVersion) < 9.5) {
          if(this.width == "auto" || this.width == "") {
            top.style.width = bottom.style.width = contentWidth + "px";
          }
          if(this.height == "auto" || this.height == "") {
            left.style.height = right.style.height = contentHeight + "px";
          }
        }
        else if( parseFloat(navigator.appVersion) >= 9.5) {
          if(this.width == "auto" || this.width == "") {
            top.style.width = bottom.style.width = 
                contentWidth + paddingLeft + paddingRight  + "px";
          // Opera 9.5 ??
          // contentBox.style.width = contentWidth - skinWidth + "px";
          }
          if(this.height == "auto" || this.height == "") {
            left.style.height = right.style.height = 
                contentHeight + paddingTop + paddingLeft + "px";
            // Opera 9.5 ??
            // contentBox.style.height = contentHeight - skinHeight + "px";
          }
        }
      }
      else { // FF, Safari
        if(this.width == "auto" || this.width == "") {
          top.style.width = bottom.style.width = 
              contentWidth + paddingLeft + paddingRight  + "px";
        }
        if(this.height == "auto" || this.height == "") {
          left.style.height = right.style.height = 
              contentHeight + paddingTop + paddingLeft + "px";
        }
      }
    },

    /** 
    * @private 
    */
    this.iepngfix = function( bgimg ) {
      return 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + bgimg + '", sizingMethod="scale")';
    },
    
    /** 
    * @private 
    */
    this.backgroundImage = function( num ){
      try { // ..find and load background image
        var htmlbody = document.getElementsByTagName( "body" )[0];
        htmlbody.style.background ="url( " + this.img_bg_path + "bg" + num +".jpg )";
      }
      catch(e) {}
    },
  
    /** 
    * @private 
    */
    window.onresize = function () {
      if(THIS.resize == true) {
        var sd = getScreenDimensions ();  
        THIS.glassbox.style.left = Math.round( ( sd.screenWidth - THIS.glassboxWidth ) / 2 ) + "px";
        THIS.glassbox.style.top = Math.round( ( sd.screenHeight - THIS.glassboxHeight ) / 2 ) + "px";  
        if(THIS.overlay != undefined){
          THIS.overlay.style.width = sd.screenWidth + "px";
          THIS.overlay.style.height = sd.screenHeight + "px";
        }
      }
    }
  }
}

/** 
* @public 
*/
function GETrequest( url, target_id, callback_id ) {
  try {
    req = window.XMLHttpRequest ? new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
  } 
  catch (e) { /* No AJAX Support */ }
  req.onreadystatechange = function () {
    if ((req.readyState == 4) && (req.status == 200)) {
      if(target_id && $( target_id )) $( target_id ).innerHTML = req.responseText;
      if(callback_id) GETrequest_callbackHandler(callback_id);
    }  
  }
  req.open( 'GET', url );
  req.send( null ); 
}

/** 
* @private 
*/
function getScreenDimensions (){
  if (window.innerHeight) {
    screenWidth = window.innerWidth;
    screenHeight = window.innerHeight;
  } 
  else if ( document.documentElement.clientHeight ) {
    screenWidth = document.documentElement.clientWidth;
    screenHeight = document.documentElement.clientHeight;
  }
  else if ( document.body.clientHeight ) {
    screenWidth = document.body.clientWidth;
    screenHeight = document.body.clientHeight;
  }
  return {
    "screenWidth": screenWidth, 
    "screenHeight": screenHeight 
  }
}


/** 
* @private 
*/
// Garrett Smith
// Reading Style Values
// http://dhtmlkitchen.com/learn/js/setstyle/index4.jsp
function getElementProperty(el, style) {
   if ( /MSIE (5\.5|6\.)/.test( navigator.userAgent )){ 
	   el = $(el);
   }
   var value = el.style[toCamelCase(style)];
   if(!value) {
      if(document.defaultView)
         value = document.defaultView.getComputedStyle(el, "").getPropertyValue(style);
      else if(el.currentStyle)
		 	value = IE_computedStyle.get(el, toCamelCase(style));
      return value;
   }
}
function toCamelCase(s) {
	for(var exp = toCamelCase.exp; 
		exp.test(s); s = s.replace(exp, RegExp.$1.toUpperCase()) );
	return s;
}
toCamelCase.exp = /-([a-z])/;

/** 
* @private 
*/
// Matt Murphy
// An IE getComputedStyle Method for Block Elements
// http://www.matts411.com/webdev/an_ie_getcomputedstyle_method_for_block_elements
var IE_computedStyle = function () {
    var styleEl;

	var getPadding = function (which) {
        return grabLength(styleEl.currentStyle["padding" + which]) + "px";
    };

	var getWidth = function () {
        var width = styleEl.offsetWidth; /* Currently the width including padding + border */
        width -= parseInt(getPadding("Right"));
        width -= parseInt(getPadding("Left"));
       return width + "px";
    };
    
    var getHeight = function () {
        var height = styleEl.offsetHeight; /* Currently the height including padding + border */
        height -= parseInt(getPadding("Top"));
        height -= parseInt(getPadding("Bottom"));
         return height + "px";
    };
    
    var grabLength = function (length) {
        var temp = document.createElement("DIV");
        temp.style.width = length;
        styleEl.parentNode.appendChild(temp);
        length = Math.round(temp.offsetWidth);
        styleEl.parentNode.removeChild(temp);
        return length;
    };
    
    return {
        get : function (el, styleProp) {   
            var rValue;
            styleEl = (typeof(el) === "string") ? $(el) : el;	
            var styleProp = (typeof(styleProp) === "string") ? styleProp.toLowerCase() : "";
            styleProp = styleProp.replace(/\-/g, "");
            
            switch (styleProp) { /* Run through the valid css properties, return undefined if none match */
                case "width": rValue = getWidth(); break;
                case "height": rValue = getHeight(); break;
            }
            return rValue;
        }
    };
}();

/** 
* @public 
*/
if ( typeof($) == 'undefined' ) {
  $ = function (id) {
    return document.getElementById(id);
  }
}


 


//---------------------------------------------aedips----------------------------------------

var xmlhttp;
var xmlhttp1;
   
function send_mail()
{
	xmlhttp1=GetXmlHttpObject();
	var captcha = document.getElementById("security_code").value;
	var urlcaptcha = "captcha/check.php?security_code="+captcha;
	
	xmlhttp1.onreadystatechange=stateChanged1; 
	xmlhttp1.open("GET",urlcaptcha,true);
	xmlhttp1.send(null);
	
	
}

function stateChanged()
{
	if (xmlhttp.readyState==4)
	  {

	 if(xmlhttp.responseText=="Your Message Has Been Sent")
 {	 
	var myBox = new GlassBox();
	myBox.init( 'result2', '500px', '100px', 'hidden', 'white', true, true );
	myBox.lbo( false, 0.50 ); 
	myBox.appear(3000);

	document.getElementById("name").value ="";
	document.getElementById("email").value = "";
	document.getElementById("subject").value ="";
	document.getElementById("message").value= "";
	document.getElementById("security_code").value= "";
	new_captcha();
	}else{
	
	var myBox = new GlassBox();
	myBox.init( 'result', '500px', '100px', 'hidden', 'white', true, true );
	myBox.lbo( false, 0.50 ); 
	myBox.appear(3000);
		
	}
   	  }
}

function stateChanged1()
{
	if (xmlhttp1.readyState==4)
	  {
	  var res = xmlhttp1.responseText;
	  if(res=="NOT"){
	  
	  var myBox = new GlassBox();
	myBox.init( 'result1', '500px', '100px', 'hidden', 'white', true, true );
	myBox.lbo( false, 0.50 ); 
	myBox.appear(3000);
	new_captcha();
	
	  }else{
	  var name = document.getElementById("name").value;
	var email = document.getElementById("email").value;
	var subject = document.getElementById("subject").value;
	var message = document.getElementById("message").value;

	
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
	  {
	  alert ("Your browser does not support XMLHTTP!");
	  return;
	  }
	var url="email/aedips_mail.php?"; 
	url +="name="+name+"&subject="+subject+"&email="+email+"&message="+message;
	xmlhttp.onreadystatechange=stateChanged; // put the page
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	 
	  }
	  
	  }
}


function GetXmlHttpObject()
// set the xmlhttp according to browser.
{
	if (window.XMLHttpRequest)
	  {
	  //  IE7+, Firefox, Chrome, Opera, Safari
	  return new XMLHttpRequest();
	  }
	if (window.ActiveXObject)
	  {
	  //  IE6, IE5
	  return new ActiveXObject("Microsoft.XMLHTTP");
	  }
	return null;
}

function new_captcha()
{
var c_currentTime = new Date();
var c_miliseconds = c_currentTime.getTime();

document.getElementById('captcha').src = 'captcha/image.php?x='+ c_miliseconds;
}

function init(){
		
		var aedips_bodys = document.getElementsByClassName('aedips_body'); //div that stretches
		var toggles = document.getElementsByClassName('aedips_menu'); //h3s where I click on

		//accordion effect
		var myAccordion = new fx.Accordion(
			toggles, aedips_bodys, {opacity: true, height: true, duration: 400}
		);
		myAccordion.showThisHideOpen(aedips_bodys[0]);
		//hash functions
		var found = false;
		toggles.each(function(h3, i){
			var div = Element.find(h3, 'nextSibling'); //element.find is located in prototype.lite
			if (window.location.href.indexOf(h3.title) > 0) {
				myAccordion.showThisHideOpen(div);
				found = true;
			}
		});
		if (!found) myAccordion.showThisHideOpen(aedips_bodys[0]);
}

window.onload = function () {
                var r = Raphael("holder", 300, 300),
                    R = 100,
                    param = {stroke: "#fff", "stroke-width": 15},
                    html = [
                        document.getElementById("h"),
                        document.getElementById("m"),
                        document.getElementById("s"),
                        document.getElementById("d"),
                        document.getElementById("mnth"),
                        document.getElementById("ampm")
                    ];
 
                // r.image("raphael-white-bg.png", 140, 140, 320, 320).attr({opacity: .5});
                var sec = r.path(param).moveTo(150, 150 - R).arcTo(R, R, 0, 1, 150, 150 - R);
                R = 80;
                var min = r.path(param).moveTo(150, 150 - R).arcTo(R, R, 0, 1, 150, 150 - R);
                R = 60;
                var hor = r.path(param).moveTo(150, 150 - R).arcTo(R, R, 0, 1, 150, 150 - R);
                R = 40;
                var day = r.path(param).moveTo(150, 150 - R).arcTo(R, R, 0, 1, 150, 150 - R);
                R = 20;
                var mon = r.path(param).moveTo(150, 150 - R).arcTo(R, R, 0, 1, 150, 150 - R);
                var pm = r.circle(150, 150, 8).attr({stroke: "none", fill: Raphael.hsb2rgb(15 / 200, 1, .75).hex});
                html[5].style.color = Raphael.hsb2rgb(15 / 200, 1, .75).hex;
 
                function updateVal(value, total, R, hand, id) {
                    var alpha = 360 / total * value,
                        a = (90 - alpha) * Math.PI / 180,
                        x = 150 + R * Math.cos(a),
                        y = 150 - R * Math.sin(a),
                        color = Raphael.hsb2rgb(R / 100, value / total, .75).hex,
                        path = Raphael.parsePathString(hand.attr("path"));
                    path[1][4] = (alpha > 180 ? 1 : 0);
                    path[1][6] = x;
                    path[1][7] = y;
                    hand.attr({stroke: color, path: path.join(",")});
                    html[id].innerHTML = (value < 10 ? "0" : "") + value;
                    html[id].style.color = color;
                }
 
                (function () {
                    var d = new Date();
                    var am = (d.getHours() < 12);
                    var h = d.getHours() % 12 || 12;
					updateVal(d.getSeconds(), 60, 100, sec, 2);
                    updateVal(d.getMinutes(), 60, 80, min, 1);
                    updateVal(h, 12, 60, hor, 0);
                    updateVal(d.getDate(), 31, 40, day, 3);
                    updateVal(d.getMonth() + 1, 12, 20, mon, 4);
                    pm[(am ? "hide" : "show")]();
                    html[5].innerHTML = am ? "AM" : "PM";
                    r.safari();
                    setTimeout(arguments.callee, 1000);
                })();
            };
