function isDefined(variable){return eval("(typeof("+variable+') != "undefined");')}function getClosure(D,A,B){function C(){D[A](B)}return C}function isString(A){if(typeof (A)=="string"){return true}else{if(typeof arguments[0]=="object"){return(arguments[0].constructor.toString().match(/string/i)!=null)}}}function toLower(A){A=A.replace(/A/g,"a");A=A.replace(/B/g,"b");A=A.replace(/C/g,"c");A=A.replace(/D/g,"d");A=A.replace(/E/g,"e");A=A.replace(/F/g,"f");A=A.replace(/G/g,"g");A=A.replace(/H/g,"h");A=A.replace(/I/g,"i");A=A.replace(/J/g,"j");A=A.replace(/K/g,"k");A=A.replace(/L/g,"l");A=A.replace(/M/g,"m");A=A.replace(/N/g,"n");A=A.replace(/O/g,"o");A=A.replace(/P/g,"p");A=A.replace(/Q/g,"q");A=A.replace(/R/g,"r");A=A.replace(/S/g,"s");A=A.replace(/T/g,"t");A=A.replace(/U/g,"u");A=A.replace(/V/g,"v");A=A.replace(/W/g,"w");A=A.replace(/X/g,"x");A=A.replace(/Y/g,"y");A=A.replace(/Z/g,"z");return A}function toUpper(A){A=A.replace(/a/g,"A");A=A.replace(/b/g,"B");A=A.replace(/c/g,"C");A=A.replace(/d/g,"D");A=A.replace(/e/g,"E");A=A.replace(/f/g,"F");A=A.replace(/g/g,"G");A=A.replace(/h/g,"H");A=A.replace(/i/g,"I");A=A.replace(/j/g,"J");A=A.replace(/k/g,"K");A=A.replace(/l/g,"L");A=A.replace(/m/g,"M");A=A.replace(/n/g,"N");A=A.replace(/o/g,"O");A=A.replace(/p/g,"P");A=A.replace(/q/g,"Q");A=A.replace(/r/g,"R");A=A.replace(/s/g,"S");A=A.replace(/t/g,"T");A=A.replace(/u/g,"U");A=A.replace(/v/g,"V");A=A.replace(/w/g,"W");A=A.replace(/x/g,"X");A=A.replace(/y/g,"Y");A=A.replace(/z/g,"Z");return A}function getQuotatedString(A){if(A&&(A.search('"')==-1)){return'"'+A+'"'}else{return"'"+A+"'"}}function isArray(A){if(typeof (A)=="object"){return(A.constructor.toString().match(/array/i)!=null)}else{return false}}function inArray(B,C){for(var A=0;A<C.length;A++){if(C[A]==B){return true}}return false}function getArrayIndex(B,C){for(var A=0;A<C.length;A++){if(C[A]==B){return A}}}function arrayToString(F,C,E,D){var A="";if(E==undefined){E=false}if(C==undefined){C=""}if(D==undefined){D=false}if(D){A+="["}for(var B=0;B<F.length;B++){if(B>0){A+=C}if(isString(F[B])&&E){A+=getQuotatedString(F[B])}else{if(isArray(F[B])){A+=arrayToString(F[B],C,E,D)}else{A+=F[B]}}}if(D){A+="]"}return A}function addEvent(A,C,B){if(A.addEventListener){A.addEventListener(C,B,false);return true}else{if(A.attachEvent){return A.attachEvent("on"+C,B)}else{return false}}}function getElementById(E,C){if(!C){return document.getElementById(E)}if(typeof (C)=="string"){var A=document.getElementById(C)}else{var A=C}if(A.id==E){return A}var D=A.firstChild;while(D){if(D.id==E){return D}else{var B=getElementById(E,D);if(B){return B}}D=D.nextSibling}return undefined}function getElementAttribute(C,A){var F=C.outerHTML.substring(1,C.outerHTML.length-1);var D=F.split(" ");for(var B=0;B<D.length;B++){var E=D[B].split("=");if(E[0]==A){return E[1]}}}function isElementLoaded(A){if(A.offsetWidth>0&&A.offsetHeight>0){return true}else{if(A.width>0&&A.height>0){return true}else{return false}}}function swapImage(B,C){var A=C.substring(C.length-3,C.length);if(((A=="png")||(A=="PNG"))&&(typeof (swapPNG)!="undefined")){swapPNG(B,C)}else{B.src=C}}function getImageSrc(A){if(A.src){return A.src}else{return A.filters(0).src}}function getWindowWidth(){if(document.body.offsetWidth){return document.body.offsetWidth}else{return window.innerWidth}}function getWindowHeight(){if(document.body.offsetHeight){return document.body.offsetHeight}else{return window.innerHeight}}function setStatus(A){window.status=A}function clearStatus(){window.status=""}function setWindowLocation(A){window.top.location.href=A}function getWindowLocation(){return window.top.location.href}function getBaseLocation(B){var A=B.split("?");return A[0]}function openDialogBox(G,D,A){var F=(screen.width-D)/2;var E=(screen.height-A)/2;var C="resizeable=no, status=no, toolbar=no, menubar=no, location=no, scrollbars=no, directories=no, dialog=yes";var B=window.open(G,"_blank","width="+D+", height="+A+", top="+E+", left="+F+", "+C);if(window.focus){B.focus()}return B}function getCSSStyle(A){for(i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].rules){for(j=0;j<document.styleSheets[i].rules.length;j++){if(document.styleSheets[i].rules[j].selectorText==A){return document.styleSheets[i].rules[j].style}}}else{for(j=0;j<document.styleSheets[i].cssRules.length;j++){if(document.styleSheets[i].cssRules[j].selectorText==A){return document.styleSheets[i].cssRules[j].style}}}}}var agt=navigator.userAgent.toLowerCase();var appVer=navigator.appVersion.toLowerCase();var isMinor=parseFloat(appVer);var isMajor=parseInt(isMinor);var iePos=appVer.indexOf("msie");if(iePos!=-1){isMinor=parseFloat(appVer.substring(iePos+5,appVer.indexOf(";",iePos)));isMajor=parseInt(isMinor)}var isKonq=false;var kqPos=agt.indexOf("konqueror");if(kqPos!=-1){isKonq=true;isMinor=parseFloat(agt.substring(kqPos+10,agt.indexOf(";",kqPos)));isMajor=parseInt(isMinor)}var isOpera=(agt.indexOf("opera")!=-1);var isKhtml=(isSafari||isKonq);var isIe=((iePos!=-1)&&(!isOpera)&&(!isKhtml));var isIe6up=(isIe&&isMinor>=6);var isGecko=((!isKhtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;var isSafari=((agt.indexOf("safari")!=-1)&&(agt.indexOf("mac")!=-1))?true:false;function createIEControl(C,E){var B=document.createElement("object");B.style.width=C.style.width;B.style.height=C.style.height;for(var D in E){B.setAttribute(D,E[D])}if(document.readyState=="complete"){if(C.parentNode){C.parentNode.replaceChild(B,C)}}else{var A=C;document.attachEvent("onreadystatechange",function(){if(document.readyState=="complete"){if(A.parentNode){A.parentNode.replaceChild(B,A)}}})}return B}function createMozillaControl(A,C){if(isSafari){return createSafariControl(A,C)}var D=document.createElement("embed");D.style.width=A.style.width;D.style.height=A.style.height;for(var B in C){D.setAttribute(B,C[B])}self.interval=window.setInterval(function(){if(isElementLoaded(A)){window.clearInterval(self.interval);if(A.parentNode){A.parentNode.replaceChild(D,A)}}},100);return D}function createSafariControl(A,D){var C="<embed";for(var B in D){C+=" "+B+'="'+D[B]+'"'}C+=">";A.innerHTML=C;return document[D.name]}var isWin=((agt.indexOf("win")!=-1)||(agt.indexOf("16bit")!=-1));var isMac=(agt.indexOf("mac")!=-1);if(!isWin&&!isMac){alert("Sorry - Hypercosm is only supported on Windows and the Macintosh");window.top.location="http://www.hypercosm.com/download/player/platform_error.html"}else{if(isIe6up){document.writeln('<script language="VBScript">');document.writeln("On Error Resume Next");document.writeln('Set theObject = CreateObject("HypercosmActivex.HyperX.1")');document.writeln("If IsObject(theObject) Then");document.writeln("hasHypercosm = true");document.writeln("Else");document.writeln("hasHypercosm = false");document.writeln("End If");document.writeln("<\/script>");if(!hasHypercosm){var button=confirm("The Hypercosm Player is needed to view this page.\nWould like to be redirected to the download page?");if(button==true){window.top.location="http://www.hypercosm.com/download/player/index.html"}}}else{if(isGecko||isSafari){hasHypercosm=false;for(i=0;i<navigator.plugins.length;i++){if(navigator.plugins[i].name.substring(0,9)=="Hypercosm"){hasHypercosm=true}}if(!hasHypercosm){var button=confirm("The Hypercosm 3D Player is needed to view this page.\nWould like to be redirected to the  Player's download page?");if(button==true){window.top.location="http://www.hypercosm.com/download/player/index.html"}}}else{window.top.location="http://www.hypercosm.com/download/player/browser_error.html"}}}var isIe=(navigator.appName=="Microsoft Internet Explorer");var ieVersion=parseFloat(navigator.appVersion.split("MSIE")[1]);var useCorrectedPNGFix=isIe&&(ieVersion>=5.5)&&(ieVersion<7);var correctingPNGImages=false;var correctedPNGImages=false;function correctPNG(D){if(!useCorrectedPNGFix){return }var G=D.src.toUpperCase();if(G.substring(G.length-3,G.length)=="PNG"){var E=(D.id)?"id='"+D.id+"' ":"";var H=(D.className)?"class='"+D.className+"' ":"";var C=(D.title)?"title='"+D.title+"' ":"title='"+D.alt+"' ";var F="display:inline-block;"+D.style.cssText;if(D.align=="left"){F="float:left;"+F}if(D.align=="right"){F="float:right;"+F}if(D.parentElement.href){F="cursor:hand;"+F}var A=D.width;var I=D.height;if(A==0){A=getElementAttribute(D,"width")}if(I==0){I=getElementAttribute(D,"height")}var B="<span "+E+H+C+' style="width:'+A+"px; height:"+I+"px;"+F+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+D.src+"', sizingMethod='image');\"></span>";D.outerHTML=B}}function correctPNGs(){if(!useCorrectedPNGFix){return }if(!correctingPNGImages){correctingPNGImages=true;for(var A=0;A<document.images.length;A++){correctPNG(document.images[A])}correctedPNGImages=true}}function swapPNG(A,B){if(useCorrectedPNGFix){A.filters(0).src=B}else{A.src=B}}function RGBColor(C,B,A){if(isNaN(C)){C=0}if(isNaN(B)){B=0}if(isNaN(A)){A=0}this.red=C;this.green=B;this.blue=A;return this}RGBColor.prototype.matches=function(A){if(A){return((this.red==A.red)&&(this.green==A.green)&&(this.blue==A.blue))}else{return false}};RGBColor.prototype.duplicate=function(){return new RGBColor(this.red,this.green,this.blue)};RGBColor.prototype.toString=function(){return this.red.toString()+","+this.green.toString()+","+this.blue.toString()};RGBColor.prototype.toHex=function(){var C=Math.floor(this.red);var B=Math.floor(this.green);var A=Math.floor(this.blue);if(C<0||isNaN(C)){C=0}if(C>255){C=255}if(B<0||isNaN(B)){B=0}if(B>255){B=255}if(A<0||isNaN(A)){A=0}if(A>255){A=255}C=C.toString(16);B=B.toString(16);A=A.toString(16);if(C.length<2){C="0"+C}if(B.length<2){B="0"+B}if(A.length<2){A="0"+A}return C+B+A};var red=new RGBColor(255,0,0);var green=new RGBColor(0,255,0);var blue=new RGBColor(0,0,255);var cyan=new RGBColor(0,255,255);var magenta=new RGBColor(255,0,255);var yellow=new RGBColor(255,255,0);var orange=new RGBColor(255,127,0);var black=new RGBColor(0,0,0);var white=new RGBColor(255,255,255);var grey=new RGBColor(127,127,127);function colorToNamedColor(A){if(A.matches(red)){return"red"}else{if(A.matches(green)){return"green"}else{if(A.matches(blue)){return"blue"}else{if(A.matches(cyan)){return"cyan"}else{if(A.matches(magenta)){return"magenta"}else{if(A.matches(yellow)){return"yellow"}else{if(A.matches(orange)){return"orange"}else{if(A.matches(black)){return"black"}else{if(A.matches(white)){return"white"}else{if(A.matches(grey)){return"grey"}else{return null}}}}}}}}}}}function namedColorToColor(A){if(A=="red"){return red}else{if(A=="green"){return green}else{if(A=="blue"){return blue}else{if(A=="cyan"){return cyan}else{if(A=="magenta"){return magenta}else{if(A=="yellow"){return yellow}else{if(A=="orange"){return orange}else{if(A=="black"){return black}else{if(A=="white"){return white}else{if(A=="grey"){return grey}else{return null}}}}}}}}}}}function HCVector2(A,B){if(isNaN(A)){A=0}if(isNaN(B)){B=0}this.x=A;this.y=B;return this}HCVector2.prototype.equals=function(A){if(A){return((this.x==A.x)&&(this.y==A.y))}else{return false}};HCVector2.prototype.duplicate=function(){return new HCVector2(this.x,this.y)};HCVector2.prototype.toPrecision=function(A){return this.x.toPrecision(A)+","+this.y.toPrecision(A)};HCVector2.prototype.add=function(A){this.x=this.x+A.x;this.y=this.y+A.y};HCVector2.prototype.subtract=function(A){this.x=this.x-A.x;this.y=this.y-A.y};HCVector2.prototype.multiplyBy=function(A){this.x=this.x*A.x;this.y=this.y*A.y};HCVector2.prototype.divideBy=function(A){this.x=this.x/A.x;this.y=this.y/A.y};HCVector2.prototype.scaleBy=function(A){this.x=this.x*A;this.y=this.y*A};HCVector2.prototype.plus=function(B){var A=this.x+B.x;var C=this.y+B.y;return new HCVector2(A,C)};HCVector2.prototype.minus=function(B){var A=this.x-B.x;var C=this.y-B.y;return new HCVector2(A,C)};HCVector2.prototype.times=function(B){var A=this.x*B.x;var C=this.y*B.y;return new HCVector2(A,C)};HCVector2.prototype.dividedBy=function(B){var A=this.x/B.x;var C=this.y/B.y;return new HCVector2(A,C)};HCVector2.prototype.scaledBy=function(B){var A=this.x*B;var C=this.y*B;return new HCVector2(A,C)};HCVector2.prototype.dot=function(A){return(this.x*A.x)+(this.y*A.y)};function HCVector3(A,C,B){if(isNaN(A)){A=0}if(isNaN(C)){C=0}if(isNaN(B)){B=0}this.x=A;this.y=C;this.z=B;return this}HCVector3.prototype.equals=function(A){if(A){return((this.x==A.x)&&(this.y==A.y)&&(this.z==A.z))}else{return false}};HCVector3.prototype.duplicate=function(){return new HCVector3(this.x,this.y,this.z)};HCVector3.prototype.toPrecision=function(A){return this.x.toPrecision(A)+","+this.y.toPrecision(A)+","+this.z.toPrecision(A)};HCVector3.prototype.add=function(A){this.x=this.x+A.x;this.y=this.y+A.y;this.z=this.z+A.z};HCVector3.prototype.subtract=function(A){this.x=this.x-A.x;this.y=this.y-A.y;this.z=this.z-A.z};HCVector3.prototype.multiplyBy=function(A){this.x=this.x*A.x;this.y=this.y*A.y;this.z=this.z*A.z};HCVector3.prototype.divideBy=function(A){this.x=this.x/A.x;this.y=this.y/A.y;this.z=this.z/A.z};HCVector3.prototype.scaleBy=function(A){this.x=this.x*A;this.y=this.y*A;this.z=this.z*A};HCVector3.prototype.plus=function(B){var A=this.x+B.x;var D=this.y+B.y;var C=this.z+B.z;return new HCVector3(A,D,C)};HCVector3.prototype.minus=function(B){var A=this.x-B.x;var D=this.y-B.y;var C=this.z-B.z;return new HCVector3(A,D,C)};HCVector3.prototype.times=function(B){var A=this.x*B.x;var D=this.y*B.y;var C=this.z*B.z;return new HCVector3(A,D,C)};HCVector3.prototype.dividedBy=function(B){var A=this.x/B.x;var D=this.y/B.y;var C=this.z/B.z;return new HCVector3(A,D,C)};HCVector3.prototype.scaledBy=function(B){var A=this.x*B;var D=this.y*B;var C=this.z*B;return new HCVector3(A,D,C)};HCVector3.prototype.dot=function(A){return(this.x*A.x)+(this.y*A.y)+(this.z*A.z)};HCVector3.prototype.cross=function(B){var A=(this.y*B.z)-(this.z*B.y);var D=(this.z*B.x)-(this.x*B.z);var C=(this.x*B.y)-(this.y*B.x);return new HCVector3(A,D,C)};HCVector3.prototype.parallel=function(A){var B=A.dot(A);if(B!=0){return A.scaledBy(this.dot(A)/B)}else{return this}};HCVector3.prototype.perpendicular=function(A){return this.minus(this.parallel(A))};HCVector3.prototype.length=function(){return Math.sqrt(this.dot(this))};HCVector3.prototype.rotateBy=function(F,E){var C=E.length();if(C!=0){var B=this.perpendicular(E);var A=(E.cross(B)).scaledBy(1/C);var K=this.parallel(E);var J=Math.cos(F*Math.PI/180);var H=Math.sin(F*Math.PI/180);var G=B.scaledBy(J);var I=A.scaledBy(H);var D=(G.plus(I)).plus(K);this.x=D.x;this.y=D.y;this.z=D.z}};HCVector3.prototype.rotatedBy=function(E,D){var C=D.length();if(C!=0){var B=this.perpendicular(D);var A=(D.cross(B)).scaledBy(1/C);var J=this.parallel(D);var I=Math.cos(E*Math.PI/180);var G=Math.sin(E*Math.PI/180);var F=B.scaledBy(I);var H=A.scaledBy(G);return(F.plus(H)).plus(J)}else{return this}};function getQueryString(){return window.top.location.search.substring(1)}function addQueryString(B,A){if(B&&A&&(A!=undefined)){return B+"&"+A}else{if(B){return B}else{return A}}}function getQueryVariable(E,A){if(!E){return undefined}var C=E.split("&");for(var B=0;B<C.length;B++){var D=C[B].split("=");if(D[0]==A){return D[1]}}return undefined}function getQueryVariables(G,A){if(!G){return new Array()}var F=new Array();var D=G.split("&");var C=0;for(var B=0;B<D.length;B++){var E=D[B].split("=");if(E[0]==A){F[C]=E[1];C+=1}}return F}function stringToURL(B){var A=B;A=A.replace(/%/g,"%25");A=A.replace(/ /g,"%20");A=A.replace(/~/g,"%7E");A=A.replace(/`/g,"%60");A=A.replace(/!/g,"%33");A=A.replace(/@/g,"%40");A=A.replace(/#/g,"%23");A=A.replace(/\$/g,"%24");A=A.replace(/\^/g,"%5E");A=A.replace(/&/g,"%26");A=A.replace(/\*/g,"%2A");A=A.replace(/\(/g,"%28");A=A.replace(/\)/g,"%29");A=A.replace(/-/g,"%2D");A=A.replace(/\+/g,"%2B");A=A.replace(/=/g,"%3D");A=A.replace(/{/g,"%7B");A=A.replace(/}/g,"%7D");A=A.replace(/\[/g,"%5B");A=A.replace(/]/g,"%5D");A=A.replace(/\|/g,"%7C");A=A.replace(/\\/g,"%5C");A=A.replace(/:/g,"%3A");A=A.replace(/;/g,"%3B");A=A.replace(/"/g,"%22");A=A.replace(/'/g,"%27");A=A.replace(/</g,"%3C");A=A.replace(/>/g,"%3E");A=A.replace(/,/g,"%2C");A=A.replace(/\./g,"%2E");A=A.replace(/\?/g,"%3F");A=A.replace(/\//g,"%2F");return A}function stringsToURLs(A){var B=new Array(A.length);for(var C=0;C<A.length;C++){B[C]=stringToURL(A[C])}return B}function URLToString(A){var B=A;B=B.replace(/%20/g," ");B=B.replace(/%7E/g,"~");B=B.replace(/%60/g,"`");B=B.replace(/%33/g,"!");B=B.replace(/%40/g,"@");B=B.replace(/%23/g,"#");B=B.replace(/%24/g,"$");B=B.replace(/%5E/g,"^");B=B.replace(/%26/g,"&");B=B.replace(/%2A/g,"*");B=B.replace(/%28/g,"(");B=B.replace(/%29/g,")");B=B.replace(/%2D/g,"-");B=B.replace(/%2B/g,"+");B=B.replace(/%3D/g,"=");B=B.replace(/%7B/g,"{");B=B.replace(/%7D/g,"}");B=B.replace(/%5B/g,"[");B=B.replace(/%5D/g,"]");B=B.replace(/%7C/g,"|");B=B.replace(/%5C/g,"\\");B=B.replace(/%3A/g,":");B=B.replace(/%3B/g,";");B=B.replace(/%22/g,'"');B=B.replace(/%27/g,"'");B=B.replace(/%3C/g,"<");B=B.replace(/%3C/g,">");B=B.replace(/%2C/g,",");B=B.replace(/%2E/g,".");B=B.replace(/%3F/g,"?");B=B.replace(/%2F/g,"/");B=B.replace(/%25/g,"%");return B}function URLsToStrings(B){var A=new Array(B.length);for(var C=0;C<B.length;C++){A[C]=URLToString(B[C])}return A}function textToURL(C){if(typeof (C)=="string"){return stringToURL(C)}else{if(C.length==1){return stringToURL(C[0])}else{var A="";for(var B=0;B<C.length;B++){A+=stringToURL(C[B]);if(B<C.length-1){A+="%12"}}return A}}}function URLToText(A){var F=A.split("%");var E=new Array();var B=1;E[B-1]=F[0];for(var C=1;C<F.length;C++){var D="%"+F[C].substring(0,2);if(D=="%12"){B+=1;E[B-1]=F[C].substring(2,F[C].length)}else{E[B-1]+=URLToString(D)+F[C].substring(2,F[C].length)}}return E}function HCOverlay(A){this.visible=false;if(A!=null){this.__proto__=A;this.index=HCOverlay.overlays.length;HCOverlay.overlays[this.index]=this}}HCOverlay.prototype.duplicate=function(){return new HCOverlay(this.__proto__)};HCOverlay.reset=function(){HCOverlay.overlays=new Array()};HCOverlay.overlays=new Array();function HCColoredOverlay(B,A){HCOverlay.call(this,B);if(A){this.color=new RGBColor(A.red,A.green,A.blue)}return this}HCColoredOverlay.prototype.setColor=function(A){this.color=A};HCColoredOverlay.prototype.getColor=function(){return this.color};HCColoredOverlay.prototype.duplicate=function(){return new HCColoredOverlay(this.__proto__,this.color)};function HCMarker(A,C,B){if(!B){B=new RGBColor(255,255,255)}HCColoredOverlay.call(this,HCMarker.prototype,B);this.location=A;this.icon=C;return this}HCMarker.prototype=new HCColoredOverlay();HCMarker.prototype.duplicate=function(){return new HCMarker(this.location,this.icon,this.color)};function HCIcon(B,D,C,A){this.imageName=B;this.hAlignment=D;this.vAlignment=C;this.iconAnchor=A;return this}function HCLine(B,A){HCColoredOverlay.call(this,HCLine.prototype,A);this.vertices=B;return this}HCLine.prototype=new HCColoredOverlay();HCLine.prototype.duplicate=function(){return new HCLine(this.vertices,this.color)};function HCCurve(B,C,A){HCColoredOverlay.call(this,HCCurve.prototype,A);this.steps=B;this.vertices=C;return this}HCCurve.prototype=new HCColoredOverlay();HCCurve.prototype.duplicate=function(){return new HCCurve(this.steps,this.vertices,this.color)};function HCText(G,A,F,E,D,C,B){HCColoredOverlay.call(this,HCText.prototype,D);this.text=G;this.location=A;this.hAlignment=F;this.vAlignment=E;this.font=C;this.attributes=B;return this}HCText.prototype=new HCColoredOverlay();HCText.prototype.duplicate=function(){return new HCText(this.text,this.location,this.hAlignment,this.vAlignment,this.color,this.font)};function HCLabel(D,C,A,B){HCColoredOverlay.call(this,HCLabel.prototype,B);this.text=D;this.anchorPoint=C;this.location=A;return this}HCLabel.prototype=new HCColoredOverlay();HCLabel.prototype.duplicate=function(){return new HCLabel(this.text,this.anchorPoint,this.location,this.color)};function component(A,B){if(!A){return this}if(typeof (A)=="string"){if(B){if(B.element){this.element=getElementById(A,B.element)}else{this.element=getElementById(A,B)}}else{this.element=document.getElementById(A)}}else{this.element=A}if(B&&B.addComponent){B.addComponent(this)}this.visible=(this.element!=undefined)&&(this.element.style.display!="none");return this}component.prototype.getTop=function(){var A=this;while(A.parent){A=A.parent}return A};component.prototype.getWidth=function(){if(this.element){if(this.element.offsetWidth!=0){return this.element.offsetWidth}else{if(this.element.width){return this.element.width}else{return this.element.getAttribute("width")}}}else{return 0}};component.prototype.getHeight=function(){if(this.element){if(this.element.offsetHeight!=0){return this.element.offsetHeight}else{if(this.element.height){return this.element.height}else{return this.element.getAttribute("height")}}}else{return 0}};component.prototype.getLeft=function(){var B=0;var A=this.element;if(A.offsetParent){do{B+=A.offsetLeft}while(A=A.offsetParent);return B}};component.prototype.getTop=function(){var B=0;var A=this.element;if(A.offsetParent){do{B+=A.offsetTop}while(A=A.offsetParent);return B}};component.prototype.setElement=function(A){if(this.element.parentNode){this.element.parentNode.replaceChild(A,this.element)}this.element=A};component.prototype.setVisible=function(A){this.visible=A;if(this.element){if(A){this.element.style.display="block"}else{this.element.style.display="none"}}};component.prototype.isVisible=function(){return this.visible&&(!this.parent||!this.parent.isVisible||this.parent.isVisible())};component.prototype.toggleVisible=function(){this.setVisible(!this.isVisible())};function componentGroup(B){this.components=new Array();if(B){for(var A=0;A<B.length;A++){this.addComponent(B[A])}}return this}componentGroup.prototype.addComponent=function(A){this.components[this.components.length]=A};componentGroup.prototype.getComponent=function(A){return this.components[A]};componentGroup.prototype.getComponents=function(){return this.components};componentGroup.prototype.call=function(A,C){for(var B=0;B<this.components.length;B++){if(this.components[B].__proto__==componentGroup.prototype){this.components[B].call(A,C)}else{if(this.components[B][A]){this.components[B][A](C)}}}};function container(A,C,B){component.call(this,A,B);this.componentGroup=new componentGroup(C);return this}container.prototype=new component();container.prototype.addComponent=function(A){this.componentGroup.addComponent(A);A.parent=this};container.prototype.getComponent=function(A){return this.componentGroup.getComponent(A)};container.prototype.getComponents=function(){return this.componentGroup.getComponents()};container.prototype.call=function(A,B){this.componentGroup.call(A,B)};function HC3dsMaxCamera(A,D,C,B){if(B==undefined){B=false}this.eye=A;this.lookAt=D;this.fov=C;this.orthographic=B;return this}HC3dsMaxCamera.prototype.getView=function(){if(this.orthographic){return"user"}else{return"perspective"}};HC3dsMaxCamera.prototype.equals=function(A){if((this.eye&&!A.eye)||(!this.eye&&A.eye)){return false}else{if((this.lookAt&&!A.lookAt)||(!this.lookAt&&A.lookAt)){return false}else{return((this.eye.equals(A.eye))&&(this.lookAt.equals(A.lookAt))&&(this.fov==A.fov)&&(this.orthographic==A.orthographic))}}};HC3dsMaxCamera.prototype.duplicate=function(){return new HC3dsMaxCamera(this.eye,this.lookAt,this.fov,this.orthographic)};HC3dsMaxCamera.prototype.parseQueryString=function(A){var E=getQueryVariable(A,"eye");if(E!=undefined){var F=E.split(",");var I=parseFloat(F[0]);var H=parseFloat(F[1]);var G=parseFloat(F[2]);this.eye=new HCVector3(I,H,G)}var B=getQueryVariable(A,"lookat");if(B!=undefined){var F=B.split(",");var I=parseFloat(F[0]);var H=parseFloat(F[1]);var G=parseFloat(F[2]);this.lookAt=new HCVector3(I,H,G)}var D=getQueryVariable(A,"fov");if(D!=undefined){this.fov=parseFloat(D)}var C=getQueryVariable(A,"orthographic");if(C!=undefined){this.orthographic=(C=="true")}};HC3dsMaxCamera.prototype.getQueryString=function(){var A=null;if(this.eye){A=addQueryString(A,"eye="+this.eye.toPrecision(4))}if(this.lookAt){A=addQueryString(A,"lookat="+this.lookAt.toPrecision(4))}if(this.fov){A=addQueryString(A,"fov="+this.fov.toFixed(0))}if(this.orthographic!=undefined){A=addQueryString(A,"orthographic="+this.orthographic)}return A};function HCMarkUp(C,B,A){if(!C){return }this.applet=C;this.paintColor=B;this.initialPaintColor=B;this.icons=A;this.overlays=new Array();HCMarkUp.markUpIndices[C.id]=HCMarkUp.markUps.length;HCMarkUp.markUps[HCMarkUp.markUps.length]=this;HCEvent.addListener(this.applet,"click",function(E,D){if(E&&E.url){window.open(E.url)}});HCEvent.addListener(this.applet,"mouseover",function(E,D){if(E&&E.url){setStatus(E.url)}});HCEvent.addListener(this.applet,"mouseout",function(E,D){setStatus("")});return this}HCMarkUp.prototype.setPaintColor=function(A){this.paintColor=A;this.applet.setPaintColor(A)};HCMarkUp.prototype.getPaintColor=function(){return this.paintColor};HCMarkUp.prototype.addOverlay=function(A,B,C){this.overlays[this.overlays.length]=A;if(B){A.layer=B}this.applet.addOverlay(A,B+1,C)};HCMarkUp.prototype.removeOverlay=function(A){var B=0,C=false;while(B<this.overlays.length){if(this.overlays[B]==A){C=true}else{if(C){if(B<this.overlays.length-1){this.overlays[B-1]=this.overlays[B]}else{this.overlays[B]=null}}}B++}if(C){this.applet.removeOverlay(A)}};HCMarkUp.prototype.hasOverlay=function(A){var C=false;var B=0;while((B<this.overlays.length)&&!C){if(this.overlays[B]==A){C=true}B++}return C};HCMarkUp.prototype.clearOverlays=function(){this.overlays=new Array();this.applet.clearOverlays()};HCMarkUp.prototype.getOverlay=function(A){return this.overlays[A]};HCMarkUp.prototype.parsePaintColorQueryString=function(F){var B=getQueryVariables(F,"color");if(B.length!=0){var E=B[B.length-1].split(",");if(E.length==1){this.applet.setPaintColor(namedColorToColor(E[0]))}else{var D=parseInt(E[0]);var C=parseInt(E[1]);var A=parseInt(E[2]);this.applet.setPaintColor(new RGBColor(D,C,A))}}};HCMarkUp.prototype.parseMarkerQueryString=function(B){var L=getQueryVariables(B,"marker");if(L!=undefined){for(var E=0;E<L.length;E++){var G=L[E].split(",");var J=parseFloat(G[0]);var I=parseFloat(G[1]);var H=parseFloat(G[2]);var K=new HCVector3(J,I,H);if(G[3]){var F=parseInt(G[3])}else{var F=0}if(G[4]){var A=URLToString(G[4])}var C=this.applet.getPaintColor();var D=new HCMarker(K,this.icons.getNextIcon(),C);this.addOverlay(D,F);if(A){D.url=A}}}};HCMarkUp.prototype.parseNoteQueryString=function(A){var K=getQueryVariables(A,"note");if(K!=undefined){for(var C=0;C<K.length;C++){var F=K[C].split(",");var I=parseFloat(F[0]);var H=parseFloat(F[1]);var G=parseFloat(F[2]);var J=new HCVector3(I,H,G);if(F[4]){var E=URLToString(F[3])}else{var E=""}if(F[3]){var D=parseInt(F[4])}else{var D=0}var B=new HCMarker(J,this.applet.parent.annotationToolbar.addStickyNoteButton.icon);this.addOverlay(B,D);B.note=E}}};HCMarkUp.prototype.parseLineQueryString=function(A){var K=getQueryVariables(A,"line");if(K!=undefined){for(var C=0;C<K.length;C++){var H=K[C].split(",");var F=Math.floor(H.length/3);var E=new Array(F);for(var C=0;C<E.length;C++){var J=parseFloat(H[C*3]);var I=parseFloat(H[C*3+1]);var G=parseFloat(H[C*3+2]);E[C]=new HCVector3(J,I,G)}if(H[F*3]){var D=parseInt(H[F*3])}else{var D=0}var B=this.applet.getPaintColor();this.addOverlay(new HCLine(E,B),D)}}};HCMarkUp.prototype.parseCurveQueryString=function(A){var L=getQueryVariables(A,"curve");if(L!=undefined){for(var C=0;C<L.length;C++){var H=L[C].split(",");var F=Math.floor(H.length/3);var E=new Array(F);var J=5;for(var C=0;C<E.length;C++){var K=parseFloat(H[C*3]);var I=parseFloat(H[C*3+1]);var G=parseFloat(H[C*3+2]);E[C]=new HCVector3(K,I,G)}if(H[F*3]){var D=parseInt(H[F*3])}else{var D=0}var B=this.applet.getPaintColor();this.addOverlay(new HCCurve(J,E,B),D)}}};HCMarkUp.prototype.parseTextQueryString=function(A){var J=getQueryVariables(A,"text");if(J!=undefined){for(var C=0;C<J.length;C++){var E=J[C].split(",");var K=URLToText(E[0]);var H=parseFloat(E[1]);var G=parseFloat(E[2]);var F=parseFloat(E[3]);var I=new HCVector3(H,G,F);if(E[4]){var D=parseInt(E[4])}else{var D=0}var B=this.applet.getPaintColor();this.addOverlay(new HCText(K,I,B),D,"HCMarkUp.getMarkUpById('"+this.applet.id+"').changeText")}}};HCMarkUp.prototype.parseLabelQueryString=function(B){var N=getQueryVariables(B,"label");if(N!=undefined){for(var G=0;G<N.length;G++){var I=N[G].split(",");var O=URLToText(I[0]);var C=parseFloat(I[1]);var K=parseFloat(I[2]);var F=parseFloat(I[3]);var A=parseFloat(I[4]);var J=parseFloat(I[5]);var E=parseFloat(I[6]);var M=new HCVector3(C,K,F);var L=new HCVector3(A,J,E);if(I[7]){var H=parseInt(I[7])}else{var H=0}var D=this.applet.getPaintColor();this.addOverlay(new HCLabel(O,M,L,D),H,"HCMarkUp.getMarkUpById('"+this.applet.id+"').changeText")}}};HCMarkUp.prototype.changeText=function(A,B){this.applet.getOverlay(A-1).text=B};HCMarkUp.prototype.parseOverlayQueryString=function(C){var B=C.split("=");var A=B[0];if(A=="color"){this.parsePaintColorQueryString(C)}else{if(A=="marker"){this.parseMarkerQueryString(C)}else{if(A=="note"){this.parseNoteQueryString(C)}else{if(A=="line"){this.parseLineQueryString(C)}else{if(A=="curve"){this.parseCurveQueryString(C)}else{if(A=="text"){this.parseTextQueryString(C)}else{if(A=="label"){this.parseLabelQueryString(C)}}}}}}}};HCMarkUp.prototype.parseQueryString=function(C){this.icons.toFirstIcon();var B=C.split("&");for(var A=0;A<B.length;A++){this.parseOverlayQueryString(B[A])}this.setPaintColor(this.applet.getPaintColor())};HCMarkUp.prototype.getPaintColorQueryString=function(B){var A=colorToNamedColor(B);if(A){return"color="+A}else{return"color="+B.toString()}};HCMarkUp.prototype.getMarkerQueryString=function(A){var B="marker=";B+=A.location.toPrecision(4);if(A.layer){B+=","+A.layer}else{B+=",0"}if(A.url){B+=","+stringToURL(A.url)}return B};HCMarkUp.prototype.getNoteQueryString=function(A){var B="note=";B+=A.location.toPrecision(4);B+=","+stringToURL(A.note);if(A.layer){B+=","+A.layer}else{B+=",0"}return B};HCMarkUp.prototype.getLineQueryString=function(A){var D="line=";for(var B=0;B<A.vertices.length;B++){var C=A.vertices[B];D+=C.toPrecision(3);if(B<A.vertices.length-1){D+=","}}if(A.layer){D+=","+A.layer}return D};HCMarkUp.prototype.getCurveQueryString=function(C){var D="curve=";for(var A=0;A<C.vertices.length;A++){var B=C.vertices[A];D+=B.toPrecision(3);if(A<C.vertices.length-1){D+=","}}if(C.layer){D+=","+C.layer}return D};HCMarkUp.prototype.getTextQueryString=function(A){var B="text=";if(typeof (A.text)=="string"){B+=stringToURL(A.text)}else{if(typeof (A.text)=="object"){B+=textToURL(A.text)}}B+=","+A.location.toPrecision(4);if(A.layer){B+=","+A.layer}return B};HCMarkUp.prototype.getLabelQueryString=function(A){var B="label=";if(typeof (A.text)=="string"){B+=stringToURL(A.text)}else{if(typeof (A.text)=="object"){B+=textToURL(A.text)}}B+=","+A.anchorPoint.toPrecision(4);B+=","+A.location.toPrecision(4);if(A.layer){B+=","+A.layer}return B};HCMarkUp.prototype.getOverlayQueryString=function(A){if(A.__proto__==HCMarker.prototype&&(A.note!=undefined)){return this.getNoteQueryString(A)}else{if(A.__proto__==HCMarker.prototype){return this.getMarkerQueryString(A)}else{if(A.__proto__==HCLine.prototype){return this.getLineQueryString(A)}else{if(A.__proto__==HCCurve.prototype){return this.getCurveQueryString(A)}else{if(A.__proto__==HCText.prototype){return this.getTextQueryString(A)}else{if(A.__proto__==HCLabel.prototype){return this.getLabelQueryString(A)}else{return null}}}}}}};HCMarkUp.prototype.getQueryString=function(){var D=null;var A=this.initialPaintColor;if(this.overlays.length>0){for(var C=0;C<this.overlays.length;C++){var B=this.getOverlay(C);if(B&&B.visible){if(B.color){if(!B.color.matches(A)){D=addQueryString(D,this.getPaintColorQueryString(B.color));A=B.color}}D=addQueryString(D,this.getOverlayQueryString(B))}}}if(!this.paintColor.matches(A)){D=addQueryString(D,this.getPaintColorQueryString(this.paintColor))}return D};HCMarkUp.getMarkUpById=function(A){return this.getMarkUpByIndex(HCMarkUp.markUpIndices[A])};HCMarkUp.getMarkUpByIndex=function(A){return HCMarkUp.markUps[A]};HCMarkUp.markUps=new Array();HCMarkUp.markUpIndices=new Array();function HCAlphabetIcons(A,B){if(!A){A="marker"}if(!B){B=".png"}this.prefix=A;this.suffix=B;this.nextIcon=null;this.nextIconIndex=0;return this}HCAlphabetIcons.prototype.getNextAlphabeticalIcon=function(){var C=byteToChar(charToByte("A")+this.nextIconIndex%26);var A=this.prefix+C+this.suffix;var B=new HCIcon(A,"center","middle",new HCVector2(-10,-10));return B};HCAlphabetIcons.prototype.toFirstIcon=function(){this.nextIconIndex=0;this.nextIcon=this.getNextAlphabeticalIcon()};HCAlphabetIcons.prototype.getNextIcon=function(){var A=this.nextIcon;this.nextIconIndex++;this.nextIcon=this.getNextAlphabeticalIcon();return A};var HCEvent=function(){this.enabled=false;this.listeners=new Array();this.numListeners=new Array();this.listenerCount=0;this.listeners.mousedown=new Array();this.numListeners.mousedown=0;this.listeners.mouseup=new Array();this.numListeners.mouseup=0;this.listeners.mouseover=new Array();this.numListeners.mouseover=0;this.listeners.mouseout=new Array();this.numListeners.mouseout=0;this.listeners.keydown=new Array();this.numListeners.keydown=0;this.listeners.keyup=new Array();this.numListeners.keyup=0;return this}();HCEvent.handleEvent=function(B,E,G,I){var F=HCEvent.numListeners[B];var H=HCEvent.listeners[B];var C=false;if(G!=0){C=HCOverlay.overlays[G-1]}for(var D=0;D<F;D++){var A=H[D];if(A.button){if(E==A.button){A.handler(C,I,E)}}else{A.handler(C,I,E)}}};function HCListener(B,D,C,A){this.applet=B;this.kind=D;this.handler=C;this.button=A;return this}HCEvent.addListener=function(B,D,C,A){var E=new HCListener(B,D,C,A);this.listenerCount++;if(!this.enabled){B.setEventHandler("HCEvent.handleEvent");this.enabled=true}if(D=="click"){D="mouseup"}if(D=="keypress"){D="keydown"}HCEvent.listeners[D][HCEvent.numListeners[D]]=E;HCEvent.numListeners[D]=HCEvent.numListeners[D]+1;return E};HCEvent.removeListener=function(E){if(!E){return }var A=HCEvent.numListeners[E.kind];var C=HCEvent.listeners[E.kind];var B=0;var D=false;this.listenerCount--;if(listenerCount==0){E.applet.setEventHandler("");this.enabled=false}while(B<A){if(D){C[B-1]=C[B]}else{if(C[B]==E){D=true}}B++}if(D){HCEvent.numListeners[E.kind]=HCEvent.numListeners[E.kind]-1}};HCEvent.reset=function(){this.enabled=false;this.listeners=new Array();this.numListeners=new Array();this.listenerCount=0;this.listeners.mousedown=new Array();this.numListeners.mousedown=0;this.listeners.mouseup=new Array();this.numListeners.mouseup=0;this.listeners.mouseover=new Array();this.numListeners.mouseover=0;this.listeners.mouseout=new Array();this.numListeners.mouseout=0;this.listeners.keydown=new Array();this.numListeners.keydown=0;this.listeners.keyup=new Array();this.numListeners.keyup=0};function HCApplet(C,B,E,A,D){if(!C){return this}if(A==undefined){A=""}if(D==undefined){D=null}component.call(this,C,D);this.appletSrc=B;this.resources=E;this.commandLine=A;this.plugIn=null;this.index=HCApplet.applets.length;this.id="HCApplet"+this.index;this.commandLine="-id "+this.id+"; "+A;HCApplet.appletIndices[this.id]=HCApplet.applets.length;HCApplet.applets[HCApplet.applets.length]=this;HCApplet.setCurrentApplet(this);this.activate();return this}HCApplet.prototype=new component();HCApplet.prototype.activate=function(){function A(E){var C="";if(E){for(var D=0;D<E.length;D++){C+="'"+E[D]+"'";if(D<E.length){C+="; "}}}return C}if(navigator.appName=="Microsoft Internet Explorer"){var B=new Array();B.id=this.id;B.classid="clsid:34B8892A-9303-4893-9E12-1CEE6C3BF95D";B.AppletSrc=this.appletSrc;B.CommandLine=this.commandLine;B.Resources=A(this.resources);this.plugIn=createIEControl(this.element,B)}else{var B=new Array();B.name=this.id;B.type="application/x-hypercosm";B.width=this.element.style.width;B.height=this.element.style.height;B.appletsrc=this.appletSrc;B.commandline=this.commandLine;B.resources=A(this.resources);B.browser=navigator.userAgent;this.plugIn=createMozillaControl(this.element,B)}};HCApplet.prototype.onActivate=function(){if(this.onload){this.onload()}};HCApplet.prototype.isActivated=function(){return(this.plugIn!=null)};HCApplet.prototype.call=function(script){if(script){eval(script)}};HCApplet.getAppletById=function(A){return this.getAppletByIndex(HCApplet.appletIndices[A])};HCApplet.getAppletByIndex=function(A){return HCApplet.applets[A]};HCApplet.setCurrentApplet=function(A){HCApplet.currentApplet=A};HCApplet.getCurrentApplet=function(){return HCApplet.currentApplet};HCApplet.applets=new Array();HCApplet.appletIndices=new Array();function HCScriptableApplet(C,B,E,A,D){if(!C){return this}HCApplet.call(this,C,B,E,A,D);this.messages="";this.buffering=false;this.nestingLevel=0;this.enabled=true;this.verbose=false;this.debug=false;return this}HCScriptableApplet.prototype=new HCApplet();HCScriptableApplet.prototype.setEnabled=function(A){this.enabled=A};HCScriptableApplet.prototype.sendMessage=function(A){if(this.verbose){setStatus(A)}if(this.buffering){if(this.messageBuffer!=""){this.messageBuffer=this.messageBuffer+";"}this.messageBuffer=this.messageBuffer+A}else{if(this.debug){alert("sending message: "+A)}if(this.enabled&&this.isActivated()){this.plugIn.SendMessage(A)}}};HCScriptableApplet.prototype.beginMessages=function(){if(this.buffering){this.nestingLevel++}else{this.buffering=true;this.messageBuffer="";this.nestingLevel=0}};HCScriptableApplet.prototype.endMessages=function(){if(this.nestingLevel==0){if(this.messageBuffer!=""){if(this.debug){alert("sending message: "+this.messageBuffer)}if(this.enabled){this.plugIn.SendMessage(this.messageBuffer)}}this.buffering=false;this.messageBuffer=""}else{this.nestingLevel--}};function HCMarkUpApplet(C,B,E,A,D){if(!C){return this}HCScriptableApplet.call(this,C,B,E,A,D);this.paintColor=new RGBColor(0,0,0);return this}HCMarkUpApplet.prototype=new HCScriptableApplet();HCMarkUpApplet.prototype.onActivate=function(){HCOverlay.reset();if(isDefined("HCEvent")){HCEvent.reset()}this.icons=new Array();this.materials=new Array();this.overlays=new Array();HCScriptableApplet.prototype.onActivate.call(this)};HCMarkUpApplet.prototype.addMarker=function(A,B){var D="-add_marker";D+=" "+A.location.x+" "+A.location.y+" "+A.location.z;if(A.icon){var C=A.icon}else{if(!HCMarkUpApplet.defaultMarkerIcon){HCMarkUpApplet.defaultMarkerIcon=new HCIcon("marker.png","center","bottom")}var C=HCMarkUpApplet.defaultMarkerIcon}if(!C.loaded){this.loadIcon(C)}D+=" "+(C.index+1);if(B){D+=" "+B}this.sendMessage(D);A.visible=true};HCMarkUpApplet.prototype.addLine=function(A,C){var D="-add_line";for(var B=0;B<A.vertices.length;B++){D+=" "+A.vertices[B].x+" "+A.vertices[B].y+" "+A.vertices[B].z}if(C){D+=" "+C}this.sendMessage(D);A.visible=true};HCMarkUpApplet.prototype.addCurve=function(A,C){var D="-add_curve";D+=" "+A.steps;for(var B=0;B<A.vertices.length;B++){D+=" "+A.vertices[B].x+" "+A.vertices[B].y+" "+A.vertices[B].z}if(C){D+=" "+C}this.sendMessage(D);A.visible=true};HCMarkUpApplet.prototype.addPolygon=function(B,D){var E="-add_polygon";for(var C=0;C<B.vertices.length;C++){E+=" "+B.vertices[C].x+" "+B.vertices[C].y+" "+B.vertices[C].z}if(B.texcoords){E+=" texcoords";for(var C=0;C<B.vertices.length;C++){E+=" "+B.texcoords[C].x+" "+B.texcoords[C].y}}if(B.material){if(!B.material.loaded){this.loadMaterial(B.material)}var A=B.material.index+1}else{var A=0}E+=" "+A;if(D){E+=" "+D}this.sendMessage(E);B.visible=true};HCMarkUpApplet.prototype.addText=function(A,C,E){var D="-add_text";if(typeof (A.text)=="string"){D+=" "+getQuotatedString(A.text)}else{if(typeof (A.text)=="object"){for(var B=0;B<A.text.length;B++){D+=" "+getQuotatedString(A.text[B])}}}D+=" "+A.location.x+" "+A.location.y+" "+A.location.z;D+=" "+A.hAlignment+" "+A.vAlignment;if(C){D+=" "+C}else{if(E){D+=" "+0}}if(E){D+=" "+E}this.sendMessage(D);A.visible=true};HCMarkUpApplet.prototype.addLabel=function(A,C,E){var D="-add_label";if(typeof (A.text)=="string"){D+=" "+getQuotatedString(A.text)}else{if(typeof (A.text)=="object"){for(var B=0;B<A.text.length;B++){D+=" "+getQuotatedString(A.text[B])}}}D+=" "+A.anchorPoint.x+" "+A.anchorPoint.y+" "+A.anchorPoint.z;D+=" "+A.location.x+" "+A.location.y+" "+A.location.z;if(C){D+=" "+C}if(E){D+=" "+E}this.sendMessage(D);A.visible=true};HCMarkUpApplet.prototype.addOverlay=function(B,C,D){if(!this.isActivated()){return }var A=null;if(B.color){A=this.paintColor;this.setPaintColor(B.color)}this.overlays[B.index]=B;if(B.__proto__==HCMarker.prototype){this.addMarker(B,C)}else{if(B.__proto__==HCLine.prototype){this.addLine(B,C)}else{if(B.__proto__==HCCurve.prototype){this.addCurve(B,C)}else{if(B.__proto__==HCPolygon.prototype){this.addPolygon(B,C)}else{if(B.__proto__==HCText.prototype){this.addText(B,C,D)}else{if(B.__proto__==HCLabel.prototype){this.addLabel(B,C,D)}}}}}}if(B.color){this.setPaintColor(A)}};HCMarkUpApplet.prototype.addOverlays=function(C,B){if(!this.isActivated()){return }for(var A=0;A<C.length;A++){this.addOverlay(C[A],B)}};HCMarkUpApplet.prototype.removeOverlay=function(A){if(!this.isActivated()){return }this.overlays[A.index]=null;this.sendMessage("-remove_overlay "+(A.index+1));A.visible=false};HCMarkUpApplet.prototype.removeOverlays=function(B){if(!this.isActivated()){return }for(var A=0;A<B.length;A++){this.removeOverlay(B[A])}};HCMarkUpApplet.prototype.clearOverlays=function(){if(!this.isActivated()){return }this.overlays=new Array();this.sendMessage("-clear_overlays")};HCMarkUpApplet.prototype.getOverlay=function(A){return this.overlays[A]};HCMarkUpApplet.prototype.selectOverlay=function(A){if(!this.isActivated()){return }this.sendMessage("-select_overlay "+(A.index+1))};HCMarkUpApplet.prototype.deselectOverlay=function(A){if(!this.isActivated()){return }this.sendMessage("-deselect_overlay "+(A.index+1))};HCMarkUpApplet.prototype.setCursor=function(B){if(!this.isActivated()){return }var A=0;if(B){if(!B.loaded){this.loadIcon(B)}A=B.index+1}this.sendMessage("-set_cursor "+A)};HCMarkUpApplet.prototype.setMarkerLocation=function(B,A){if(!this.isActivated()){return }B.location=A;this.sendMessage("-set_marker_location "+(B.index+1)+" "+A.x+" "+A.y+" "+A.z)};HCMarkUpApplet.prototype.setPaintColor=function(A){if(!this.isActivated()){return }this.paintColor=new RGBColor(A.red,A.green,A.blue);this.sendMessage("-color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCMarkUpApplet.prototype.getPaintColor=function(){return new RGBColor(this.paintColor.red,this.paintColor.green,this.paintColor.blue)};HCMarkUpApplet.prototype.setOverlayColor=function(B,A){if(!this.isActivated()){return }this.sendMessage("-set_overlay_color "+(B.index+1)+" "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCMarkUpApplet.prototype.setMaterial=function(A){if(!this.isActivated()){return }this.material=A;this.sendMessage("-material "+(A.index+1))};HCMarkUpApplet.prototype.getMaterial=function(){return this.material};HCMarkUpApplet.prototype.setOverlayMaterial=function(A,B){if(!this.isActivated()){return }this.sendMessage("-set_overlay_material "+(A.index+1)+" "+(B.index+1))};HCMarkUpApplet.prototype.setEventHandler=function(A){if(!this.isActivated()){return }this.sendMessage("-events "+A)};HCMarkUpApplet.prototype.loadIcon=function(B){if(B.loaded){return }B.index=this.icons.length;this.icons[B.index]=B;var A,C;if(B.iconAnchor!=null){A=B.iconAnchor.x;C=B.iconAnchor.y}else{A=0;C=0}this.sendMessage("-add_icon '"+B.imageName+"' "+B.hAlignment+" "+B.vAlignment+" "+A+" "+C);B.loaded=true};HCMarkUpApplet.prototype.loadMaterial=function(A){A.index=this.materials.length;this.materials[A.index]=A;var B="-add_material "+A.color.red+" "+A.color.green+" "+A.color.blue;if(A.textureName){B+=" "+A.textureName}this.sendMessage(B);A.loaded=true};
