var canvascheck=document.createElement("canvas");var isIE=window.navigator.systemLanguage&&(!document.documentMode||document.documentMode<9)?1:0;var isVM=isIE&&document.namespaces?1:0;var isJG=0;var isCV=canvascheck.getContext?1:0;var jg=new Array();if(isVM){if(document.namespaces.v==null){var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet();for(var i=0;i<e.length;i++){s.addRule("v\\:"+e[i],"behavior: url(#default#VML); antialias: true;")}document.namespaces.add("v","urn:schemas-microsoft-com:vml")}}function showCoords(f,d,a,g,b,c){}function getClasses(d,c){var a="";for(var b=0;b<d.length;b++){if(d[b]!=c){if(a){a+=" "}a+=d[b]}}return a}function getClassValue(d,c){var a=0;var f=c.length;for(var b=0;b<d.length;b++){if(d[b].indexOf(c)==0){a=Math.min(d[b].substring(f),100);break}}return Math.max(0,a)}function getClassRGBColor(f,k,g){var n,b=g,m=k.length;for(var h=0;h<f.length;h++){if(f[h].indexOf(k)==0){n=f[h].substring(m);b=n.toLowerCase();break}}if(!b.match(/^[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)){b=g||"000000"}if(!isCV){return b}else{function c(j){return(Math.max(0,Math.min(parseInt(j,16),255)))}var l=c(b.substr(0,2)),a=c(b.substr(2,2)),d=c(b.substr(4,2));return l+","+a+","+d}}function getClassAttribute(d,c){var a=0;var f=c.length;for(var b=0;b<d.length;b++){if(d[b].indexOf(c)==0){a=1;break}}return a}function getMaps(k){var d=document.getElementsByTagName("img");var b=new Array();var h=0;var f="";var c;var a;var g=0;var l="";for(h=0;h<d.length;h++){c=d[h];a=c.className.split(" ");for(g=0;g<a.length;g++){if(a[g]==k){f=c.useMap.split("#");if(f[1]!=""&&f[1].length>=1){l=document.getElementsByName(f[1]);if(l){b.push(c);break}}}}}return b}function fadeCanvas(c,a){var b=document.getElementById(c);if(b.fading==1&&a<=100){b.style.opacity=a/100;a+=10;window.setTimeout("fadeCanvas('"+c+"',"+a+")",10)}}function setAreaOver(G,K,m,q,B,w,R,A){var W,Q,P,S,T,L,U,M,N,I,E,F,D,C,J,O=0,H="",I=G.getAttribute("rel"),g,h=document.getElementById(K);if(I!=null){S=I.split(",");E=S.unshift(G.id)}else{S=new Array(G.id)}function V(){if(N.indexOf("forcegroup")!=-1){O=getClassAttribute(F,"forcegroup")}else{O=0}if(N.indexOf("iopacity")!=-1){L=getClassValue(F,"iopacity")/100}else{L=B}if(N.indexOf("iborder")!=-1){U=getClassRGBColor(F,"iborder",m)}else{U=m}if(N.indexOf("icolor")!=-1){T=getClassRGBColor(F,"icolor",q)}else{T=q}if(N.indexOf("noborder")!=-1){M=getClassAttribute(F,"noborder")}else{M=w}}if(isVM){for(W=0;W<S.length;W++){G=document.getElementById(S[W]);if(G){J="",N=G.className,F=N.split(" "),E=G.coords.split(",");if(O==0){V()}if(G.shape.toLowerCase()=="rect"){H+='<v:rect strokeweight="1" filled="t" stroked="'+(M<1?"t":"f")+'" strokecolor="#'+U+'" style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+parseInt(E[0])+"px;top:"+parseInt(E[1])+"px;width:"+parseInt(E[2]-E[0])+"px;height:"+parseInt(E[3]-E[1])+'px;"><v:fill color="#'+T+'" opacity="'+L+'" /></v:rect>'}else{if(G.shape.toLowerCase()=="circle"){H+='<v:oval strokeweight="1" filled="t" stroked="'+(M<1?"t":"f")+'" strokecolor="#'+U+'" style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+parseInt(E[0]-E[2])+"px;top:"+parseInt(E[1]-E[2])+"px;width:"+(parseInt(E[2])*2)+"px;height:"+(parseInt(E[2])*2)+'px;"><v:fill color="#'+T+'" opacity="'+L+'" /></v:oval>'}else{for(P=2;P<E.length;P+=2){J+=parseInt(E[P])+","+parseInt(E[P+1])+","}H+='<v:shape strokeweight="1" filled="t" stroked="'+(M<1?"t":"f")+'" strokecolor="#'+U+'" coordorigin="0,0" coordsize="'+h.width+","+h.height+'" path="m '+parseInt(E[0])+","+parseInt(E[1])+" l "+J+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+h.width+"px;height:"+h.height+'px;"><v:fill color="#'+T+'" opacity="'+L+'" /></v:shape>'}}}}h.innerHTML=H}else{if(isCV){if(R<1){h.fading=0;h.style.opacity=0}g=h.getContext("2d");for(W=0;W<S.length;W++){G=document.getElementById(S[W]);if(G){N=G.className,F=N.split(" "),E=G.coords.split(",");if(O==0){V()}g.beginPath();if(G.shape.toLowerCase()=="rect"){g.rect(0.5+parseInt(E[0]),0.5+parseInt(E[1]),parseInt(E[2]-E[0]),parseInt(E[3]-E[1]));g.closePath()}else{if(G.shape.toLowerCase()=="circle"){g.arc(0.5+parseInt(E[0]),0.5+parseInt(E[1]),parseInt(E[2]),0,(Math.PI/180)*360,false)}else{g.moveTo(parseInt(E[0]),parseInt(E[1]));for(P=2;P<E.length;P+=2){g.lineTo(parseInt(E[P]),parseInt(E[P+1]))}g.closePath()}}g.fillStyle="rgba("+T+","+L+")";g.strokeStyle="rgba("+U+",1)";g.fill();if(M<1){g.stroke()}}}if(R<1){h.fading=1;fadeCanvas(K,0)}}else{L=B;N=G.className;F=N.split(" ");if(N.indexOf("forcegroup")!=-1){O=getClassAttribute(F,"forcegroup");if(O!=0){if(N.indexOf("iopacity")!=-1){L=getClassValue(F,"iopacity")/100;O=0}}}if(isIE){h.style.filter="Alpha(opacity="+(L*100)+")"}else{h.style.opacity=L;h.style.MozOpacity=L;h.style.KhtmlOpacity=L}for(W=0;W<S.length;W++){G=document.getElementById(S[W]);if(G){N=G.className,F=N.split(" "),E=G.coords.split(",");if(O==0){if(N.indexOf("forcegroup")!=-1){O=getClassAttribute(F,"forcegroup")}else{O=0}if(N.indexOf("icolor")!=-1){T=getClassRGBColor(F,"icolor",q)}else{T=q}}jg[A].setColor("#"+T);if(G.shape.toLowerCase()=="rect"){jg[A].fillRect(parseInt(E[0]),parseInt(E[1]),parseInt(E[2]-E[0])+1,parseInt(E[3]-E[1])+1)}else{if(G.shape.toLowerCase()=="circle"){jg[A].fillEllipse(parseInt(E[0]-E[2]),parseInt(E[1]-E[2]),parseInt(E[2])*2+1,parseInt(E[2])*2+1)}else{D=new Array();C=new Array();Q=0;for(P=0;P<E.length;P+=2){D[Q]=parseInt(E[P]);C[Q]=parseInt(E[P+1]);Q++}jg[A].fillPolygon(D,C)}}jg[A].paint()}}}}}function setAreaOut(d,h,c,g){var a=document.getElementById(h);if(isVM){a.innerHTML=""}else{if(isJG){jg[g].clear()}else{if(isCV){var b=a.getContext("2d");b.clearRect(0,0,a.width,a.height)}}}}function getCoords(C,u,E,v,j,g,k,z,q,D){var l,r,f,d,B,A,c,b,p=0,m=0;if(!C){C=window.event}if(C.pageX||C.pageY){p=C.pageX;m=C.pageY}B=C.clientX;A=C.clientY;if(self.pageXOffset||self.pageYOffset){f=self.pageXOffset;if(f>0&&p==B){B-=f}d=self.pageYOffset;if(d>0&&m==A){A-=d}}else{if(document.documentElement){f=document.documentElement.scrollLeft;d=document.documentElement.scrollTop}else{if(document.body){f=document.body.scrollLeft;d=document.body.scrollTop}}}if(document.body.scrollHeight!=D||document.body.scrollWidth!=q){var r=document.getElementById(v);var l=findPosXY(r);j=l.x;g=l.y}c=Math.min(Math.max(B+f-j,0),k);b=Math.min(Math.max(A+d-g,0),z);showCoords(u,E,c,b,k,z)}function findPosXY(b){var a;var c={x:b.offsetLeft,y:b.offsetTop};if(b.offsetParent){a=findPosXY(b.offsetParent);c.x+=a.x;c.y+=a.y}return c}function roundedRect(d,c,h,g,b,a,f){if(!f){d.beginPath()}d.moveTo(c,h+a);d.lineTo(c,h+b-a);d.quadraticCurveTo(c,h+b,c+a,h+b);d.lineTo(c+g-a,h+b);d.quadraticCurveTo(c+g,h+b,c+g,h+b-a);d.lineTo(c+g,h+a);d.quadraticCurveTo(c+g,h,c+g-a,h);d.lineTo(c+a,h);d.quadraticCurveTo(c,h,c,h+a);if(!f){d.closePath()}}function getRadius(b,d,a){var c=(Math.min(d,a)/100);b=Math.max(Math.min(100,b/c),0);return b+"%"}function addMapper(){var a=getMaps("mapper");var E,U,l,k,S,g,q,m,A,H;var N="",T="",p="",P,J,I,F,R,O,M,C,B,G,L,v,u,z,K,D,Q;for(J=0;J<a.length;J++){E=a[J];U=E.parentNode;if(E.id==""){E.id="gmipam_"+J}U.style.position=(U.style.position=="static"||U.style.position==""?"relative":U.style.position);U.style.height=E.height+"px";U.style.width=E.width+"px";U.style.padding=0+"px";U.style.MozUserSelect="none";U.style.KhtmlUserSelect="none";U.unselectable="on";C=0;G=0;L=0;R="0000ff";O="000000";F=33;if(isCV){k=document.createElement("canvas")}else{if(isVM){k=document.createElement(['<var style="zoom:1;overflow:hidden;display:block;width:'+E.width+"px;height:"+E.height+'px;padding:0;">'].join(""))}else{k=document.createElement("div")}}k.id=E.id+"_canvas";N=E.className.split(" ");C=getClassValue(N,"iradius");F=getClassValue(N,"iopacity");R=getClassRGBColor(N,"iborder","0000ff");O=getClassRGBColor(N,"icolor","000000");G=getClassAttribute(N,"noborder");L=getClassAttribute(N,"nofade");M=getClassAttribute(N,"showcoords");F=F==0?0.33:F/100;C=parseInt(Math.min(Math.min(E.width/4,E.height/4),C));T=getClasses(N,"mapper");E.className=T;m=E.useMap.split("#");m=m[1];q=document.getElementsByName(m);if(q.length>0){for(I=0;I<q[0].areas.length;I++){if(q[0].areas[I].shape.match(/(rect|poly|circle)/i)){if(window.opera||q[0].areas[I].coords!=""){if(q[0].areas[I].id==""){q[0].areas[I].id=m+"_"+I}if(isVM||isIE){p=q[0].areas[I].onmouseover;if(p!=null){P=String(p);p=(P.indexOf("function")>=0?P.match(/\{([^}]+)\}/):P);p=(typeof(p)=="object"?p[1]:p)}q[0].areas[I].onmouseover=new Function('setAreaOver(this,"'+k.id+'","'+R+'","'+O+'","'+F+'",'+G+","+L+","+J+");"+p);p=q[0].areas[I].onmouseout;if(p!=null){P=String(p);p=(P.indexOf("function")>=0?P.match(/\{([^}]+)\}/):P);p=(typeof(p)=="object"?p[1]:p)}q[0].areas[I].onmouseout=new Function('setAreaOut(this,"'+k.id+'",'+L+","+J+");"+p)}else{p=q[0].areas[I].getAttribute("onmouseover");q[0].areas[I].setAttribute("onmouseover","setAreaOver(this,'"+k.id+"','"+R+"','"+O+"','"+F+"',"+G+","+L+","+J+");"+p);p=q[0].areas[I].getAttribute("onmouseout");q[0].areas[I].setAttribute("onmouseout","setAreaOut(this,'"+k.id+"',"+L+","+J+");"+p)}}}}}k.style.height=E.height+"px";k.style.width=E.width+"px";k.height=E.height;k.width=E.width;k.left=0;k.top=0;k.style.position="absolute";k.style.left=0+"px";k.style.top=0+"px";k.fading=0;E.className="";E.style.cssText="";E.left=0;E.top=0;E.style.position="absolute";E.style.height=E.height+"px";E.style.width=E.width+"px";E.style.left=0+"px";E.style.top=0+"px";E.style.MozUserSelect="none";E.style.KhtmlUserSelect="none";E.unselectable="on";if(isIE){E.style.filter="Alpha(opacity=0)"}else{E.style.opacity=0;E.style.MozOpacity=0;E.style.KhtmlOpacity=0}if(isCV&&C>0){l=document.createElement("canvas")}else{if(isVM&&C>0){l=document.createElement(['<var style="zoom:1;overflow:hidden;display:block;width:'+E.width+"px;height:"+E.height+'px;padding:0;">'].join(""))}else{l=document.createElement("img");l.src=E.src}}l.id=E.id+"_image";l.left=0;l.top=0;l.style.position="absolute";l.style.height=E.height+"px";l.style.width=E.width+"px";l.style.left=0+"px";l.style.top=0+"px";U.insertBefore(k,E);S=document.createElement("div");S.id=m+"_blind";S.className="blind_area";S.left=0;S.top=0;S.style.position="absolute";S.style.height=E.height+"px";S.style.width=E.width+"px";S.style.left=0+"px";S.style.top=0+"px";S.innerHTML=" ";U.insertBefore(S,E);if(isCV){g=k.getContext("2d");g.clearRect(0,0,k.width,k.height)}else{if(!isVM&&!isCV){if(isIE){k.style.filter="Alpha(opacity="+(F*100)+")"}else{k.style.opacity=F;k.style.MozOpacity=F;k.style.KhtmlOpacity=F}if(typeof(window.jsGraphics)!=="undefined"){jg[J]=new jsGraphics(k);isJG=1}}}U.insertBefore(l,k);if(isCV&&C>0){l.height=E.height;l.width=E.width;g=l.getContext("2d");g.clearRect(0,0,l.width,l.height);roundedRect(g,0,0,l.width,l.height,C);g.clip();g.fillStyle="rgba(0,0,0,0)";g.fillRect(0,0,l.width,l.height);g.drawImage(E,0,0,l.width,l.height)}else{if(isVM&&C>0){l.height=E.height;l.width=E.width;C=getRadius(C,l.width,l.height);l.innerHTML='<v:roundrect arcsize="'+C+'" strokeweight="0" filled="t" stroked="f" fillcolor="#ffffff" style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:0px;top:0px;width:'+l.width+"px;height:"+l.height+'px;"><v:fill src="'+E.src+'" type="frame" /></v:roundrect>'}}if(M>0){A=document.getElementById(E.id);z=parseInt(E.width);K=parseInt(E.height);B=findPosXY(A);v=B.x;u=B.y;Q=document.body.scrollHeight;D=document.body.scrollWidth;if(isVM||isIE){p=E.onmousemove;if(p!=null){P=String(p);p=(P.indexOf("function")>=0?P.match(/\{([^}]+)\}/):P);p=(typeof(p)=="object"?p[1]:p)}E.onmousemove=new Function('getCoords(event,"'+m+'",0,"'+E.id+'",'+v+","+u+","+z+","+K+","+D+","+Q+");"+p)}else{p=E.getAttribute("onmousemove");E.setAttribute("onmousemove","getCoords(event,'"+m+"',0,'"+E.id+"',"+v+","+u+","+z+","+K+","+D+","+Q+");"+p)}if(q.length>0){for(I=0;I<q[0].areas.length;I++){if(q[0].areas[I].shape.match(/(rect|poly|circle)/i)){if(window.opera||q[0].areas[I].coords!=""){H=q[0].areas[I].id;if(isVM||isIE){p=q[0].areas[I].onmousemove;if(p!=null){P=String(p);p=(P.indexOf("function")>=0?P.match(/\{([^}]+)\}/):P);p=(typeof(p)=="object"?p[1]:p)}q[0].areas[I].onmousemove=new Function('getCoords(event,"'+m+'","'+H+'","'+E.id+'",'+v+","+u+","+z+","+K+","+D+","+Q+");"+p)}else{p=q[0].areas[I].getAttribute("onmousemove");q[0].areas[I].setAttribute("onmousemove","getCoords(event,'"+m+"','"+H+"','"+E.id+"',"+v+","+u+","+z+","+K+","+D+","+Q+");"+p)}}}}}}}}if(window.attachEvent){window.attachEvent("onload",addMapper)}else{window.addEventListener("load",addMapper,false)};
