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}}var chars=new Array(" ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","","Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," ");function charToByte(B){for(var A=0;A<chars.length;A++){if(B==chars[A]){return A+32}}return 0}function byteToChar(A){if(A<32||A>255){return" "}return chars[A-32]}function stringToUpper(A){if(A!=null){A=(A.charAt(0)).toUpperCase()+A.substring(1,A.length)}return A}function stringToLower(A){if(A!=null){A=(A.charAt(0)).toLowerCase()+A.substring(1,A.length)}return A}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 HCMaterial(A){if(typeof (A)=="string"){this.color=white;this.textureName=A}else{this.color=A;this.textureName=undefined}return this}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 HCPolygon(A,B,C){HCOverlay.call(this,HCPolygon.prototype);this.vertices=A;this.material=B;this.texcoords=C;return this}HCPolygon.prototype=new HCOverlay();HCPolygon.prototype.duplicate=function(){return new HCPolygon(this.vertices,this.texcoords,this.material)};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 HCFont(B,D,C,A){if(C==undefined){C=false}if(A==undefined){A=false}this.name=B;this.size=D;this.bold=C;this.italic=A;return this}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 button(A,B){component.call(this,A,B);this.enabled=true;this.status="";if(this.element){this.imageSrc=getImageSrc(this.element)}this.setActivated(true);return this}button.prototype=new component();button.prototype.getHighlightedImageName=function(A){if(A==null){return null}prefix=A.substring(0,A.length-4);suffix=A.substring(A.length-4,A.length);return(prefix+"_highlighted"+suffix)};button.prototype.getPressedImageName=function(A){if(A==null){return null}prefix=A.substring(0,A.length-4);suffix=A.substring(A.length-4,A.length);return(prefix+"_pressed"+suffix)};button.prototype.getDisabledImageName=function(A){if(A==null){return null}prefix=A.substring(0,A.length-4);suffix=A.substring(A.length-4,A.length);return(prefix+"_disabled"+suffix)};button.prototype.setActivated=function(A){if(!this.element){return }if(A){this.element.onmouseover=getClosure(this,"onMouseOver");this.element.onmouseout=getClosure(this,"onMouseOut");this.element.onmousedown=getClosure(this,"onMouseDown");this.element.onmouseup=getClosure(this,"onMouseUp")}else{this.element.onmouseover=null;this.element.onmouseout=null;this.element.onmousedown=null;this.element.onmouseup=null}};button.prototype.setEnabled=function(A){this.enabled=A;if(!this.visible){return }this.setActivated(A);if(this.enabled){this.showUnhighlighted()}else{this.showDisabled()}};button.prototype.onClick=function(){if(this.onclick){this.onclick()}};button.prototype.showUnhighlighted=function(){swapImage(this.element,this.imageSrc)};button.prototype.showHighlighted=function(){swapImage(this.element,this.getHighlightedImageName(this.imageSrc))};button.prototype.showPressed=function(){swapImage(this.element,this.getPressedImageName(this.imageSrc))};button.prototype.onMouseOver=function(){setStatus(this.status);if(!this.visible||!this.enabled){return }this.showHighlighted()};button.prototype.onMouseOut=function(){clearStatus();if(!this.visible||!this.enabled){return }this.showUnhighlighted()};button.prototype.onMouseDown=function(){if(!this.visible||!this.enabled){return }this.showPressed()};button.prototype.onMouseUp=function(){this.onClick();if(!this.visible||!this.enabled){return }this.showHighlighted()};function toggleButton(A,B){button.call(this,A,B);this.selected=false;this.initiallySelected=false;return this}toggleButton.prototype=new button();toggleButton.prototype.onStart=function(){this.initiallySelected=this.selected};toggleButton.prototype.getSelectedImageName=function(A){if(A==null){return null}prefix=A.substring(0,A.length-4);suffix=A.substring(A.length-4,A.length);return(prefix+"_selected"+suffix)};toggleButton.prototype.getSelectedDisabledImageName=function(A){if(A==null){return null}prefix=A.substring(0,A.length-4);suffix=A.substring(A.length-4,A.length);return(prefix+"_selected_disabled"+suffix)};button.prototype.getSelectedElement=function(){var A=document.createElement("img");A.src=this.getSelectedImageName(this.imageSrc);A.onmouseup=getClosure(this,"onMouseUp");return A};button.prototype.getSelectedDisabledElement=function(){var A=document.createElement("img");A.src=this.getSelectedDisabledImageName(this.imageSrc);return A};toggleButton.prototype.select=function(){this.setSelected(true)};toggleButton.prototype.deselect=function(){this.setSelected(false)};toggleButton.prototype.toggle=function(){this.setSelected(!this.selected)};toggleButton.prototype.setSelected=function(A){if(A==this.selected){return }if(A){this.onSelect()}else{this.onDeselect()}};toggleButton.prototype.showSelected=function(){swapImage(this.element,this.getSelectedImageName(this.imageSrc))};toggleButton.prototype.showDisabled=function(){swapImage(this.element,this.getDisabledImageName(this.imageSrc))};toggleButton.prototype.showSelectedDisabled=function(){swapImage(this.element,this.getSelectedDisabledImageName(this.imageSrc))};toggleButton.prototype.setEnabled=function(A){this.enabled=A;if(!this.visible){return }if(this.enabled){if(this.selected){this.showSelected()}else{this.showUnhighlighted()}}else{if(this.selected){this.showSelectedDisabled()}else{this.showDisabled()}}};toggleButton.prototype.onSelect=function(){this.selected=true;if(!this.visible){return }if(this.enabled){this.showSelected()}else{this.showSelectedDisabled()}};toggleButton.prototype.onDeselect=function(){this.selected=false;if(!this.visible){return }if(this.enabled){this.showUnhighlighted()}else{this.showDisabled()}};toggleButton.prototype.onClick=function(){this.toggle()};toggleButton.prototype.onMouseOver=function(){setStatus(this.status);if(!this.visible||!this.enabled){return }if(!this.selected){this.showHighlighted()}};toggleButton.prototype.onMouseOut=function(){clearStatus();if(!this.visible||!this.enabled){return }if(!this.selected){this.showUnhighlighted()}};toggleButton.prototype.onMouseDown=function(){if(!this.visible||!this.enabled){return }if(!this.selected){this.showPressed()}};toggleButton.prototype.onMouseUp=function(){this.toggle();if(!this.visible||!this.enabled){return }if(!this.selected){this.showHighlighted()}};function radioButton(B,D,C,A){toggleButton.call(this,B,C);this.deselectable=(A==true);if(D){D.addComponent(this);this.group=D}return this}radioButton.prototype=new toggleButton();radioButton.prototype.onSelect=function(){if(this.group){if(this.group.selectedButton){if(this.group.selectedButton!=this){this.group.selectedButton.setSelected(false)}}}toggleButton.prototype.onSelect.call(this);if(this.group){this.group.selectedButton=this}};radioButton.prototype.onMouseUp=function(){if(!this.selected||this.deselectable){toggleButton.prototype.onMouseUp.call(this)}};function radioButtonGroup(A){componentGroup.call(this,A);return this}radioButtonGroup.prototype=new componentGroup();radioButtonGroup.prototype.reset=function(){this.selectedButton=null;for(var A=0;A<this.components.length;A++){toggleButton.prototype.setSelected.call(this.components[A],false)}};radioButtonGroup.prototype.setEnabled=function(A){for(var B=0;B<this.components.length;B++){this.components[B].setEnabled(A)}if(A&&this.selectedButton){toggleButton.prototype.setSelected.call(this.selectedButton,true)}};function menu(B,C){component.call(this,B,C);if(this.element){var A=this;this.element.onchange=function(){A.onChange()}}return this}menu.prototype=new component();menu.prototype.addItem=function(A,B){if(this.element!=null){this.element.options.length=this.element.options.length+1;this.element.options[this.element.options.length-1].text=A;this.element.options[this.element.options.length-1].value=B}};menu.prototype.getItems=function(){if(this.element!=null){return this.element.length}else{return null}};menu.prototype.getItemName=function(A){if(this.element!=null){if(this.element.options[A]){return this.element.options[A].text}}else{return null}};menu.prototype.getItemValue=function(A){if(this.element!=null){if(this.element.options[A]){return this.element.options[A].value}}else{return null}};menu.prototype.getItemIndex=function(A){for(var B=0;B<this.getItems();B++){if(this.getItemName(B)==A){return B}}};menu.prototype.setItemName=function(B,A){if(this.element!=null){if(this.element.options[B]){this.element.options[B].text=A}}};menu.prototype.setItemValue=function(A,B){if(this.element!=null){if(this.element.options[A]){this.element.options[A].value=B}}};menu.prototype.setSelectedIndex=function(A){if(this.element!=null){this.element.selectedIndex=A-1}else{return null}this.onChange()};menu.prototype.setSelectedName=function(A){this.setSelectedIndex(this.getItemIndex(A)+1)};menu.prototype.getSelectedIndex=function(){if(this.element!=null){return this.element.selectedIndex}else{return null}};menu.prototype.getSelectedName=function(){if(this.element!=null){return this.getItemName(this.element.selectedIndex)}else{return null}};menu.prototype.getSelectedItem=function(){if(this.element!=null){return this.getItemValue(this.element.selectedIndex)}else{return null}};menu.prototype.onChange=function(){if(this.onchange){this.onchange()}};function toggleMenu(A,B){menu.call(this,A,B);return this}toggleMenu.prototype=new menu();toggleMenu.prototype.addItem=function(A,B){if(this.element==null){return }if(B){var C="*"+A}else{var C=A}menu.prototype.addItem.call(this,C,B)};toggleMenu.prototype.isItemSelected=function(A){return(this.getItemValue(A)=="true")};toggleMenu.prototype.setItemSelected=function(B,C){if(C==this.isItemSelected(B)){return }this.setItemValue(B,C);var A=this.getItemName(B);if(!C){this.setItemName(B,A.substring(1,A.length))}else{this.setItemName(B,"*"+A)}};toggleMenu.prototype.toggleItemSelected=function(A){this.setItemSelected(A,!this.isItemSelected(A))};function slider(B,F,G,A,C,E){if(!B){return }component.call(this,B,C);if(F==undefined){F=0}if(G==undefined){G=1}if(E==undefined){E=F}this.minValue=F;this.maxValue=G;if(this.element!=undefined){if(this.element.clientWidth>this.element.clientHeight){this.orientation="horizontal"}else{this.orientation="vertical"}}this.handleElement=getElementById("handle",this.element);this.handleHotSpotElement=getElementById("hotSpot",this.handleElement);this.textFieldElement=getElementById(A);if(!this.handleHotSpotElement){this.handleHotSpotElement=this.handleElement}this.sliderHandleX=0;this.sliderHandleY=0;this.onmousemove=null;this.onmouseup=null;this.onchange=null;var D=this;if(this.visible){this.width=this.element.clientWidth;this.height=this.element.clientHeight;if(this.handleElement){this.handleElement.style.position="relative";this.handleElement.style.cursor="default";this.handleHotSpotElement.onmousedown=function(H){D.onMouseDown(H)};this.handleHotSpotElement.onmouseup=function(H){D.onMouseUp(H)}}if(this.textFieldElement){this.textFieldElement.onchange=function(H){D.setValue(parseInt(D.textFieldElement.value))}}}this.setValue(E);if(this.element!=undefined){this.element.style.overflow="hidden"}return this}slider.prototype=new component();slider.prototype.setValue=function(A){if(A<this.minValue){A=this.minValue}if(A>this.maxValue){A=this.maxValue}if(A!=this.value){this.value=A;this.positionHandle();this.onChange()}};slider.prototype.getValue=function(){return this.value};slider.prototype.positionHandle=function(){if(this.handleElement&&(this.element!=undefined)){if(this.orientation=="horizontal"){var A=this.element.clientWidth-this.handleElement.clientWidth;var B=(this.value-this.minValue)/(this.maxValue-this.minValue)*A;this.handleElement.style.left=B+"px";this.sliderHandleX=B}else{var C=this.element.clientHeight-this.handleElement.clientHeight;var B=(this.value-this.minValue)/(this.maxValue-this.minValue)*C;this.handleElement.style.top=B+"px";this.sliderHandleY=B}}};slider.prototype.onMouseDown=function(C){if(!this.visible){return }if(!C){C=window.event}this.mouseDownX=C.clientX;this.mouseDownY=C.clientY;var B=this;this.moveHandler=function(E){B.onMouseMove(E)};this.upHandler=function(E){B.onMouseUp(E)};if(document.addEventListener){document.addEventListener("mousemove",this.moveHandler,true);document.addEventListener("mouseup",this.upHandler,true)}else{if(document.attachEvent){this.handleElement.setCapture();this.handleElement.attachEvent("onmousemove",this.moveHandler);this.handleElement.attachEvent("onmouseup",this.upHandler);this.handleElement.attachEvent("onlosecapture",this.upHandler)}else{var A=document.onmousemove;var D=document.onmouseup;document.onmousemove=this.moveHandler;document.onmouseup=this.upHandler}}if(C.stopPropagation){C.stopPropagation()}else{C.cancelBubble=true}if(C.preventDefault){C.preventDefault()}else{C.returnValue=false}};slider.prototype.onMouseUp=function(A){if(!this.visible){return }if(!A){A=window.event}this.sliderHandleX+=A.clientX-this.mouseDownX;this.sliderHandleY+=this.mouseDownY-A.clientY;if(document.removeEventListener){if(this.upHandler){document.removeEventListener("mouseup",this.upHandler,true)}if(this.moveHandler){document.removeEventListener("mousemove",this.moveHandler,true)}}else{if(document.detachEvent){if(this.upHandler){this.handleElement.detachEvent("onlosecapture",this.upHandler);this.handleElement.detachEvent("onmouseup",this.upHandler)}if(this.moveHandler){this.handleElement.detachEvent("onmousemove",this.moveHandler)}this.handleElement.releaseCapture()}else{document.onmouseup=olduphandler;document.onmousemove=oldmovehandler}}if(this.onmouseup){this.onmouseup()}if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}};slider.prototype.stringToValue=function(A){if(this.maxValue>1){return parseInt(A)}else{return parseFloat(A)}};slider.prototype.valueToString=function(A){if(this.maxValue>1){return this.value.toFixed(0)}else{return this.value.toPrecision(textFieldElement.getAttribute("maxlength"))}};slider.prototype.onMouseMove=function(F){if(!F){F=window.event}if(this.orientation=="horizontal"){var B=F.clientX-this.mouseDownX;var D=this.sliderHandleX+B;var E=this.element.offsetWidth-this.handleElement.clientWidth;if((D>=0)&&(D<=E)){this.value=this.minValue+(D/E)*(this.maxValue-this.minValue);this.handleElement.style.left=D+"px"}}else{var A=F.clientY-this.mouseDownY;var C=this.sliderHandleY-A;var G=this.element.offsetHeight-this.handleElement.clientHeight;if((C>=0)&&(C<=G)){this.value=this.minValue+(C/G)*(this.maxValue-this.minValue);this.handleElement.style.top=-C+"px"}}this.onChange();if(this.onmousemove){this.onmousemove()}if(F.stopPropagation){F.stopPropagation()}else{F.cancelBubble=true}};slider.prototype.onChange=function(A){if(this.textFieldElement){this.textFieldElement.value=this.valueToString(this.value)}if(this.onchange){this.onchange()}};slider.prototype.onResize=function(A){if(this.width!=this.element.clientWidth||this.height!=this.element.clientHeight){this.positionHandle();this.width=this.element.clientWidth;this.height=this.element.clientHeight}};function tabs(B,A,C){component.call(this,B,C);this.selectedTab=null;this.tabNames=new Array();this.tabVisibilities=new Array();if(this.element&&!tabs.images){tabs.images=new Array();tabs.images["selected left"]=new Image();tabs.images["selected left"].src=A+"tab-selected-left.png";tabs.images["selected middle"]=new Image();tabs.images["selected middle"].src=A+"tab-selected-middle.png";tabs.images["selected right"]=new Image();tabs.images["selected right"].src=A+"tab-selected-right.png";tabs.images["unselected left"]=new Image();tabs.images["unselected left"].src=A+"tab-unselected-left.png";tabs.images["unselected middle"]=new Image();tabs.images["unselected middle"].src=A+"tab-unselected-middle.png";tabs.images["unselected right"]=new Image();tabs.images["unselected right"].src=A+"tab-unselected-right.png";tabs.images.blank=new Image();tabs.images.blank.src=A+"tab-blank.gif"}return this}tabs.prototype=new component();tabs.prototype.addTab=function(A,B){this.tabNames[this.tabNames.length]=A;this.tabVisibilities[this.tabVisibilities.length]=(B!=false);this.update()};tabs.prototype.addTabs=function(C,A){for(var B=0;B<C.length;B++){this.tabNames[this.tabNames.length]=C[B];this.tabVisibilities[this.tabVisibilities.length]=((A==undefined)||(A[B]!=false))}this.update()};tabs.prototype.getTabs=function(){return this.tabNames.length};tabs.prototype.getTabName=function(A){return this.tabNames[A]};tabs.prototype.isTabVisible=function(A){return this.tabVisibilities[A]};tabs.prototype.setTab=function(A){this.selectedTab=A;this.update()};tabs.prototype.getTab=function(){return this.selectedTab};tabs.prototype.onClick=function(A){this.setTab(A)};tabs.prototype.createSelectedTab=function(B,G){var D=document.createElement("table");D.border=0;D.cellPadding=0;D.cellSpacing=0;D.style.cursor="default";var F=D.insertRow(0);var A,E,C=0;A=F.insertCell(C++);E=document.createElement("img");E.src=tabs.images["selected left"].src;A.appendChild(E);A=F.insertCell(C++);A.setAttribute("background",tabs.images["selected middle"].src);A.appendChild(document.createTextNode("\u00A0"));A=F.insertCell(C++);A.setAttribute("background",tabs.images["selected middle"].src);A.appendChild(document.createTextNode(B));A.className="tab-selected";A.onclick=G;A=F.insertCell(C++);A.setAttribute("background",tabs.images["selected middle"].src);A.appendChild(document.createTextNode("\u00A0"));A=F.insertCell(C++);E=document.createElement("img");E.src=tabs.images["selected right"].src;A.appendChild(E);return D};tabs.prototype.createUnselectedTab=function(B,G){var D=document.createElement("table");D.border=0;D.cellPadding=0;D.cellSpacing=0;D.style.cursor="default";var F=D.insertRow(0);var A,E,C=0;A=F.insertCell(C++);E=document.createElement("img");E.src=tabs.images["unselected left"].src;A.appendChild(E);A=F.insertCell(C++);A.setAttribute("background",tabs.images["unselected middle"].src);A.appendChild(document.createTextNode("\u00A0"));A=F.insertCell(C++);A.setAttribute("background",tabs.images["unselected middle"].src);A.appendChild(document.createTextNode(B));A.className="tab-unselected";A.onclick=G;A=F.insertCell(C++);A.setAttribute("background",tabs.images["unselected middle"].src);A.appendChild(document.createTextNode("\u00A0"));A=F.insertCell(C++);E=document.createElement("img");E.src=tabs.images["unselected right"].src;A.appendChild(E);return D};tabs.prototype.createTabs=function(E){if(E.length==0){return }var F=document.createElement("table");F.border=0;F.width="100%";F.cellPadding=0;F.cellSpacing=0;var G=F.insertRow(0);G.align="left";G.vAlign="bottom";for(var C=0;C<E.length;C++){if(this.tabVisibilities[C]){var B=this;if(C==this.selectedTab-1){var D=this.createSelectedTab(E[C],getClosure(this,"onClick",(C+1)))}else{var D=this.createUnselectedTab(E[C],getClosure(this,"onClick",(C+1)))}var A=G.insertCell(C);A.style.padding=0;A.appendChild(D)}}var A=G.insertCell(E.length);A.width="100%";A.height=tabs.images.blank.height;A.style.padding=0;A.setAttribute("background",tabs.images.blank.src);return F};tabs.prototype.update=function(){if(!this.element||(this.tabNames.length==0)){return }else{this.setElement(this.createTabs(this.tabNames))}};function toolbar(A,C,B){container.call(this,A,C,B);this.handle=getElementById("handle",this.element);return this}toolbar.prototype=new container();toolbar.prototype.addControl=function(B){this.control=B;if(this.handle&&B){var A=this;this.handle.onclick=function(){A.setVisible(false)}}};toolbar.prototype.setVisible=function(A){component.prototype.setVisible.call(this,A);if(A){this.call("onShow")}this.parent.call("onMove");if(this.control){this.control.update()}};toolbar.prototype.onMove=function(A){this.call("onMove")};toolbar.prototype.onLoad=function(){this.componentGroup.call("onLoad")};toolbar.prototype.onStart=function(){this.componentGroup.call("onStart")};toolbar.prototype.onUnload=function(){this.componentGroup.call("onUnload")};toolbar.prototype.parseQueryString=function(A){for(i=0;i<this.componentGroup.components.length;i++){if(this.componentGroup.getComponent(i).parseQueryString){this.componentGroup.getComponent(i).parseQueryString(A)}}};toolbar.prototype.getQueryString=function(){var A=null;for(i=0;i<this.componentGroup.components.length;i++){if(this.componentGroup.getComponent(i).getQueryString){A=addQueryString(A,this.componentGroup.getComponent(i).getQueryString())}}return A};function toolbarButton(A,B,D){button.call(this,A,B);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var C="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){C=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarButton.highlightedImage){toolbarButton.highlightedImage=new Image();toolbarButton.highlightedImage.src=C+"highlighted_button.gif"}if(!toolbarButton.pressedImage){toolbarButton.pressedImage=new Image();toolbarButton.pressedImage.src=C+"pressed_button.gif"}}if(D==undefined){D=true}this.showHelp=D;this.helpMessage="";return this}toolbarButton.prototype=new button();toolbarButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.showHighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.showPressed=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarButton.prototype.showDisabled=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}button.prototype.onMouseOver.call(this)};toolbarButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}button.prototype.onMouseOut.call(this)};toolbarButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return }}}}}}button.prototype.onMouseDown.call(this)};toolbarButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}button.prototype.onMouseUp.call(this)};function toolbarToggleButton(A,B,D){toggleButton.call(this,A,B);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var C="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){C=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarToggleButton.highlightedImage){toolbarToggleButton.highlightedImage=new Image();toolbarToggleButton.highlightedImage.src=C+"highlighted_button.gif"}if(!toolbarToggleButton.pressedImage){toolbarToggleButton.pressedImage=new Image();toolbarToggleButton.pressedImage.src=C+"pressed_button.gif"}if(!toolbarToggleButton.selectedImage){toolbarToggleButton.selectedImage=new Image();toolbarToggleButton.selectedImage.src=C+"selected_button.gif"}}if(D==undefined){D=true}this.showHelp=D;this.helpMessage="";return this}toolbarToggleButton.prototype=new toggleButton();toolbarToggleButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showHighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showPressed=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.showSelected=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.showDisabled=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showSelectedDisabled=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.onShow=function(){if(this.enabled){if(this.selected){this.showSelected()}else{this.showUnhighlighted()}}else{if(this.selected){this.showSelectedDisabled()}else{this.showDisabled()}}};toolbarToggleButton.prototype.onMove=function(){if(this.selected){if(this.enabled){this.showSelected()}else{this.showSelectedDisabled()}}};toolbarToggleButton.prototype.onSelect=function(){toggleButton.prototype.onSelect.call(this)};toolbarToggleButton.prototype.onDeselect=function(){toggleButton.prototype.onDeselect.call(this)};toolbarToggleButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}toggleButton.prototype.onMouseOver.call(this)};toolbarToggleButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}toggleButton.prototype.onMouseOut.call(this)};toolbarToggleButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return }}}}}}toggleButton.prototype.onMouseDown.call(this)};toolbarToggleButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}toggleButton.prototype.onMouseUp.call(this)};function toolbarRadioButton(C,B,D,A,F){radioButton.call(this,C,B,D,A);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var E="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){E=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarRadioButton.highlightedImage){toolbarRadioButton.highlightedImage=new Image();toolbarRadioButton.highlightedImage.src=E+"highlighted_button.gif"}if(!toolbarRadioButton.pressedImage){toolbarRadioButton.pressedImage=new Image();toolbarRadioButton.pressedImage.src=E+"pressed_button.gif"}if(!toolbarRadioButton.selectedImage){toolbarRadioButton.selectedImage=new Image();toolbarRadioButton.selectedImage.src=E+"selected_button.gif"}}if(F==undefined){F=true}this.showHelp=F;this.helpMessage="";return this}toolbarRadioButton.prototype=new radioButton();toolbarRadioButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showHighlighted=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showPressed=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.showSelected=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.showDisabled=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showSelectedDisabled=function(){if(!this.isVisible()){return }this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.onShow=function(){if(this.enabled){if(this.selected){this.showSelected()}else{this.showUnhighlighted()}}else{if(this.selected){this.showSelectedDisabled()}else{this.showDisabled()}}};toolbarRadioButton.prototype.onMove=function(){if(this.selected){if(this.enabled){this.showSelected()}else{this.showSelectedDisabled()}}};toolbarRadioButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}radioButton.prototype.onMouseOver.call(this)};toolbarRadioButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}radioButton.prototype.onMouseOut.call(this)};toolbarRadioButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return }}}}}}radioButton.prototype.onMouseDown.call(this)};toolbarRadioButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return }}}}}}radioButton.prototype.onMouseUp.call(this)};function mailButton(A,B){toolbarButton.call(this,A,B);this.status="Mail a link to this Page";this.helpMessage="This button mails a link to this page.";return this}mailButton.prototype=new toolbarButton();mailButton.prototype.onClick=function(){var A=getBaseLocation(getWindowLocation());A=A.replace(/ /g,"%20");A=A.replace(/%/g,"%25");var D=this.parent.parent.getQueryString();if(D&&(D!="")){D=D.replace(/ /g,"%20");D=D.replace(/%/g,"%25");D=D.replace(/&/g,"%26");A+="?"+D}var C="";var B="Link To 3D Hypercosm Model";window.open("mailto:"+C+"?subject="+B+"&body="+A)};function linkButton(A,B){toolbarButton.call(this,A,B);this.status="Link to this Page";this.helpMessage="This button links to this page.";return this}linkButton.prototype=new toolbarButton();linkButton.prototype.onClick=function(){this.parent.parent.setQueryString(this.parent.parent.getQueryString())};function internetToolbar(A,B){toolbar.call(this,A,null,B);this.mailButton=new mailButton("mailButton",this);this.linkButton=new linkButton("linkButton",this);return this}internetToolbar.prototype=new toolbar();function printButton(A,B){toolbarButton.call(this,A,B);this.status="Print the active document";this.helpMessage="This button prints the active document.";return this}printButton.prototype=new toolbarButton();printButton.prototype.onClick=function(){printPage()};function modelInfoButton(A,B){toolbarButton.call(this,A,B);this.status="Display Model Info Display Properties";this.helpMessage="This button shows information about the model.";return this}modelInfoButton.prototype=new toolbarButton();modelInfoButton.prototype.showModelInfo=function(){alert("This model was created using SketchUp 3D design software from\nGoogle (www.sketchup.com) and converted into a web page using\nHypercosm Teleporter software from Hypercosm (www.hypercosm.com).")};modelInfoButton.prototype.onClick=function(){this.showModelInfo()};function helpButton(A,B){toolbarToggleButton.call(this,A,B,false);this.status="Display help for clicked on buttons";return this}helpButton.prototype=new toolbarToggleButton();helpButton.prototype.showHelpMessage=function(A){alert(A);this.setSelected(false)};helpButton.prototype.onSelect=function(){toolbarToggleButton.prototype.onSelect.call(this);setStatus("Select a button on which to get help.")};helpButton.prototype.onDeselect=function(){toolbarToggleButton.prototype.onDeselect.call(this);clearStatus()};helpButton.prototype.onMouseOver=function(){if(this.selected){return }toolbarToggleButton.prototype.onMouseOver.call(this)};helpButton.prototype.onMouseOut=function(){if(this.selected){return }toolbarToggleButton.prototype.onMouseOut.call(this)};helpButton.prototype.onMouseDown=function(){toolbarToggleButton.prototype.onMouseDown.call(this)};helpButton.prototype.onMouseUp=function(){toolbarToggleButton.prototype.onMouseUp.call(this)};function eraseButton(A,B){toolbarButton.call(this,A,B);this.status="Erase markers and annotation";this.helpMessage="This button erases all markers and annotation in the scene.";return this}eraseButton.prototype=new toolbarButton();eraseButton.prototype.onLoad=function(){var B=46;var A=this;HCEvent.addListener(this.parent.parent.applet,"keydown",function(){A.onClick();A.setEnabled(false)},B)};eraseButton.prototype.onClick=function(){if(this.parent.parent.principalToolbar.selectButton.overlay){this.parent.parent.standardToolbar.undoButton.setOverlay(this.parent.parent.principalToolbar.selectButton.overlay);this.parent.parent.standardToolbar.undoButton.setEnabled(true);this.parent.parent.standardToolbar.redoButton.setEnabled(false);this.parent.parent.applet.removeOverlay(this.parent.parent.principalToolbar.selectButton.overlay);this.parent.parent.principalToolbar.selectButton.overlay=null}else{if(confirm("Click OK to delete all markers and annotation.")){this.parent.parent.markUp.clearOverlays()}}};eraseButton.prototype.onMouseUp=function(){toolbarButton.prototype.onMouseUp.call(this);this.setEnabled(false)};function undoButton(A,B){toolbarButton.call(this,A,B);this.status="Undo the previous operation.";this.helpMessage="This button undoes the previous operation.";this.overlay=null;return this}undoButton.prototype=new toolbarButton();undoButton.prototype.setOverlay=function(A){this.overlay=A};undoButton.prototype.onClick=function(){var A=this.overlay.duplicate();if(this.parent.parent.layersToolbar){var B=this.parent.parent.layersToolbar.getSelectedIndex()}else{var B=0}this.parent.parent.markUp.addOverlay(A,B);this.parent.parent.standardToolbar.redoButton.setOverlay(A);this.setOverlay(null);toolbarButton.prototype.onClick.call(this)};undoButton.prototype.onMouseUp=function(){toolbarButton.prototype.onMouseUp.call(this);this.setEnabled(false);this.parent.parent.standardToolbar.redoButton.setEnabled(true)};function redoButton(A,B){toolbarButton.call(this,A,B);this.status="Redo the previous operation.";this.helpMessage="This button redoes the previous operation.";this.overlay=null;return this}redoButton.prototype=new toolbarButton();redoButton.prototype.setOverlay=function(A){this.overlay=A};redoButton.prototype.onClick=function(){this.parent.parent.applet.removeOverlay(this.overlay);this.parent.parent.standardToolbar.undoButton.setOverlay(this.overlay);this.setOverlay(null);toolbarButton.prototype.onClick.call(this)};redoButton.prototype.onMouseUp=function(){toolbarButton.prototype.onMouseUp.call(this);this.setEnabled(false);this.parent.parent.standardToolbar.undoButton.setEnabled(true)};function standardToolbar(A,B){toolbar.call(this,A,null,B);this.modelInfoButton=new modelInfoButton("modelInfoButton",this);this.helpButton=new helpButton("helpButton",this);this.eraseButton=new eraseButton("eraseButton",this);this.undoButton=new undoButton("undoButton",this);this.redoButton=new redoButton("redoButton",this);this.eraseButton.setEnabled(false);this.undoButton.setEnabled(false);this.redoButton.setEnabled(false);return this}standardToolbar.prototype=new toolbar();function toolsButton(A,B){toolbarButton.call(this,A,B);this.status="Toggle toolbar visibility";this.helpMessage="This button toggles the visibility of the selected toolbar.";return this}toolsButton.prototype=new toolbarButton();toolsButton.prototype.onClick=function(){this.parent.toggleToolbarVisible(this.parent.getSelectedToolbarIndex())};function toolsToolbar(A,B){toolbar.call(this,A,null,B);this.toolsButton=new toolsButton("toolsButton",this);this.toolsMenu=new toggleMenu("toolsMenu",this);this.toolbars=new Array();this.toolbarNames=new Array();this.toolbarQueryStrings=new Array();this.toolbarInitialVisibilities=new Array();return this}toolsToolbar.prototype=new toolbar();toolsToolbar.prototype.onLoad=function(){for(var A=0;A<this.toolbars.length;A++){this.toolbarInitialVisibilities[A]=this.toolbars[A].isVisible()}};toolsToolbar.prototype.addToolbar=function(B,A){if(B.addControl){B.addControl(this)}var C=toLower(A);C=C.replace(/ /g,"_");C+="_toolbar";this.toolbars[this.toolbars.length]=B;this.toolbarNames[this.toolbarNames.length]=A;this.toolbarQueryStrings[this.toolbarQueryStrings.length]=C;this.toolsMenu.addItem(A,!B.isVisible())};toolsToolbar.prototype.getToolbarName=function(A){return this.toolbarNames[A]};toolsToolbar.prototype.getToolbarIndex=function(B){var A=0;while(A<this.toolbarNames.length){if(this.toolbarNames[A]==B){return A}else{A++}}return null};toolsToolbar.prototype.getToolbarByIndex=function(A){this.toolbars[A]};toolsToolbar.prototype.getSelectedToolbarIndex=function(){return this.toolsMenu.getSelectedIndex()};toolsToolbar.prototype.isToolbarVisible=function(A){return !this.toolsMenu.isToolbarVisible(A)};toolsToolbar.prototype.setToolbarVisible=function(A,B){this.toolsMenu.setItemSelected(A,!B);this.toolbars[A].setVisible(B)};toolsToolbar.prototype.toggleToolbarVisible=function(A){this.toolsMenu.toggleItemSelected(A);this.toolbars[A].toggleVisible()};toolsToolbar.prototype.update=function(){for(var A=0;A<this.toolbars.length;A++){this.toolsMenu.setItemSelected(A,!this.toolbars[A].isVisible())}};toolsToolbar.prototype.parseQueryString=function(G){if(!G){return }var D=G.split("&");for(var B=0;B<D.length;B++){var F=D[B].split("=");var C=F[0];var E=(F[1]=="true");for(var A=0;A<this.toolbarQueryStrings.length;A++){if(C==this.toolbarQueryStrings[A]){this.toolbars[A].setVisible(E)}}}};toolsToolbar.prototype.getQueryString=function(){var C=null;for(var A=0;A<this.toolbars.length;A++){var B=this.toolbars[A].isVisible();if(B!=this.toolbarInitialVisibilities[A]){C=addQueryString(C,this.toolbarQueryStrings[A]+"="+B)}}return C};function isoButton(A,B){toolbarButton.call(this,A,B);this.status="Iso View";this.helpMessage="This button sets the current view to the isometric view.";return this}isoButton.prototype=new toolbarButton();isoButton.prototype.onClick=function(){this.parent.parent.applet.setView("iso");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function topButton(A,B){toolbarButton.call(this,A,B);this.status="Top View";this.helpMessage="This button sets the current view to the top view.";return this}topButton.prototype=new toolbarButton();topButton.prototype.onClick=function(){this.parent.parent.applet.setView("top");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function frontButton(A,B){toolbarButton.call(this,A,B);this.status="Front View";this.helpMessage="This button sets the current view to the front view.";return this}frontButton.prototype=new toolbarButton();frontButton.prototype.onClick=function(){this.parent.parent.applet.setView("front");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function rightButton(A,B){toolbarButton.call(this,A,B);this.status="Right View";this.helpMessage="This button sets the current view to the right view.";return this}rightButton.prototype=new toolbarButton();rightButton.prototype.onClick=function(){this.parent.parent.applet.setView("right");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function backButton(A,B){toolbarButton.call(this,A,B);this.status="Back View";this.helpMessage="This button sets the current view to the back view.";return this}backButton.prototype=new toolbarButton();backButton.prototype.onClick=function(){this.parent.parent.applet.setView("back");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function leftButton(A,B){toolbarButton.call(this,A,B);this.status="Left View";this.helpMessage="This button sets the current view to the left view.";return this}leftButton.prototype=new toolbarButton();leftButton.prototype.onClick=function(){this.parent.parent.applet.setView("left");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function viewsToolbar(A,B){toolbar.call(this,A,null,B);this.isoButton=new isoButton("isoButton",this);this.topButton=new topButton("topButton",this);this.frontButton=new frontButton("frontButton",this);this.rightButton=new rightButton("rightButton",this);this.backButton=new backButton("backButton",this);this.leftButton=new leftButton("leftButton",this);return this}viewsToolbar.prototype=new toolbar();viewsToolbar.prototype.parseQueryString=function(B){if(!B){return }var A=getQueryVariable(B,"view");this.parent.applet.setView(A)};viewsToolbar.prototype.getQueryString=function(){var A=null;if(this.parent.applet.view!=undefined){if(this.parent.applet.view!=this.parent.applet.getPageName()){A="view="+this.parent.applet.view}}return A};function layersButton(A,B){toolbarButton.call(this,A,B);this.status="Toggle layer visibility";this.helpMessage="This button toggles the visibility of the selected layer.";return this}layersButton.prototype=new toolbarButton();layersButton.prototype.onClick=function(){this.parent.toggleLayerVisible(this.parent.getSelectedIndex())};function layersToolbar(A,B){toolbar.call(this,A,null,B);this.layersButton=new layersButton("layersButton",this);this.layersMenu=new toggleMenu("layersMenu",this);return this}layersToolbar.prototype=new toolbar();layersToolbar.prototype.onLoad=function(){toolbar.prototype.onLoad.call(this);for(var C=1;C<this.parent.applet.layerNames.length;C++){var B=this.parent.applet.layerNames[C];if((B.charAt(0)!="(")||(B.charAt(B.length-1)!=")")){this.layersMenu.addItem(B,!this.parent.applet.layerVisibility[C])}}var A=this;var D=function(F){for(var E=0;E<A.initialLayerVisibility.length;E++){A.layersMenu.setItemSelected(E,!F[E])}};this.parent.applet.setCallback("layer_visibility",D);this.initialLayerVisibility=new Array();for(C=0;C<this.parent.applet.layerNames.length;C++){this.initialLayerVisibility[C]=this.parent.applet.layerVisibility[C]}};layersToolbar.prototype.addLayer=function(A,B){this.layersMenu.addLayer(A,!B)};layersToolbar.prototype.setSelectedIndex=function(A){this.layersMenu.setSelectedIndex(A)};layersToolbar.prototype.getSelectedIndex=function(){return this.layersMenu.getSelectedIndex()};layersToolbar.prototype.isLayerVisible=function(A){return !this.layersMenu.isItemSelected(A)};layersToolbar.prototype.setLayerVisible=function(A,B){this.layersMenu.setItemSelected(A,!B);this.parent.applet.setLayerVisible(A,B)};layersToolbar.prototype.toggleLayerVisible=function(A){this.layersMenu.toggleItemSelected(A);this.parent.applet.toggleLayerVisible(A)};layersToolbar.prototype.parseQueryString=function(C){if(!C){return }for(var A=0;A<this.parent.applet.layerNames.length;A++){var B=getQueryVariable(C,"layer"+A);if(B!=undefined){this.parent.applet.setLayerVisible(A,(B=="true"))}}this.parent.applet.getAttribute("layer_visibility")};layersToolbar.prototype.getQueryString=function(){var B=null;for(var A=0;A<this.initialLayerVisibility.length;A++){if(this.parent.applet.layerVisibility[A]!=this.initialLayerVisibility[A]){B=addQueryString(B,"layer"+A+"="+this.parent.applet.layerVisibility[A])}}return B};function xRayButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Display the sketch in X-Ray mode";this.helpMessage="This button sets the rendering style to X-Ray mode.";return this}xRayButton.prototype=new toolbarToggleButton();xRayButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.xRayMode);var A=this;this.parent.parent.applet.setCallback("x_ray",function(B){A.setSelected(B)})};xRayButton.prototype.onSelect=function(){this.parent.parent.applet.setXRayMode(true);toolbarToggleButton.prototype.onSelect.call(this)};xRayButton.prototype.onDeselect=function(){this.parent.parent.applet.setXRayMode(false);toolbarToggleButton.prototype.onDeselect.call(this)};xRayButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"x_ray");if(A!=undefined){this.setSelected(A=="true")}};xRayButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="x_ray="+this.selected}return A};function cartoonButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Display the sketch in cartoon mode";this.helpMessage="This button sets the rendering style to cartoon mode.";return this}cartoonButton.prototype=new toolbarToggleButton();cartoonButton.prototype.onSelect=function(){toolbarToggleButton.prototype.onSelect.call(this);if(this.parent.parent.shadowsToolbar){if(this.parent.parent.shadowsToolbar.sunButton){this.parent.parent.shadowsToolbar.sunButton.setSelected(false)}if(this.parent.parent.shadowsToolbar.shadowsButton){this.parent.parent.shadowsToolbar.shadowsButton.setSelected(false)}}this.parent.parent.applet.beginMessages();this.parent.parent.applet.setBrightness(0);this.parent.parent.applet.setAmbient(new RGBColor(1,1,1));this.parent.parent.applet.endMessages()};cartoonButton.prototype.onDeselect=function(){toolbarToggleButton.prototype.onDeselect.call(this);this.parent.parent.applet.beginMessages();this.parent.parent.applet.setBrightness(1);this.parent.parent.applet.setAmbient(new RGBColor(0.35,0.35,0.35));this.parent.parent.applet.endMessages()};cartoonButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"cartoon");if(A!=undefined){this.setSelected(A=="true")}};cartoonButton.prototype.getQueryString=function(){var A=null;if(this.selected){A="cartoon=true"}return A};function wireframeButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch in wireframe mode";this.helpMessage="This button sets the rendering style to wireframe mode.";return this}wireframeButton.prototype=new toolbarRadioButton();wireframeButton.prototype.onLoad=function(){if(this.parent.parent.applet.displayMode=="wireframe"){toolbarRadioButton.prototype.onSelect.call(this)}};wireframeButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setDisplayMode("wireframe")};wireframeButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"display_mode");if(A=="wireframe"){this.setSelected(true)}};wireframeButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="display_mode=wireframe"}return A};function hiddenLineButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch in hidden line mode";this.helpMessage="This button sets the rendering style to hidden line mode.";return this}hiddenLineButton.prototype=new toolbarRadioButton();hiddenLineButton.prototype.onLoad=function(){if(this.parent.parent.applet.displayMode=="hidden_line"){toolbarRadioButton.prototype.onSelect.call(this)}};hiddenLineButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setDisplayMode("hidden_line")};hiddenLineButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"display_mode");if(A=="hidden_line"){this.setSelected(true)}};hiddenLineButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="display_mode=hidden_line"}return A};function monochromeButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch in monochrome mode";this.helpMessage="This button sets the rendering style to monochrome mode.";return this}monochromeButton.prototype=new toolbarRadioButton();monochromeButton.prototype.onLoad=function(){if(this.parent.parent.applet.displayMode=="monochrome"){toolbarRadioButton.prototype.onSelect.call(this)}};monochromeButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setDisplayMode("monochrome")};monochromeButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"display_mode");if(A=="monochrome"){this.setSelected(true)}};monochromeButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="display_mode=monochrome"}return A};function shadedButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch in shaded mode";this.helpMessage="This button sets the rendering style to shaded mode.";return this}shadedButton.prototype=new toolbarRadioButton();shadedButton.prototype.onLoad=function(){if((this.parent.parent.applet.displayMode=="shaded")&&(!this.parent.parent.applet.texture)){toolbarRadioButton.prototype.onSelect.call(this)}};shadedButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setDisplayMode("shaded");this.parent.parent.applet.setTexture(false)};shadedButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"display_mode");if(A=="shaded"){this.setSelected(true)}};shadedButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="display_mode=shaded"}return A};function shadedTexturedButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch in shaded mode with textures";this.helpMessage="This button sets the rendering style to shaded with textures mode.";return this}shadedTexturedButton.prototype=new toolbarRadioButton();shadedTexturedButton.prototype.onLoad=function(){if((this.parent.parent.applet.displayMode=="shaded")&&(this.parent.parent.applet.texture)){toolbarRadioButton.prototype.onSelect.call(this)}};shadedTexturedButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setDisplayMode("shaded");this.parent.parent.applet.setTexture(true)};shadedTexturedButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"display_mode");if(A=="shaded_with_textures"){this.setSelected(true)}};shadedTexturedButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="display_mode=shaded_with_textures"}return A};function displayModeToolbar(A,B){toolbar.call(this,A,null,B);this.xRayButton=new xRayButton("xRayButton",this);this.cartoonButton=new cartoonButton("cartoonButton",this);var C=new radioButtonGroup();this.wireframeButton=new wireframeButton("wireframeButton",C,this);this.hiddenLineButton=new hiddenLineButton("hiddenLineButton",C,this);this.monochromeButton=new monochromeButton("monochromeButton",C,this);this.shadedButton=new shadedButton("shadedButton",C,this);this.shadedTexturedButton=new shadedTexturedButton("shadedTexturedButton",C,this);return this}displayModeToolbar.prototype=new toolbar();displayModeToolbar.prototype.onLoad=function(){toolbar.prototype.onLoad.call(this);var A=this;this.parent.applet.setCallback("display_mode",function(B){A.setDisplayMode(B)});this.parent.applet.setCallback("texture",function(B){A.setTexture(B)})};displayModeToolbar.prototype.setDisplayMode=function(A){if(A=="wireframe"){this.wireframeButton.setSelected(true)}else{if(A=="hidden_line"){this.hiddenLineButton.setSelected(true)}else{if(A=="monochrome"){this.monochromeButton.setSelected(true)}else{if(A=="shaded"){if(!this.parent.applet.texture){this.shadedButton.setSelected(true)}else{this.shadedTexturedButton.setSelected(true)}}}}}};displayModeToolbar.prototype.setTexture=function(A){if(A&&this.shadedButton.selected){this.shadedTexturedButton.setSelected(true)}else{if(!A&&this.shadedTexturedButton.selected){this.shadedButton.setSelected(true)}}};function edgesButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Display the sketch with edges";this.helpMessage="This button toggles the display of edges.";return this}edgesButton.prototype=new toolbarToggleButton();edgesButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.showEdges);var A=this;this.parent.parent.applet.setCallback("edges",function(B){A.setSelected(B)})};edgesButton.prototype.onSelect=function(){this.parent.parent.applet.setShowEdges(true);toolbarToggleButton.prototype.onSelect.call(this)};edgesButton.prototype.onDeselect=function(){this.parent.parent.applet.setShowEdges(false);toolbarToggleButton.prototype.onDeselect.call(this)};edgesButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"edges");if(A!=undefined){this.setSelected(A=="true")}};edgesButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="edges="+this.selected}return A};function profileEdgesButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Display the sketch with profile edges";this.helpMessage="This button toggles the display of profile edges.";return this}profileEdgesButton.prototype=new toolbarToggleButton();profileEdgesButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.showProfileEdges);var A=this;this.parent.parent.applet.setCallback("profile_edges",function(B){A.setSelected(B)})};profileEdgesButton.prototype.onSelect=function(){this.parent.parent.applet.setShowProfileEdges(true);toolbarToggleButton.prototype.onSelect.call(this)};profileEdgesButton.prototype.onDeselect=function(){this.parent.parent.applet.setShowProfileEdges(false);toolbarToggleButton.prototype.onDeselect.call(this)};profileEdgesButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"profile_edges");if(A!=undefined){this.setSelected(A=="true")}};profileEdgesButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="profile_edges="+this.selected}return A};function edgesToolbar(A,B){toolbar.call(this,A,null,B);this.edgesButton=new edgesButton("edgesButton",this);this.profileEdgesButton=new profileEdgesButton("profileEdgesButton",this);return this}edgesToolbar.prototype=new toolbar();function sunButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Use Sun For Shading";this.helpMessage="This button toggles the use of the sun for shading.";return this}sunButton.prototype=new toolbarToggleButton();sunButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,false)};sunButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();this.parent.parent.applet.setLightCoords("world");this.parent.parent.applet.setLightDirection(this.parent.getLightDirection(this.parent.getAltitude(),this.parent.getAzimuth()));this.parent.parent.applet.endMessages();if(this.parent.parent.displayModeToolbar){if(this.parent.parent.displayModeToolbar.cartoonButton){this.parent.parent.displayModeToolbar.cartoonButton.setSelected(false)}}toolbarToggleButton.prototype.onSelect.call(this)};sunButton.prototype.onDeselect=function(){this.parent.parent.applet.beginMessages();this.parent.parent.applet.setLightCoords("camera");this.parent.parent.applet.setLightDirection(new HCVector3(0,-1,0));this.parent.parent.applet.endMessages();toolbarToggleButton.prototype.onDeselect.call(this)};sunButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"use_sun");if(A!=undefined){this.setSelected(A=="true")}};sunButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="use_sun="+this.selected}return A};function shadowsButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Toggle shadow display";this.helpMessage="This button toggles the display of shadows on and off.";return this}shadowsButton.prototype=new toolbarToggleButton();shadowsButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.shadows)};shadowsButton.prototype.onSelect=function(){if(this.parent.parent.displayModeToolbar){if(this.parent.parent.displayModeToolbar.cartoonButton){this.parent.parent.displayModeToolbar.cartoonButton.setSelected(false)}}this.parent.parent.applet.setShadows(true);toolbarToggleButton.prototype.onSelect.call(this)};shadowsButton.prototype.onDeselect=function(){this.parent.parent.applet.setShadows(false);toolbarToggleButton.prototype.onDeselect.call(this)};shadowsButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"shadows");if(A!=undefined){this.setSelected(A=="true")}};shadowsButton.prototype.getQueryString=function(){var A=null;if(this.selected){A="shadows=true"}return A};function shadowsToolbar(B,C){toolbar.call(this,B,null,C);this.sunButton=new sunButton("sunButton",this);this.shadowsButton=new shadowsButton("shadowsButton",this);this.azimuthSlider=new slider("azimuthSlider",0,360,null,this);this.altitudeSlider=new slider("altitudeSlider",0,180,null,this);this.altitude=0;this.azimuth=0;var A=this;function D(){if(A.sunButton.selected){var E=A.altitudeSlider.getValue();var G=A.azimuthSlider.getValue();var H=(Math.abs(E-A.altitude)>5);var F=(Math.abs(G-A.azimuth)>5);if(H||F){if(A.sunButton.selected){A.parent.applet.setLightDirection(A.getLightDirection(E,G))}A.altitude=E;A.azimuth=G}}}this.azimuthSlider.onmousemove=D;this.altitudeSlider.onmousemove=D;return this}shadowsToolbar.prototype=new toolbar();shadowsToolbar.prototype.onStart=function(){this.initialAltitude=0;this.initialAzimuth=0};shadowsToolbar.prototype.setLightAngles=function(A,B){this.altitudeSlider.setValue(A);this.azimuthSlider.setValue(B);this.parent.applet.setLightDirection(this.getLightDirection(A,B))};shadowsToolbar.prototype.getAltitude=function(){return this.altitude};shadowsToolbar.prototype.getAzimuth=function(){return this.azimuth};shadowsToolbar.prototype.getLightDirection=function(A,B){var C=new HCVector3(1,0,0);C.rotateBy(A,new HCVector3(0,-1,0));C.rotateBy(B,new HCVector3(0,0,1));return C};shadowsToolbar.prototype.parseQueryString=function(C){if(!C){return }this.parent.applet.beginMessages();toolbar.prototype.parseQueryString.call(this,C);var A=getQueryVariable(C,"altitude");if(A!=undefined){this.altitude=parseFloat(A);this.altitudeSlider.setValue(this.altitude)}var B=getQueryVariable(C,"azimuth");if(B!=undefined){this.azimuth=parseFloat(B);this.azimuthSlider.setValue(this.azimuth)}if(this.sunButton.selected){this.parent.applet.setLightDirection(this.getLightDirection(this.altitude,this.azimuth))}this.parent.applet.endMessages()};shadowsToolbar.prototype.getQueryString=function(){var C=toolbar.prototype.getQueryString.call(this);var B=Math.floor(this.getAzimuth());if(B!=this.initialAzimuth){C=addQueryString(C,"azimuth="+B)}var A=Math.floor(this.getAltitude());if(A!=this.initialAltitude){C=addQueryString(C,"altitude="+A)}return C};function pageTabs(B,E,D,C){if(E){var A=E+"/images/tabs/"}else{var A="images/tabs/"}tabs.call(this,B,A,C);this.pageSoundNames=D;return this}pageTabs.prototype=new tabs();pageTabs.prototype.onLoad=function(){if(this.parent.applet.pageNames&&this.parent.applet.pageNames.length>0){this.addTabs(this.parent.applet.pageNames);tabs.prototype.setTab.call(this,1)}if(this.pageSoundNames){for(var B=1;B<=this.pageSoundNames.length;B++){this.parent.applet.loadSound(this.pageSoundNames[B-1])}}var A=this;this.parent.applet.setCallback("page",function(C){A.onPageChange(C)})};pageTabs.prototype.onPageChange=function(A){this.parent.applet.getAttributes(HCSketchUpApplet.pageAttributeNames);if(this.pageSoundNames){var B=this.pageSoundNames[A-1];if(B&&(B!="")){this.parent.applet.playSound(B)}}};pageTabs.prototype.onUnload=function(){if(this.timeout!=undefined){window.clearTimeout(this.timeout)}};pageTabs.prototype.getPages=function(){return this.getTabs()};pageTabs.prototype.getPageName=function(A){return this.getTabName(A)};pageTabs.prototype.getPage=function(){return this.getTab()};pageTabs.prototype.setPage=function(B,A){tabs.prototype.setTab.call(this,B);this.parent.applet.setPage(B,A);this.parent.applet.getAttribute("page")};pageTabs.prototype.onClick=function(A){if(this.parent.slideShow){this.parent.slideShow.cancel()}if(this.parent.walkThroughToolbar){this.parent.walkThroughToolbar.slideShowButton.setSelected(false)}this.setPage(A,this.parent.applet.transitionTime);if(this.parent.perspectiveToolbar){this.parent.perspectiveToolbar.setEnabled(false);var B=this.parent.perspectiveToolbar;this.timeout=window.setTimeout(function(){B.setEnabled(true)},this.parent.applet.transitionTime*1000)}};pageTabs.prototype.isLastPage=function(){return(this.getPage()==this.getPages())};pageTabs.prototype.getNextPage=function(){if(!this.isLastPage()){return this.getPage()+1}else{return 1}};pageTabs.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"page");if(A!=undefined){this.setPage(parseInt(A),0)}};pageTabs.prototype.getQueryString=function(){var A=this.getPage();if(A>1){return"page="+A}};function selectButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Selection Tool";this.helpMessage="This button is used to select an object in the scene.";this.overlay=null;return this}selectButton.prototype=new toolbarRadioButton();selectButton.prototype.onLoad=function(){this.cursor=new HCIcon("select_cursor.png","right","top")};selectButton.prototype.setOverlay=function(A){if(this.overlay){if(this.overlay!=A){this.parent.parent.applet.deselectOverlay(this.overlay)}}if(A){this.parent.parent.applet.selectOverlay(A)}this.overlay=A};selectButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",this.cursor);var A=this.parent.parent.applet;var B=function(D,C,E){if((D)&&A.parent.markUp.hasOverlay(D)){A.parent.principalToolbar.selectButton.setOverlay(D);A.parent.standardToolbar.eraseButton.setEnabled(true);if(A.parent.layersToolbar){A.parent.layersToolbar.setSelectedIndex(D.layer+1)}}else{A.parent.principalToolbar.selectButton.setOverlay(null);A.parent.standardToolbar.eraseButton.setEnabled(false)}};this.listener=HCEvent.addListener(this.parent.parent.applet,"mouseup",B);this.parent.parent.applet.endMessages()};selectButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};selectButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="select"){this.setSelected(true)}};selectButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=select"}return A};function paintButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Paint";this.helpMessage="This button sets the current color.";this.colorTile=getElementById("colorTile",B.element);return this}paintButton.prototype=new toolbarRadioButton();paintButton.prototype.onLoad=function(){this.cursor=new HCIcon("paint_cursor.png","right","bottom")};paintButton.prototype.onStart=function(){this.setColor(this.parent.parent.markUp.getPaintColor())};paintButton.prototype.setColor=function(A){this.color=new RGBColor(A.red,A.green,A.blue);if(this.colorTile){var B=A.toHex();if(this.colorTile.style.setAttribute){this.colorTile.style.setAttribute("backgroundColor","#"+B)}else{this.colorTile.style.backgroundColor="#"+B}}this.parent.parent.markUp.setPaintColor(this.color)};paintButton.prototype.getColor=function(){return new RGBColor(this.color.red,this.color.green,this.color.blue)};paintButton.prototype.openColorChooser=function(){var B="windows/color_chooser.html";var A=getCSSStyle(".color_chooser");if(this.parent.parent.path){B=this.parent.parent.path+B}HCApplet.setCurrentApplet(this.parent.parent.applet);this.colorChooserWindow=openDialogBox(B,parseInt(A.width),parseInt(A.height))};paintButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",this.cursor);var A=this.parent.parent.applet;var B=function(D,C,E){if(A.parent.markUp.hasOverlay(D)){D.setColor(A.parent.principalToolbar.paintButton.color);A.setOverlayColor(D,A.parent.principalToolbar.paintButton.color)}};this.listener=HCEvent.addListener(this.parent.parent.applet,"mouseup",B);this.parent.parent.applet.endMessages();if(this.parent.parent.loaded){this.openColorChooser()}};paintButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};paintButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="paint"){this.setSelected(true)}this.setColor(this.parent.parent.markUp.getPaintColor())};paintButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=paint"}return A};function eraserButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Erase selected marker";this.helpMessage="This button erases a marker that is clicked on.";return this}eraserButton.prototype=new toolbarRadioButton();eraserButton.prototype.onLoad=function(){this.cursor=new HCIcon("eraser_cursor.png","center","middle")};eraserButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",this.cursor);var A=this.parent.parent.applet;var B=function(D,C,E){if(D){A.parent.standardToolbar.undoButton.setOverlay(D);A.parent.standardToolbar.undoButton.setEnabled(true);A.parent.standardToolbar.redoButton.setEnabled(false);A.removeOverlay(D)}};this.listener=HCEvent.addListener(this.parent.parent.applet,"mouseup",B);this.parent.parent.applet.endMessages()};eraserButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};eraserButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="eraser"){this.setSelected(true)}};eraserButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=eraser"}return A};function principalToolbar(B,A,C){toolbar.call(this,B,null,C);this.selectButton=new selectButton("selectButton",A,this);this.paintButton=new paintButton("paintButton",A,this);this.eraserButton=new eraserButton("eraserButton",A,this);return this}principalToolbar.prototype=new toolbar();function lineButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Draw straight lines";this.helpMessage="This button is used to draw straight lines.";return this}lineButton.prototype=new toolbarRadioButton();lineButton.prototype.onLoad=function(){this.cursor=new HCIcon("line_cursor.png","right","bottom")};lineButton.prototype.drawLine=function(B){if(B.length>=2){var A=this.parent.parent.markUp.getPaintColor();if(this.parent.parent.layersToolbar){var C=this.parent.parent.layersToolbar.getSelectedIndex();if(!this.parent.parent.layersToolbar.isLayerVisible(C)){C=0}}else{var C=0}this.parent.parent.markUp.addOverlay(new HCLine(B,A),C)}};lineButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","draw_line",this.cursor,"HCApplet.getAppletById('"+this.parent.parent.applet.id+"').parent.markUpToolbar.lineButton.drawLine");this.parent.parent.applet.setMouseMode("right","none",null);this.parent.parent.applet.endMessages()};lineButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="line"){this.setSelected(true)}};lineButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=line"}return A};function freeHandButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Draw freehand curves";this.helpMessage="This button is used to draw freehand curves.";return this}freeHandButton.prototype=new toolbarRadioButton();freeHandButton.prototype.onLoad=function(){this.cursor=new HCIcon("freehand_cursor.png","right","bottom")};freeHandButton.prototype.drawCurve=function(C){var B=5;if(C.length>2){var H=3;var F=2+Math.floor((C.length-2)/H);var G=new Array(F);G[0]=C[0];for(var E=1;E<C.length;E++){if((E%H)==0){G[E/H]=C[E]}}G[F-1]=C[C.length-1];var A=this.parent.parent.markUp.getPaintColor();if(this.parent.parent.layersToolbar){var D=this.parent.parent.layersToolbar.getSelectedIndex();if(!this.parent.parent.layersToolbar.isLayerVisible(D)){D=0}}else{var D=0}this.parent.parent.markUp.addOverlay(new HCCurve(B,G,A),D)}};freeHandButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","freehand",this.cursor,"HCApplet.getAppletById('"+this.parent.parent.applet.id+"').parent.markUpToolbar.freeHandButton.drawCurve");this.parent.parent.applet.setMouseMode("right","none",null);this.parent.parent.applet.endMessages()};freeHandButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="freehand"){this.setSelected(true)}};freeHandButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=freehand"}return A};function markUpToolbar(B,A,C){toolbar.call(this,B,null,C);this.lineButton=new lineButton("lineButton",A,this);this.freeHandButton=new freeHandButton("freeHandButton",A,this);return this}markUpToolbar.prototype=new toolbar();function textButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Create text";this.helpMessage="This button is used to create text annotations.";return this}textButton.prototype=new toolbarRadioButton();textButton.prototype.onLoad=function(){this.cursor=new HCIcon("text_cursor.png","right","bottom")};textButton.prototype.addText=function(C,D,B,A){if(B){this.addLeaderText(C,D,B,A)}else{this.addScreenText(C,D,A)}};textButton.prototype.addScreenText=function(D,A,B){if(this.parent.parent.layersToolbar){var C=this.parent.parent.layersToolbar.getSelectedIndex();if(!this.parent.parent.layersToolbar.isLayerVisible(C)){C=0}}else{var C=0}this.parent.parent.markUp.addOverlay(new HCText(D,A,B),C,"HCMarkUp.getMarkUpById('"+this.parent.parent.applet.id+"').changeText")};textButton.prototype.addLeaderText=function(D,E,C,A){if(this.parent.parent.layersToolbar){var B=this.parent.parent.layersToolbar.getSelectedIndex();if(!this.parent.parent.layersToolbar.isLayerVisible(B)){B=0}}else{var B=0}this.parent.parent.markUp.addOverlay(new HCLabel(D,E,C,A),B,"HCMarkUp.getMarkUpById('"+this.parent.parent.applet.id+"').changeText")};textButton.prototype.drawText=function(F,G,D){if(this.currentText){this.parent.parent.applet.deselectOverlay(this.currentText)}var A=this.parent.parent.markUp.getPaintColor();if(D){this.addLeaderText(F,G,D,A)}else{this.addScreenText(F,G,A)}if(this.parent.parent.principalToolbar.selectButton.overlay){this.parent.parent.applet.deselectOverlay(this.parent.parent.principalToolbar.selectButton.overlay)}var B=this.parent.parent.applet.getOverlay(HCOverlay.overlays.length-1);this.parent.parent.applet.beginMessages();this.parent.parent.applet.selectOverlay(B);this.parent.parent.applet.selectOverlay(B);this.parent.parent.applet.endMessages();this.currentText=B;this.parent.parent.principalToolbar.selectButton.overlay=B;this.parent.parent.applet.setMouseMode("left","none",null);var C=this.parent.parent.applet;var E=function(I,H,J){if(C.parent.annotationToolbar.textButton.currentText){C.deselectOverlay(C.parent.annotationToolbar.textButton.currentText)}C.setMouseMode("left","place_text",C.parent.annotationToolbar.textButton.cursor,"HCApplet.getAppletById('"+C.id+"').parent.annotationToolbar.textButton.drawText");HCEvent.removeListener(C.parent.annotationToolbar.textButton.listener);C.parent.annotationToolbar.textButton.listener=null};this.listener=HCEvent.addListener(this.parent.parent.applet,"mousedown",E)};textButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","place_text",this.cursor,"HCApplet.getAppletById('"+this.parent.parent.applet.id+"').parent.annotationToolbar.textButton.drawText");this.parent.parent.applet.setMouseMode("right","none",null);this.parent.parent.applet.endMessages()};textButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);if(this.currentText){this.parent.parent.applet.deselectOverlay(this.currentText)}this.parent.parent.applet.setMouseMode("left","none",null);if(this.listener){HCEvent.removeListener(this.listener);this.listener=null}};textButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="add_text"){this.setSelected(true)}};textButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=add_text"}return A};function addMarkerButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Create marker";this.helpMessage="This button adds a marker.";return this}addMarkerButton.prototype=new toolbarRadioButton();addMarkerButton.prototype.onLoad=function(){this.cursor=new HCIcon("add_marker_cursor.png","center","bottom")};addMarkerButton.prototype.openAddHyperlinkWindow=function(){var B="windows/add_hyperlink.html";var A=getCSSStyle(".add_hyperlink");if(this.parent.parent.path){B=this.parent.parent.path+B}HCApplet.setCurrentApplet(this.parent.parent.applet);this.addHyperlinkWindow=openDialogBox(B,parseInt(A.width),parseInt(A.height))};addMarkerButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",this.cursor);if(!this.parent.parent.markUp.icons.nextIcon){this.parent.parent.markUp.icons.toFirstIcon()}var A=this;var B=this.parent.parent.applet;var C=function(G,E,I){if((E!=null)&&(I=="left")){var F=B.parent.markUp.getPaintColor();var D=new HCMarker(E,B.parent.markUp.icons.getNextIcon(),F);if(B.parent.layersToolbar){var H=B.parent.layersToolbar.getSelectedIndex();if(!B.parent.layersToolbar.isLayerVisible(H)){H=0}}else{var H=0}B.parent.markUp.addOverlay(D,H);A.marker=D;A.openAddHyperlinkWindow()}};this.listener=HCEvent.addListener(this.parent.parent.applet,"mousedown",C);this.parent.parent.applet.endMessages()};addMarkerButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};addMarkerButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="add_marker"){this.setSelected(true)}};addMarkerButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=add_marker"}return A};function addStickyNoteButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Create sticky note";this.helpMessage="This button adds a sticky note.";return this}addStickyNoteButton.prototype=new toolbarRadioButton();addStickyNoteButton.prototype.onLoad=function(){this.cursor=new HCIcon("add_sticky_note_cursor.png","center","middle");this.icon=this.cursor;var A=this;HCEvent.addListener(this.parent.parent.applet,"click",function(C,B){if(C&&(C.note!=undefined)){A.marker=C;A.openAddNoteWindow()}})};addStickyNoteButton.prototype.openAddNoteWindow=function(){var B="windows/edit_sticky_note.html";var A=getCSSStyle(".edit_sticky_note");if(this.parent.parent.path){B=this.parent.parent.path+B}HCApplet.setCurrentApplet(this.parent.parent.applet);this.addStickyNoteWindow=openDialogBox(B,parseInt(A.width),parseInt(A.height))};addStickyNoteButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",this.cursor);var A=this;var B=this.parent.parent.applet;var C=function(F,E,H){if((E!=null)&&(H=="left")){var D=new HCMarker(E,A.icon);D.note="";if(B.parent.layersToolbar){var G=B.parent.layersToolbar.getSelectedIndex();if(!B.parent.layersToolbar.isLayerVisible(G)){G=0}}else{var G=0}B.parent.markUp.addOverlay(D,G);A.marker=D;A.openAddNoteWindow()}};this.listener=HCEvent.addListener(this.parent.parent.applet,"mousedown",C);this.parent.parent.applet.endMessages()};addStickyNoteButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};addStickyNoteButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="add_note"){this.setSelected(true)}};addStickyNoteButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=add_note"}return A};function annotationToolbar(B,A,C){toolbar.call(this,B,null,C);this.textButton=new textButton("textButton",A,this);this.addMarkerButton=new addMarkerButton("addMarkerButton",A,this);this.addStickyNoteButton=new addStickyNoteButton("addStickyNoteButton",A,this);return this}annotationToolbar.prototype=new toolbar();function tapeMeasureButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Measure distances and create construction lines";this.helpMessage="This button is used to measure distances and create construction lines.";return this}tapeMeasureButton.prototype=new toolbarRadioButton();tapeMeasureButton.prototype.onLoad=function(){this.cursor=new HCIcon("tape_measure_cursor.png","right","bottom")};tapeMeasureButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","tape_measure",this.cursor);this.parent.parent.applet.endMessages()};tapeMeasureButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null)};tapeMeasureButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="tape_measure"){this.setSelected(true)}};tapeMeasureButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=tape_measure"}return A};function axesButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Toggle axes display";this.helpMessage="This button toggles the display of axes on and off.";return this}axesButton.prototype=new toolbarToggleButton();axesButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.showAxes);var A=this;this.parent.parent.applet.setCallback("axes",function(B){A.setSelected(B)})};axesButton.prototype.onSelect=function(){this.parent.parent.applet.setAxes(true);toolbarToggleButton.prototype.onSelect.call(this)};axesButton.prototype.onDeselect=function(){this.parent.parent.applet.setAxes(false);toolbarToggleButton.prototype.onDeselect.call(this)};axesButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"axes");if(A!=undefined){this.setSelected(A=="true")}};axesButton.prototype.getQueryString=function(){var A=null;if(this.selected){A="axes=true"}return A};function constructionToolbar(B,A,C){toolbar.call(this,B,null,C);this.tapeMeasureButton=new tapeMeasureButton("tapeMeasureButton",A,this);this.axesButton=new axesButton("axesButton",this);return this}constructionToolbar.prototype=new toolbar();function orbitButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Orbit";this.helpMessage="This button sets the mouse mode to orbit mode.";return this}orbitButton.prototype=new toolbarRadioButton();orbitButton.prototype.onLoad=function(){this.cursor=new HCIcon("orbit_cursor.png","center","middle")};orbitButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","orbit",this.cursor);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(false);var B=this.parent.parent.cameraToolbar.previousButton;var A=function(F,E,G){B.setEnabled(true)};this.mouseDownListener=HCEvent.addListener(this.parent.parent.applet,"mousedown",A)}}var D=16;var C=this;this.shiftKeyDownListener=HCEvent.addListener(this,"keydown",function(){C.parent.parent.applet.setMouseMode("left","pan",C.parent.panButton.cursor)},D);this.shiftKeyUpListener=HCEvent.addListener(this,"keyup",function(){C.parent.parent.applet.setMouseMode("left","orbit",C.cursor)},D);this.parent.parent.applet.endMessages()};orbitButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);HCEvent.removeListener(this.mouseDownListener);HCEvent.removeListener(this.shiftKeyDownListener);HCEvent.removeListener(this.shiftKeyUpListener);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}};orbitButton.prototype.onMouseDown=function(){setStatus("Drag to orbit. Shift = Pan");toolbarRadioButton.prototype.onMouseDown.call(this)};orbitButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="orbit"){this.setSelected(true)}};orbitButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=orbit"}return A};function panButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Moves the camera viewpoint while maintaining view direction";this.helpMessage="This button sets the mouse mode to pan mode.";return this}panButton.prototype=new toolbarRadioButton();panButton.prototype.onLoad=function(){this.cursor=new HCIcon("pan_cursor.png","center","middle")};panButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","pan",this.cursor);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(false);var B=this.parent.parent.cameraToolbar.previousButton;var A=function(D,C,E){B.setEnabled(true)};this.mouseDownListener=HCEvent.addListener(this.parent.parent.applet,"mousedown",A)}}setStatus("Drag in direction to pan");this.parent.parent.applet.endMessages()};panButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);HCEvent.removeListener(this.mouseDownListener);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}};panButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="pan"){this.setSelected(true)}};panButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=pan"}return A};function zoomButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Zoom";this.helpMessage="This button sets the mouse mode to zoom mode.";return this}zoomButton.prototype=new toolbarRadioButton();zoomButton.prototype.onLoad=function(){this.cursor=new HCIcon("zoom_cursor.png","center","middle")};zoomButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.applet.camera.perspective){this.parent.parent.applet.setMouseMode("left","zoom",this.cursor)}else{this.parent.parent.applet.setMouseMode("left","zoom_fov",this.cursor)}if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(false);var B=this.parent.parent.cameraToolbar.previousButton;var A=function(F,E,G){B.setEnabled(true)};this.mouseDownListener=HCEvent.addListener(this.parent.parent.applet,"mousedown",A)}}var D=16;var C=this;this.shiftKeyDownListener=HCEvent.addListener(this,"keydown",function(){C.parent.parent.applet.setMouseMode("left","zoom_fov",C.cursor)},D);this.shiftKeyUpListener=HCEvent.addListener(this,"keyup",function(){C.parent.parent.applet.setMouseMode("left","zoom",C.cursor)},D);this.parent.parent.applet.endMessages()};zoomButton.prototype.onDeselect=function(){HCEvent.removeListener(this.mouseDownListener);HCEvent.removeListener(this.shiftKeyDownListener);HCEvent.removeListener(this.shiftKeyUpListener);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}toolbarRadioButton.prototype.onDeselect.call(this)};zoomButton.prototype.onMouseDown=function(){setStatus("Drag cursor to zoom. Up is in, down is out. Shift to change Field of View.");toolbarRadioButton.prototype.onMouseDown.call(this)};zoomButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="zoom"){this.setSelected(true)}};zoomButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=zoom"}return A};function zoomWindowButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Zoom Window";this.helpMessage="This button sets the mouse mode to zoom window mode.";return this}zoomWindowButton.prototype=new toolbarRadioButton();zoomWindowButton.prototype.onLoad=function(){this.cursor=new HCIcon("zoom_window_cursor.png","center","middle")};zoomWindowButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}if(this.parent.parent.applet.camera.perspective){this.parent.parent.applet.setMouseMode("left","zoom_window",this.cursor)}else{this.parent.parent.applet.setMouseMode("left","zoom_window_fov",this.cursor)}var A=this;var B=function(D,C){A.setSelected(false)};this.mouseUpListener=HCEvent.addListener(this.parent.parent.applet,"mouseup",B)};zoomWindowButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.mouseUpListener)};zoomWindowButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="zoom_window"){this.setSelected(true)}};zoomWindowButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=zoom_window"}return A};function zoomExtentsButton(A,B){toolbarButton.call(this,A,B);this.status="Zoom to extents";this.helpMessage="This button zooms the view to fit the extents of the window.";return this}zoomExtentsButton.prototype=new toolbarButton();zoomExtentsButton.prototype.onClick=function(){this.parent.parent.applet.setView("auto");if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}};function previousButton(A,B){toolbarButton.call(this,A,B);this.status="Restore last viewing orientation";this.helpMessage="This button restores the last viewing orientation.";this.loaded=false;return this}previousButton.prototype=new toolbarButton();previousButton.prototype.onLoad=function(){if(!this.loaded){this.setEnabled(false)}};previousButton.prototype.onClick=function(){this.parent.parent.applet.setView("previous")};function cameraToolbar(B,A,C){toolbar.call(this,B,null,C);this.orbitButton=new orbitButton("orbitButton",A,this);this.panButton=new panButton("panButton",A,this);this.zoomButton=new zoomButton("zoomButton",A,this);this.zoomWindowButton=new zoomWindowButton("zoomWindowButton",A,this);this.zoomExtentsButton=new zoomExtentsButton("zoomExtentsButton",this);this.previousButton=new previousButton("previousButton",this);return this}cameraToolbar.prototype=new toolbar();function positionCameraButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Sets the camera position and direction";this.helpMessage="This button sets the camera position and direction.";return this}positionCameraButton.prototype=new toolbarRadioButton();positionCameraButton.prototype.onLoad=function(){this.cursor=new HCIcon("position_camera_cursor.png","center","middle")};positionCameraButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}this.parent.parent.applet.setMouseMode("left","position_camera",this.cursor);var A=this.parent.parent.applet;var B=function(D,C){A.parent.walkThroughToolbar.lookAroundButton.setSelected(true)};this.listener=HCEvent.addListener(this.parent.parent.applet,"mouseup",B);this.parent.parent.applet.endMessages()};positionCameraButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);HCEvent.removeListener(this.listener)};positionCameraButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="position_camera"){this.setSelected(true)}};positionCameraButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=position_camera"}return A};function walkButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Walk with the camera";this.helpMessage="This button sets the mouse mode to walk mode.";return this}walkButton.prototype=new toolbarRadioButton();walkButton.prototype.onLoad=function(){this.cursor=new HCIcon("walk_cursor.png","center","middle")};walkButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}this.parent.parent.applet.setMouseMode("left","walk",this.cursor);this.parent.parent.applet.setMouseMode("middle","look_around",this.parent.parent.walkThroughToolbar.lookAroundButton.cursor);var C=17;var B=16;var D=18;var A=this;this.controlKeyDownListener=HCEvent.addListener(this,"keydown",function(){A.parent.parent.applet.setMouseMode("left","run",A.cursor)},C);this.controlKeyUpListener=HCEvent.addListener(this,"keyup",function(){A.parent.parent.applet.setMouseMode("left","walk",A.cursor)},C);this.shiftKeyDownListener=HCEvent.addListener(this,"keydown",function(){A.parent.parent.applet.setMouseMode("left","move",A.cursor)},B);this.controlKeyUpListener=HCEvent.addListener(this,"keyup",function(){A.parent.parent.applet.setMouseMode("left","walk",A.cursor)},B);this.altKeyDownListener=HCEvent.addListener(this,"keydown",function(){A.parent.parent.applet.setCollisionDetection(false)},D);this.altKeyUpListener=HCEvent.addListener(this,"keyup",function(){A.parent.parent.applet.setCollisionDetection(true)},D);this.parent.parent.applet.endMessages()};walkButton.prototype.onDeselect=function(){this.parent.parent.applet.setMouseMode("middle","orbit",this.parent.parent.cameraToolbar.orbitButton.cursor);HCEvent.removeListener(this.controlKeyDownListener);HCEvent.removeListener(this.controlKeyUpListener);HCEvent.removeListener(this.shiftKeyDownListener);HCEvent.removeListener(this.shiftKeyUpListener);HCEvent.removeListener(this.altKeyDownListener);HCEvent.removeListener(this.altKeyUpListener);toolbarRadioButton.prototype.onDeselect.call(this)};walkButton.prototype.onMouseDown=function(){setStatus("Click and drag to walk. Ctrl = run, Shift = move vertically or sideways, Alt = disable collision detection");toolbarRadioButton.prototype.onMouseDown.call(this)};walkButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="walk"){this.setSelected(true)}};walkButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=walk"}return A};function lookAroundButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Pivots the camera view around a stationary point";this.helpMessage="This button sets the mouse mode to look around mode.";return this}lookAroundButton.prototype=new toolbarRadioButton();lookAroundButton.prototype.onLoad=function(){this.cursor=new HCIcon("look_around_cursor.png","center","middle")};lookAroundButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}this.parent.parent.applet.setMouseMode("left","look_around",this.cursor);this.parent.parent.applet.endMessages()};lookAroundButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="look_around"){this.setSelected(true)}};lookAroundButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=look_around"}return A};function slideButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Slide the camera parallel to the ground plane";this.helpMessage="This button sets the mouse mode to slide mode.";return this}slideButton.prototype=new toolbarRadioButton();slideButton.prototype.onLoad=function(){this.cursor=new HCIcon("slide_cursor.png","center","middle")};slideButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}this.parent.parent.applet.setMouseMode("left","slide",this.cursor);this.parent.parent.applet.setMouseMode("middle","look_around",this.parent.lookAroundButton.cursor);var B=16;var A=this;this.shiftKeyDownListener=HCEvent.addListener(this,"keydown",function(){A.parent.parent.applet.setMouseMode("left","elevate",A.parent.elevateButton.cursor)},B);this.shiftKeyUpListener=HCEvent.addListener(this,"keyup",function(){A.parent.parent.applet.setMouseMode("left","slide",A.cursor)},B);this.parent.parent.applet.endMessages()};slideButton.prototype.onDeselect=function(){this.parent.parent.applet.setMouseMode("middle","orbit",this.parent.parent.cameraToolbar.orbitButton.cursor);HCEvent.removeListener(this.shiftKeyDownListener);HCEvent.removeListener(this.shiftKeyUpListener);toolbarRadioButton.prototype.onDeselect.call(this)};slideButton.prototype.onMouseDown=function(){setStatus("Click and drag to slide, Shift = elevate");toolbarRadioButton.prototype.onMouseDown.call(this)};slideButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="slide"){this.setSelected(true)}};slideButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=slide"}return A};function elevateButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Elevate the camera perpendicular to the ground plane";this.helpMessage="This button sets the mouse mode to elevate mode.";return this}elevateButton.prototype=new toolbarRadioButton();elevateButton.prototype.onLoad=function(){this.cursor=new HCIcon("elevate_cursor.png","center","middle")};elevateButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.previousButton){if(this.parent.parent.cameraToolbar.previousButton!=null){this.parent.parent.cameraToolbar.previousButton.setEnabled(true)}}}this.parent.parent.applet.setMouseMode("left","elevate",this.cursor);this.parent.parent.applet.setMouseMode("middle","look_around",this.parent.lookAroundButton.cursor);var B=16;var A=this;this.shiftKeyDownListener=HCEvent.addListener(this,"keydown",function(){A.parent.parent.applet.setMouseMode("left","slide",A.parent.slideButton.cursor)},B);this.shiftKeyUpListener=HCEvent.addListener(this,"keyup",function(){A.parent.parent.applet.setMouseMode("left","elevate",A.cursor)},B);this.parent.parent.applet.endMessages()};elevateButton.prototype.onDeselect=function(){this.parent.parent.applet.setMouseMode("middle","orbit",this.parent.parent.cameraToolbar.orbitButton.cursor);HCEvent.removeListener(this.shiftKeyDownListener);HCEvent.removeListener(this.shiftKeyUpListener);toolbarRadioButton.prototype.onDeselect.call(this)};elevateButton.prototype.onMouseDown=function(){setStatus("Click and drag to elevate, Shift = slide");toolbarRadioButton.prototype.onMouseDown.call(this)};elevateButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"mouse_mode");if(A=="elevate"){this.setSelected(true)}};elevateButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="mouse_mode=elevate"}return A};function slideShow(A){this.parent=A;this.paused=false;this.interfaceChange=null;this.pageChange=null;return this}slideShow.prototype.onUnload=function(){if(this.pageChange!=undefined){window.clearTimeout(this.pageChange)}};slideShow.prototype.cancel=function(){if(this.interfaceChange!=null){window.clearTimeout(this.interfaceChange);this.interfaceChange=null}if(this.pageChange!=null){window.clearTimeout(this.pageChange);this.pageChange=null}};slideShow.prototype.play=function(A){this.paused=false;this.cancel();if(!this.parent.parent.parent.applet.loopSlideShow&&this.parent.parent.parent.pageToolbar.isLastPage()){this.parent.parent.parent.walkThroughToolbar.slideShowButton.setSelected(false);return }if(this.parent.parent.parent.perspectiveToolbar){this.parent.parent.parent.perspectiveToolbar.setEnabled(false)}A=this.parent.parent.parent.pageToolbar.getNextPage();this.parent.parent.parent.pageToolbar.setPage(A);var B=(this.parent.parent.parent.applet.slideTime+this.parent.parent.parent.applet.transitionTime)*1000;this.pageChange=window.setTimeout("HCApplet.getAppletById('"+this.parent.parent.parent.applet.id+"').parent.walkThroughToolbar.slideShowButton.slideShow.play()",B)};slideShow.prototype.pause=function(){this.cancel();this.paused=true;this.parent.parent.parent.applet.stopZoom();if(this.parent.parent.parent.perspectiveToolbar){this.parent.parent.parent.perspectiveToolbar.setEnabled(true)}};function slideShowButton(A,C,B){toolbarRadioButton.call(this,A,C,B,true);this.status="Show tour guide slide show";this.helpMessage="This button toggles the tour guide slide show.";this.slideShow=new slideShow(this);return this}slideShowButton.prototype=new toolbarRadioButton();slideShowButton.prototype.onLoad=function(){this.setEnabled(this.parent.parent.applet.pageNames.length>1)};slideShowButton.prototype.onUnload=function(){this.slideShow.onUnload()};slideShowButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","none",null);this.slideShow.play(this.parent.parent.pageToolbar.getPage())};slideShowButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.slideShow.pause()};slideShowButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"slide_show");if(A!=undefined){this.setSelected(A=="true")}};slideShowButton.prototype.getQueryString=function(){var A=null;if(this.selected&&!this.initiallySelected){A="slide_show="+this.selected}return A};function walkThroughToolbar(B,A,D,C){toolbar.call(this,B,null,C);this.walkButton=new walkButton("walkButton",A,this);this.lookAroundButton=new lookAroundButton("lookAroundButton",A,this);this.positionCameraButton=new positionCameraButton("positionCameraButton",A,this);this.slideButton=new slideButton("slideButton",A,this);this.elevateButton=new elevateButton("elevateButton",A,this);if(D){this.slideShowButton=new popupSlideShowButton("slideShowButton",A,this,true)}else{this.slideShowButton=new slideShowButton("slideShowButton",A,this,true)}this.slideShowButton.setEnabled(false);return this}walkThroughToolbar.prototype=new toolbar();function orthographicButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch without perspepctive";this.helpMessage="This button disables perspective display.";return this}orthographicButton.prototype=new toolbarRadioButton();orthographicButton.prototype.onLoad=function(){if(!this.parent.parent.applet.camera.perspective){toolbarRadioButton.prototype.onSelect.call(this)}};orthographicButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.camera.perspective=false;this.parent.parent.applet.setCamera(this.parent.parent.applet.camera);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.zoomButton.selected){this.parent.parent.applet.setMouseMode("left","zoom_fov",this.parent.parent.cameraToolbar.zoomButton.cursor)}if(this.parent.parent.cameraToolbar.zoomWindowButton.selected){this.parent.parent.applet.setMouseMode("left","zoom_window_fov",this.parent.parent.cameraToolbar.zoomWindowButton.cursor)}}};function perspectiveButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Display the sketch with perspective";this.helpMessage="This button enables perspective display.";return this}perspectiveButton.prototype=new toolbarRadioButton();perspectiveButton.prototype.onLoad=function(){if(this.parent.parent.applet.camera.perspective){toolbarRadioButton.prototype.onSelect.call(this)}};perspectiveButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.camera.perspective=true;this.parent.parent.applet.setCamera(this.parent.parent.applet.camera);if(this.parent.parent.cameraToolbar){if(this.parent.parent.cameraToolbar.zoomButton.selected){this.parent.parent.applet.setMouseMode("left","zoom",this.parent.parent.cameraToolbar.zoomButton.cursor)}if(this.parent.parent.cameraToolbar.zoomWindowButton.selected){this.parent.parent.applet.setMouseMode("left","zoom_window",this.parent.parent.cameraToolbar.zoomWindowButton.cursor)}}};function perspectiveToolbar(A,B){toolbar.call(this,A,null,B);var C=new radioButtonGroup();this.orthographicButton=new orthographicButton("orthographicButton",C,this);this.perspectiveButton=new perspectiveButton("perspectiveButton",C,this);return this}perspectiveToolbar.prototype=new toolbar();perspectiveToolbar.prototype.onLoad=function(){toolbar.prototype.onLoad.call(this);var A=this;this.parent.applet.setCallback("perspective",function(B){A.setPerspective(B)})};perspectiveToolbar.prototype.setPerspective=function(A){if(A){this.perspectiveButton.setSelected(true)}else{this.orthographicButton.setSelected(true)}};perspectiveToolbar.prototype.setEnabled=function(A){this.perspectiveButton.group.setEnabled(A)};function sectionPlanesButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Toggle section planes display on and off";this.helpMessage="This button toggles the display of section planes.";return this}sectionPlanesButton.prototype=new toolbarToggleButton();sectionPlanesButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.sectionPlanes);var A=this;this.parent.parent.applet.setCallback("section_planes",function(B){A.setSelected(B)})};sectionPlanesButton.prototype.onSelect=function(){this.parent.parent.applet.setSectionPlanes(true);toolbarToggleButton.prototype.onSelect.call(this)};sectionPlanesButton.prototype.onDeselect=function(){this.parent.parent.applet.setSectionPlanes(false);toolbarToggleButton.prototype.onDeselect.call(this)};sectionPlanesButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"section_planes");if(A!=undefined){this.setSelected(A=="true")}};sectionPlanesButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="section_planes=true"}return A};function sectionCutsButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Toggle section cuts display on and off";this.helpMessage="This button toggles the display of section cuts.";return this}sectionCutsButton.prototype=new toolbarToggleButton();sectionCutsButton.prototype.onLoad=function(){toolbarToggleButton.prototype.setSelected.call(this,this.parent.parent.applet.sectionCuts);var A=this;this.parent.parent.applet.setCallback("section_cuts",function(B){A.setSelected(B)})};sectionCutsButton.prototype.onSelect=function(){this.parent.parent.applet.setSectionCuts(true);toolbarToggleButton.prototype.onSelect.call(this)};sectionCutsButton.prototype.onDeselect=function(){this.parent.parent.applet.setSectionCuts(false);toolbarToggleButton.prototype.onDeselect.call(this)};sectionCutsButton.prototype.parseQueryString=function(B){var A=getQueryVariable(B,"section_cuts");if(A!=undefined){this.setSelected(A=="true")}};sectionCutsButton.prototype.getQueryString=function(){var A=null;if(this.selected!=this.initiallySelected){A="section_cuts=true"}return A};function sectionPlanesToolbar(A,B){toolbar.call(this,A,null,B);this.sectionPlanesButton=new sectionPlanesButton("sectionPlanesButton",this);this.sectionCutsButton=new sectionCutsButton("sectionCutsButton",this);return this}sectionPlanesToolbar.prototype=new toolbar();function collaborateButton(A,B){toolbarToggleButton.call(this,A,B);this.status="Collaborate";this.helpMessage="This button is used to collaborate with another person remotely over the Internet.";return this}collaborateButton.prototype=new toolbarToggleButton();collaborateButton.prototype.onSelect=function(){toolbarToggleButton.prototype.onSelect.call(this);this.parent.selectIPAddress()};collaborateButton.prototype.onDeselect=function(){toolbarToggleButton.prototype.onDeselect.call(this);this.parent.parent.applet.disconnect();this.parent.freeButton.setSelected(true);this.parent.freeButton.group.setEnabled(false)};function leadButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Lead";this.helpMessage="This button is used to lead the other collaborator.";return this}leadButton.prototype=new toolbarRadioButton();leadButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setCollaborationMode("lead")};function followButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Follow";this.helpMessage="This button is used to follow the other collaborator.";return this}followButton.prototype=new toolbarRadioButton();followButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setCollaborationMode("follow")};function freeButton(A,C,B){toolbarRadioButton.call(this,A,C,B);this.status="Disengage";this.helpMessage="This button is used to engage or disengage from collaboration.";return this}freeButton.prototype=new toolbarRadioButton();freeButton.prototype.onSelect=function(){toolbarRadioButton.prototype.onSelect.call(this);if(this.parent){if(this.parent.parent){this.parent.parent.applet.setCollaborationMode("free")}}};function collaborationToolbar(A,B){toolbar.call(this,A,null,B);this.collaborateButton=new collaborateButton("collaborateButton",this);var C=new radioButtonGroup();this.freeButton=new freeButton("freeButton",C,this);this.leadButton=new leadButton("leadButton",C,this);this.followButton=new followButton("followButton",C,this);radioButton.prototype.setSelected(this.freeButton,true);C.setEnabled(false);return this}collaborationToolbar.prototype=new toolbar();collaborationToolbar.prototype.onLoad=function(){this.parent.applet.getAttribute("ip_address");this.setCollaboration("free");var A=this;this.parent.applet.setCallback("connection",function(B){A.setConnection(B)});this.parent.applet.setCallback("collaboration",function(B){A.setCollaboration(B)})};collaborationToolbar.prototype.onUnload=function(){if(this.timeout!=undefined){window.clearTimeout(this.timeout)}};collaborationToolbar.prototype.selectIPAddress=function(){var A=true;if(A){var C="windows/ip_address_chooser.html";var B=getCSSStyle(".ip_address_chooser");if(this.parent.path){C=this.parent.path+C}HCApplet.setCurrentApplet(this.parent.applet);this.IPAddressChooser=openDialogBox(C,parseInt(B.width),parseInt(B.height))}else{this.parent.applet.connect()}};collaborationToolbar.prototype.getLocalIPAddress=function(){return this.parent.applet.IPAddress};collaborationToolbar.prototype.setRemoteIPAddress=function(A){this.remoteIPAddress=A};collaborationToolbar.prototype.getRemoteIPAddress=function(){return this.remoteIPAddress};collaborationToolbar.prototype.setRemotePort=function(A){this.remotePort=A};collaborationToolbar.prototype.getRemotePort=function(){return this.remotePort};collaborationToolbar.prototype.dismissConnectionStatusWindow=function(){if(this.connectionStatusWindow){this.connectionStatusWindow.connectionInfo.collaborationToolbar=null;this.connectionStatusWindow.close();this.connectionStatusWindow=null}};collaborationToolbar.prototype.setConnection=function(A){if(A=="connected"){if(this.connectionStatusWindow){this.timeout=window.setTimeout("HCApplet.getAppletById('"+this.parent.applet.id+"').parent.collaborationToolbar.dismissConnectionStatusWindow()",100)}this.freeButton.group.setEnabled(enabled);this.setCollaboration("free")}else{if(A=="disconnected"){this.freeButton.setSelected(true);this.freeButton.group.setEnabled(false);this.collaborateButton.setSelected(false)}}};collaborationToolbar.prototype.setCollaboration=function(A){if(A=="free"){toolbarRadioButton.prototype.onSelect.call(this.freeButton)}else{if(A=="lead"){toolbarRadioButton.prototype.onSelect.call(this.leadButton)}else{if(A="follow"){toolbarRadioButton.prototype.onSelect.call(this.followButton)}}}};function HCSketchUpCamera(A,D,B,C){this.eye=A;this.lookAt=D;this.fov=B;this.perspective=C;return this}HCSketchUpCamera.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.perspective==A.perspective))}}};HCSketchUpCamera.prototype.duplicate=function(){return new HCSketchUpCamera(this.eye,this.lookAt,this.fov,this.perspective)};HCSketchUpCamera.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,"perspective");if(C!=undefined){this.perspective=(C=="true")}};HCSketchUpCamera.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.perspective!=undefined){A=addQueryString(A,"perspective="+this.perspective)}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","bottom");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};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.fonts=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(B,D,F){var E="-add_text";if(typeof (B.text)=="string"){E+=" "+getQuotatedString(B.text)}else{if(typeof (B.text)=="object"){for(var C=0;C<B.text.length;C++){E+=" "+getQuotatedString(B.text[C])}}}E+=" "+B.location.x+" "+B.location.y+" "+B.location.z;E+=" "+B.hAlignment+" "+B.vAlignment;if(B.font){if(!B.font.loaded){this.loadFont(B.font)}var A=B.font.index+1}else{var A=0}E+=" "+A;if(D){E+=" "+D}else{if(F||B.attributes!=undefined){E+=" "+0}}if(F||B.attributes!=undefined){E+=" "+F}if(B.attributes!=undefined){for(var C=0;C<B.attributes.length;C++){E+=" "+B.attributes[C]}}this.sendMessage(E);B.visible=true};HCMarkUpApplet.prototype.addLabel=function(B,D,F){var E="-add_label";if(typeof (B.text)=="string"){E+=" "+getQuotatedString(B.text)}else{if(typeof (B.text)=="object"){for(var C=0;C<B.text.length;C++){E+=" "+getQuotatedString(B.text[C])}}}E+=" "+B.anchorPoint.x+" "+B.anchorPoint.y+" "+B.anchorPoint.z;E+=" "+B.location.x+" "+B.location.y+" "+B.location.z;if(B.font){if(!B.font.loaded){this.loadFont(B.font)}var A=B.font.index+1}else{var A=0}E+=" "+A;if(D){E+=" "+D}else{if(F||B.attributes!=undefined){E+=" "+0}}if(F||B.attributes!=undefined){E+=" "+F}if(B.attributes!=undefined){for(var C=0;C<B.attributes.length;C++){E+=" "+B.attributes[C]}}this.sendMessage(E);B.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.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.loadFont=function(A){if(A.loaded){return }A.index=this.fonts.length;this.fonts[A.index]=A;this.sendMessage("-add_font '"+A.name+"' "+A.size+" "+A.bold+" "+A.italic);A.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};function HCSketchUpApplet(C,B,E,A,D){if(!C){return this}this.camera=new HCSketchUpCamera();this.pageNames=new Array();this.pageIndex=0;this.layerNames=new Array();this.layerVisibility=new Array();this.transitionTime=1.5;this.slideTime=1;this.numSectionPlanes=0;this.sectionPlaneOrigins=new Array();this.sectionPlaneNormals=new Array();this.mouseModes=new Array();this.mouseListeners=new Array();this.connection="free";this.collaboration="disconnected";this.callbacks=new Array();if(A){A+="; "}A+="-get "+arrayToString(HCSketchUpApplet.attributeNames," ");HCMarkUpApplet.call(this,C,B,E,A,D);return this}HCSketchUpApplet.prototype=new HCMarkUpApplet();HCSketchUpApplet.prototype.setCamera=function(A){if(A.eye){this.camera.eye=A.eye;this.view=undefined;this.sendMessage("-eye "+A.eye.x+" "+A.eye.y+" "+A.eye.z)}if(A.lookAt){this.camera.lookAt=A.lookAt;this.view=undefined;this.sendMessage("-lookat "+A.lookAt.x+" "+A.lookAt.y+" "+A.lookAt.z)}if(A.fov){this.camera.fov=A.fov;this.view=undefined;this.sendMessage("-fov "+A.fov)}if(A.perspective!=undefined){this.camera.perspective=A.perspective;this.view=undefined;this.sendMessage("-perspective "+A.perspective);this.getAttributes(["eye","lookat","fov","perspective"])}};HCSketchUpApplet.prototype.setView=function(A){if(!inArray(A,HCSketchUpApplet.views)){return }if(!inArray(A,["iso","previous","auto"])){this.view=A}else{this.view=undefined}this.sendMessage("-view "+A+" 0");this.getAttributes(["eye","lookat","fov"])};HCSketchUpApplet.prototype.setDisplayMode=function(A){if(A==this.displayMode||!inArray(A,HCSketchUpApplet.displayModes)){return }this.displayMode=A;this.sendMessage("-display_mode "+A)};HCSketchUpApplet.prototype.setTexture=function(A){if(A==this.texture){return }this.texture=A;this.sendMessage("-texture "+A)};HCSketchUpApplet.prototype.setXRayMode=function(A){if(A==this.xRayMode){return }this.xRayMode=A;this.sendMessage("-x_ray "+A)};HCSketchUpApplet.prototype.setShowEdges=function(A){if(A==this.showEdges){return }this.showEdges=A;this.sendMessage("-edges "+A)};HCSketchUpApplet.prototype.setShowProfileEdges=function(A){if(A==this.showProfileEdges){return }this.showProfileEdges=A;this.sendMessage("-profile_edges "+A)};HCSketchUpApplet.prototype.setSilhouetteWidth=function(A){if(A==this.silhouetteWidth){return }this.sendMessage("-silhouette_width "+A)};HCSketchUpApplet.prototype.setAntialiasing=function(A){if(A==this.antialiasing){return }this.antialiasing=A;this.sendMessage("-antialiasing "+A)};HCSketchUpApplet.prototype.setAxes=function(A){if(A==this.showAxes){return }this.showAxes=A;this.sendMessage("-axes "+A)};HCSketchUpApplet.prototype.setSectionPlanes=function(A){if(A==this.sectionPlanes){return }this.sectionPlanes=A;this.sendMessage("-section_planes "+A)};HCSketchUpApplet.prototype.setSectionCuts=function(A){if(A==this.sectionCuts){return }this.sectionCuts=A;this.sendMessage("-section_cuts "+A)};HCSketchUpApplet.prototype.setPage=function(B,A){if(A==undefined){A=this.transitionTime}this.sendMessage("-page "+B+" "+A);this.zoomTimeout=setTimeout("HCApplet.getAppletById('"+this.parent.applet.id+"').setView('"+this.pageNames[B-1]+"')",A*1000)};HCSketchUpApplet.prototype.getPageIndex=function(){return this.pageIndex};HCSketchUpApplet.prototype.getPageName=function(A){return this.pageNames[A-1]};HCSketchUpApplet.prototype.setLayerVisible=function(A,B){this.layerVisibility[A]=B;if(B){B="visible"}else{B="invisible"}this.sendMessage("-layer "+(A+1)+" "+B)};HCSketchUpApplet.prototype.toggleLayerVisible=function(A){this.layerVisibility[A]=!this.layerVisibility[A];this.setLayerVisible(A,this.layerVisibility[A])};HCSketchUpApplet.prototype.getLayerIndex=function(A){for(var B=0;B<this.layerNames.length;B++){if(this.layerNames[B]==A){return B}}return undefined};HCSketchUpApplet.prototype.addLayer=function(A,C){var B=this.layerNames.length;this.layerNames[B]=A;this.layerVisibility[B]=C;this.sendMessage("-layer "+(B+1)+" "+C)};HCSketchUpApplet.prototype.getLayers=function(){return this.layerNames.length};HCSketchUpApplet.prototype.setTransitionTime=function(A){this.transitionTime=A};HCSketchUpApplet.prototype.setSlideTime=function(A){this.slideTime=A};HCSketchUpApplet.prototype.stopZoom=function(){this.sendMessage("-stop");window.clearTimeout(this.zoomTimeout);this.view=undefined;this.getAttributes(["eye","lookat","fov"])};HCSketchUpApplet.prototype.addSectionPlane=function(A,B){this.sectionPlaneOrigins[this.numSectionPlanes]=A;this.sectionPlaneNormals[this.numSectionPlanes]=B;this.numSectionPlanes++;this.sendMessage("-add_section_plane "+A.x+" "+A.y+" "+A.z+" "+B.x+" "+B.y+" "+B.z)};HCSketchUpApplet.prototype.setBackgroundColor=function(A){if(A.matches(this.backgroundColor)){return }this.backgroundColor=A;this.sendMessage("-background_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setConstructionColor=function(A){if(A.matches(this.constructionColor)){return }this.constructionColor=A;this.sendMessage("-construction_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setFaceBackColor=function(A){if(A.matches(this.faceBackColor)){return }this.faceBackColor=A;this.sendMessage("-face_back_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setFaceFrontColor=function(A){if(A.matches(this.faceFrontColor)){return }this.faceFrontColor=A;this.sendMessage("-face_front_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setHighlightColor=function(A){if(A.matches(this.highlightColor)){return }this.highlightColor=A;this.sendMessage("-highlight_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setLockedColor=function(A){if(A.matches(this.lockedColor)){return }this.lockedColor=A;this.sendMessage("-locked_color "+Math.floor(A.red)+" "+Math.floor(A.green)+" "+Math.floor(A.blue))};HCSketchUpApplet.prototype.setShadows=function(A){if(A==this.shadows){return }this.shadows=A;this.sendMessage("-shadows "+A)};HCSketchUpApplet.prototype.setLightCoords=function(A){if(A==this.lightCoords){return }this.lightCoords=A;if(A=="world"){this.sendMessage("-light_coords world")}else{if(A=="camera"){this.sendMessage("-light_coords camera")}}};HCSketchUpApplet.prototype.setLightDirection=function(A){if(A.equals(this.lightDirection)){return }this.lightDirection=A;this.sendMessage("-light_direction "+A.x.toFixed(3)+" "+A.y.toFixed(3)+" "+A.z.toFixed(3))};HCSketchUpApplet.prototype.setLightColor=function(A){if(A.matches(this.lightColor)){return }this.lightColor=A;this.sendMessage("-light_color "+A.red.toFixed(3)+" "+A.green.toFixed(3)+" "+A.blue.toFixed(3))};HCSketchUpApplet.prototype.setBrightness=function(A){if(A==this.brightness){return }this.brightness=A;this.sendMessage("-brightness "+A.toFixed(3))};HCSketchUpApplet.prototype.setAmbient=function(A){if(A.matches(this.ambient)){return }this.ambient=A;this.sendMessage("-ambient "+A.red.toFixed(3)+" "+A.green.toFixed(3)+" "+A.blue.toFixed(3))};HCSketchUpApplet.prototype.setMouseMode=function(C,F,D,E){this.mouseModes[C]=F;if(D){this.loadIcon(D)}if(D!=null){var B=D.index+1}else{var B=0}HCEvent.removeListener(this.mouseListeners[C]);this.mouseListeners[C]=null;if(inArray(F,HCSketchUpApplet.mouseModes)){if(!E){this.sendMessage("-mouse_mode "+C+" "+F+" "+B)}else{this.sendMessage("-mouse_mode "+C+" "+F+" "+B+" "+E)}}if(C=="left"){this.setCursor(D)}var A=this;if(inArray(F,["orbit","pan","zoom","walk","run","move","slide","elevate"])){this.mouseListeners[C]=HCEvent.addListener(this,"mouseup",function(){A.setView(undefined);A.getAttributes(["eye","lookat"])},C)}else{if(F=="zoom_fov"){this.mouseListeners[C]=HCEvent.addListener(this,"mouseup",function(){A.setView(undefined);A.getAttribute("fov")},C)}else{if(F=="look_around"){this.mouseListeners[C]=HCEvent.addListener(this,"mouseup",function(){A.setView(undefined);A.getAttribute("lookat")},C)}}}};HCSketchUpApplet.prototype.setCollisionDetection=function(A){if(A==this.collisionDetection){return }this.collisionDetection=A;this.sendMessage("-collision_detection "+A)};HCSketchUpApplet.prototype.loadSound=function(A){if(A&&A!=undefined&&A!=""){this.sendMessage("-load_sound "+A)}};HCSketchUpApplet.prototype.playSound=function(A){if(A&&A!=undefined&&A!=""){this.sendMessage("-play_sound "+A)}};HCSketchUpApplet.prototype.connect=function(C,A){var B="-connect";if(C!=undefined){B+=" "+C}if(A!=undefined){B+=" "+A}this.sendMessage(B)};HCSketchUpApplet.prototype.setCollaborationMode=function(A){if(inArray(A,["lead","follow","free"])){this.sendMessage("-collaboration "+A)}};HCSketchUpApplet.prototype.disconnect=function(A){this.sendMessage("-disconnect")};HCSketchUpApplet.prototype.setAttribute=function(A,B){if(A=="eye"){this.camera.eye=B}else{if(A=="lookat"){this.camera.lookAt=B}else{if(A=="fov"){this.camera.fov=B}else{if(A=="perspective"){this.camera.perspective=B}else{if(A=="view"){this.view=B}else{if(A=="display_mode"){this.displayMode=B}else{if(A=="texture"){this.texture=B}else{if(A=="x_ray"){this.xRayMode=B}else{if(A=="edges"){this.showEdges=B}else{if(A=="profile_edges"){this.showProfileEdges=B}else{if(A=="silhouette_width"){this.silhouetteWidth=B}else{if(A=="axes"){this.showAxes=B}else{if(A=="section_planes"){this.sectionPlanes=B}else{if(A=="section_cuts"){this.sectionCuts=B}else{if(A=="antialiasing"){this.antialising=B}else{if(A=="pages"){this.pageNames=URLsToStrings(B)}else{if(A=="page"){this.pageIndex=B}else{if(A=="layers"){this.layerNames=URLsToStrings(B)}else{if(A=="layer_visibility"){this.layerVisibility=B}else{if(A=="transition_time"){this.transitionTime=B}else{if(A=="slide_time"){this.slideTime=B}else{if(A=="loop_slide_show"){this.loopSlideShow=B}else{if(A=="units"){this.units=B}else{if(A=="shadows"){this.shadows=B}else{if(A=="light_direction"){this.lightDirection=B}else{if(A=="light_coords"){this.lightCoords=B}else{if(A=="light_color"){this.lightColor=B}else{if(A=="brightness"){this.brightness=B}else{if(A=="ambient"){this.ambient=B}else{if(A=="city"){this.city=B}else{if(A=="country"){this.country=B}else{if(A=="latitude"){this.latitude=B}else{if(A=="longitude"){this.longitude=B}else{if(A=="angle"){this.angle=B}else{if(A=="time_zone_offset"){this.timeZoneOffset=B}else{if(A=="background_color"){this.backgroundColor=B}else{if(A=="construction_color"){this.constructionColor=B}else{if(A=="face_back_color"){this.faceBackColor=B}else{if(A=="face_front_color"){this.faceFrontColor=B}else{if(A=="highlight_color"){this.highlightColor=B}else{if(A=="locked_color"){this.lockedColor=B}else{if(A=="ip_address"){this.IPAddress=B}else{if(A=="connection"){this.connection=B}else{if(A=="collaboration"){this.collaboration=B}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}if(this.callbacks[A]!=undefined){this.callbacks[A](B)}};HCSketchUpApplet.prototype.setCallback=function(A,B){this.callbacks[A]=B};HCSketchUpApplet.prototype.getAttribute=function(A){this.sendMessage("-get "+A)};HCSketchUpApplet.prototype.getAttributes=function(C){var A="";for(var B=0;B<C.length;B++){if(B!=0){A+=" "}A+=C[B]}this.sendMessage("-get "+A)};HCSketchUpApplet.mouseModes=["draw_line","freehand","tape_measure","place_text","orbit","pan","zoom","zoom_fov","zoom_window","zoom_window_fov","walk","run","move","look_around","position_camera","slide","elevate","none"];HCSketchUpApplet.views=["iso","top","front","right","back","left","previous","auto"];HCSketchUpApplet.displayModes=["wireframe","hidden_line","monochrome","shaded"];HCSketchUpApplet.attributeNames=["eye","lookat","fov","perspective","view","texture","display_mode","x_ray","edges","profile_edges","silhouette_width","axes","section_planes","section_cuts","antialiasing","pages","page","layers","layer_visibility","transition_time","slide_time","loop_slide_show","units","shadows","light_direction","light_coords","light_color","brightness","ambient","city","country","latitude","longitude","angle","offset","background_color","construction_color","face_back_color","face_front_color","highlight_color","locked_color"];HCSketchUpApplet.pageAttributeNames=["eye","lookat","fov","perspective","view","texture","display_mode","x_ray","edges","profile_edges","silhouette_width","axes","section_planes","section_cuts","antialiasing","layer_visibility","shadows","light_direction","light_coords","light_color","brightness","ambient",];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 HCSketchUpInterface(D,C,B,E,F){if(!D){return this}container.call(this,D);if(B==undefined){B=""}if(E==undefined){E=null}if(F==undefined){F=""}if(F&&(F[F.length-1]!="/")){F+="/"}if(B==""){B="-wait_for_messages"}else{B="-wait_for_messages; "+B}this.element=D;this.appletSrc=C;this.commandLine=B;this.pageSoundNames=E;this.path=F;this.windowBaseLocation=getBaseLocation(getWindowLocation());HCSketchUpInterface.interfaceIndices[D]=HCSketchUpInterface.interfaces.length;HCSketchUpInterface.interfaces[HCSketchUpInterface.interfaces.length]=this;var A=this;addEvent(window,"load",function(){A.applet=new HCSketchUpApplet("applet",A.appletSrc,A.getResources(A.path+"applet/resources"),A.commandLine,A);A.applet.onload=function(){A.applet.beginMessages();A.onLoad();A.applet.endMessages()}});addEvent(window,"unload",function(){A.onUnload()});return this}HCSketchUpInterface.prototype=new container();HCSketchUpInterface.prototype.getResources=function(A){return["transparent0.png, "+A+"/transparency/transparent0.png","transparent10.png, "+A+"/transparency/transparent10.png","transparent20.png, "+A+"/transparency/transparent20.png","transparent30.png, "+A+"/transparency/transparent30.png","transparent40.png, "+A+"/transparency/transparent40.png","transparent50.png, "+A+"/transparency/transparent50.png","transparent60.png, "+A+"/transparency/transparent60.png","transparent70.png, "+A+"/transparency/transparent70.png","transparent80.png, "+A+"/transparency/transparent80.png","transparent90.png, "+A+"/transparency/transparent90.png","transparent100.png, "+A+"/transparency/transparent100.png"]};HCSketchUpInterface.prototype.onLoad=function(){if(this.loaded){return }this.applet.setMouseMode("left","none");this.applet.setMouseMode("middle","none");this.applet.setMouseMode("right","none");this.componentGroup.call("onLoad");if(this.onload){this.onload()}this.onStart();this.loaded=true};HCSketchUpInterface.prototype.onStart=function(){this.initialCamera=this.applet.camera.duplicate();this.componentGroup.call("onStart");var B=getQueryString();if(B){var A=getQueryVariable(B,"applet");if((A==undefined)||(parseInt(A)==this.applet.index)){this.parseQueryString(getQueryString())}}this.started=true};HCSketchUpInterface.prototype.onUnload=function(){if(this.timeout!=undefined){window.clearTimeout(this.timeout)}this.componentGroup.call("onUnload")};HCSketchUpInterface.prototype.parseQueryString=function(C){if(!C){return }for(var A=0;A<this.componentGroup.components.length;A++){if(this.componentGroup.components[A].parseQueryString){this.componentGroup.components[A].parseQueryString(C)}}var B=new HCSketchUpCamera();B.parseQueryString(C);this.applet.setCamera(B)};HCSketchUpInterface.prototype.getQueryString=function(){var B=null;if(HCApplet.applets.length>1){B=addQueryString(B,"applet="+this.applet.index)}for(var A=0;A<this.componentGroup.components.length;A++){if(this.componentGroup.components[A].getQueryString){B=addQueryString(B,this.componentGroup.getComponent(A).getQueryString())}}if(this.applet.view==undefined){if(!this.applet.camera.equals(this.initialCamera)){B=addQueryString(B,this.applet.camera.getQueryString())}}return B};HCSketchUpInterface.prototype.setQueryString=function(A){if(A){setWindowLocation(this.windowBaseLocation+"?"+A)}else{setWindowLocation(this.windowBaseLocation)}};HCSketchUpInterface.getInterfaceById=function(A){return this.getInterfaceByIndex(HCSketchUpInterface.interfaceIndices[A])};HCSketchUpInterface.getInterfaceByIndex=function(A){return HCSketchUpInterface.interfaces[A]};HCSketchUpInterface.interfaces=new Array();HCSketchUpInterface.interfaceIndices=new Array();function HCSketchUpStandardInterface(D,C,A,E,F){if(!D){return this}HCSketchUpInterface.call(this,D,C,A,E,F);var B=new radioButtonGroup();this.internetToolbar=new internetToolbar("internetToolbar",this);this.standardToolbar=new standardToolbar("standardToolbar",this);this.pageToolbar=new pageTabs("pageTabs",this.path,this.pageSoundNames,this);this.layersToolbar=new layersToolbar("layersToolbar",this);this.viewsToolbar=new viewsToolbar("viewsToolbar",this);this.displayModeToolbar=new displayModeToolbar("displayModeToolbar",this);this.edgesToolbar=new edgesToolbar("edgesToolbar",this);this.shadowsToolbar=new shadowsToolbar("shadowsToolbar",this);this.principalToolbar=new principalToolbar("principalToolbar",B,this);this.markUpToolbar=new markUpToolbar("markUpToolbar",B,this);this.annotationToolbar=new annotationToolbar("annotationToolbar",B,this);this.constructionToolbar=new constructionToolbar("constructionToolbar",B,this);this.cameraToolbar=new cameraToolbar("cameraToolbar",B,this);this.walkThroughToolbar=new walkThroughToolbar("walkThroughToolbar",B,false,this);this.perspectiveToolbar=new perspectiveToolbar("perspectiveToolbar",this);this.sectionPlanesToolbar=new sectionPlanesToolbar("sectionPlanesToolbar",this);this.collaborationToolbar=new collaborationToolbar("collaborationToolbar",this);this.toolsToolbar=new toolsToolbar("toolsToolbar",this);this.toolsToolbar.addToolbar(this.internetToolbar,"Internet");this.toolsToolbar.addToolbar(this.standardToolbar,"Standard");this.toolsToolbar.addToolbar(this.toolsToolbar,"Tools");this.toolsToolbar.addToolbar(this.viewsToolbar,"Views");this.toolsToolbar.addToolbar(this.layersToolbar,"Layers");this.toolsToolbar.addToolbar(this.displayModeToolbar,"Display Mode");this.toolsToolbar.addToolbar(this.edgesToolbar,"Edges");this.toolsToolbar.addToolbar(this.shadowsToolbar,"Lighting");this.toolsToolbar.addToolbar(this.pageToolbar,"Pages");this.toolsToolbar.addToolbar(this.principalToolbar,"Principal");this.toolsToolbar.addToolbar(this.markUpToolbar,"MarkUp");this.toolsToolbar.addToolbar(this.annotationToolbar,"Annotation");this.toolsToolbar.addToolbar(this.constructionToolbar,"Construction");this.toolsToolbar.addToolbar(this.cameraToolbar,"Camera");this.toolsToolbar.addToolbar(this.walkThroughToolbar,"Walkthrough");this.toolsToolbar.addToolbar(this.perspectiveToolbar,"Perspective");this.toolsToolbar.addToolbar(this.sectionPlanesToolbar,"Section Planes");this.toolsToolbar.addToolbar(this.collaborationToolbar,"Collaboration");return this}HCSketchUpStandardInterface.prototype=new HCSketchUpInterface();HCSketchUpStandardInterface.prototype.getCursorResources=function(A){return["select_cursor.png, "+A+"/cursors/select_cursor.png","eraser_cursor.png, "+A+"/cursors/eraser_cursor.png","paint_cursor.png, "+A+"/cursors/paint_cursor.png","line_cursor.png, "+A+"/cursors/line_cursor.png","freehand_cursor.png, "+A+"/cursors/freehand_cursor.png","tape_measure_cursor.png, "+A+"/cursors/tape_measure_cursor.png","text_cursor.png, "+A+"/cursors/text_cursor.png","add_marker_cursor.png, "+A+"/cursors/add_marker_cursor.png","add_sticky_note_cursor.png, "+A+"/cursors/add_sticky_note_cursor.png","orbit_cursor.png, "+A+"/cursors/orbit_cursor.png","pan_cursor.png, "+A+"/cursors/pan_cursor.png","zoom_cursor.png, "+A+"/cursors/zoom_cursor.png","zoom_window_cursor.png, "+A+"/cursors/zoom_window_cursor.png","position_camera_cursor.png, "+A+"/cursors/position_camera_cursor.png","walk_cursor.png, "+A+"/cursors/walk_cursor.png","look_around_cursor.png, "+A+"/cursors/look_around_cursor.png","slide_cursor.png, "+A+"/cursors/slide_cursor.png","elevate_cursor.png, "+A+"/cursors/elevate_cursor.png"]};HCSketchUpStandardInterface.prototype.getMarkerResources=function(A){return["marker.png, "+A+"/overlays/marker.png","markerA.png, "+A+"/overlays/markerA.png","markerB.png, "+A+"/overlays/markerB.png","markerC.png, "+A+"/overlays/markerC.png","markerD.png, "+A+"/overlays/markerD.png","markerE.png, "+A+"/overlays/markerE.png","markerF.png, "+A+"/overlays/markerF.png","markerG.png, "+A+"/overlays/markerG.png","markerH.png, "+A+"/overlays/markerH.png","markerI.png, "+A+"/overlays/markerI.png","markerJ.png, "+A+"/overlays/markerJ.png","markerK.png, "+A+"/overlays/markerK.png","markerL.png, "+A+"/overlays/markerL.png","markerM.png, "+A+"/overlays/markerM.png","markerN.png, "+A+"/overlays/markerN.png","markerO.png, "+A+"/overlays/markerO.png","markerP.png, "+A+"/overlays/markerP.png","markerQ.png, "+A+"/overlays/markerQ.png","markerR.png, "+A+"/overlays/markerR.png","markerS.png, "+A+"/overlays/markerS.png","markerT.png, "+A+"/overlays/markerT.png","markerU.png, "+A+"/overlays/markerU.png","markerV.png, "+A+"/overlays/markerV.png","markerW.png, "+A+"/overlays/markerW.png","markerX.png, "+A+"/overlays/markerX.png","markerY.png, "+A+"/overlays/markerY.png","markerZ.png, "+A+"/overlays/markerZ.png"]};HCSketchUpStandardInterface.prototype.getResources=function(A){return HCSketchUpInterface.prototype.getResources.call(this,A).concat(HCSketchUpStandardInterface.prototype.getCursorResources.call(this,A).concat(HCSketchUpStandardInterface.prototype.getMarkerResources.call(this,A)))};HCSketchUpStandardInterface.prototype.onLoad=function(){this.markUp=new HCMarkUp(this.applet,new RGBColor(255,0,0),new HCAlphabetIcons());HCSketchUpInterface.prototype.onLoad.call(this)};HCSketchUpStandardInterface.prototype.onStart=function(){this.applet.setMouseMode("middle","orbit",this.cameraToolbar.orbitButton.cursor);this.cameraToolbar.orbitButton.setSelected(true);HCSketchUpInterface.prototype.onStart.call(this)};HCSketchUpStandardInterface.prototype.parseSectionPlanesQueryString=function(A){var I=getQueryVariables(A,"section_plane");if(I!=undefined){for(var B=0;B<I.length;B++){var E=I[B].split(",");var G,F,D;G=parseFloat(E[0]);F=parseFloat(E[1]);D=parseFloat(E[2]);var H=new HCVector3(G,F,D);G=parseFloat(E[3]);F=parseFloat(E[4]);D=parseFloat(E[5]);var C=new HCVector3(G,F,D);this.applet.addSectionPlane(H,C)}}};HCSketchUpStandardInterface.prototype.parseQueryString=function(A){this.markUp.parseQueryString(A);this.parseSectionPlanesQueryString(A);HCSketchUpInterface.prototype.parseQueryString.call(this,A)};HCSketchUpStandardInterface.prototype.getQueryString=function(){var A=HCSketchUpInterface.prototype.getQueryString.call(this);return addQueryString(A,this.markUp.getQueryString())};