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 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 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 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.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);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){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 checkboxes(A,B){component.call(this,A,B);this.checkboxLabels=new Array();this.checkboxChecks=new Array();this.index=checkboxes.checkboxSets.length;checkboxes.checkboxSets[checkboxes.checkboxSets.length]=this;return this}checkboxes.prototype=new component();checkboxes.prototype.onClick=function(A){this.checkboxChecks[A]=!this.checkboxChecks[A]};checkboxes.prototype.addCheckbox=function(A,B){this.checkboxLabels[this.checkboxLabels.length]=A;this.checkboxChecks[this.checkboxChecks.length]=B;this.update()};checkboxes.prototype.getCheckboxNumber=function(){return this.checkboxChecks.length};checkboxes.prototype.getCheckboxLabel=function(A){return this.checkboxLabels[A]};checkboxes.prototype.isCheckboxChecked=function(A){return this.checkboxChecks[A]};checkboxes.prototype.getCheckboxIndex=function(A){for(var B=0;B<this.checkboxLabels.length;B++){if(this.checkboxLabels[B]==A){return B}}return null};checkboxes.prototype.setCheckbox=function(A,B){this.checkboxChecks[A]=B;this.update()};checkboxes.prototype.setAllCheckboxes=function(B){for(var A=0;A<this.checkboxChecks.length;A++){this.checkboxChecks[A]=B}this.update()};checkboxes.prototype.update=function(){if(!this.element){return }var B="";B+='<table border="0" cellpadding="0" cellspacing="0" class="label">';for(var A=0;A<this.checkboxChecks.length;A++){B+="<tr>";B+='<td><input type="checkbox" id="checkbox1" value="checkbox" ';if(this.checkboxChecks[A]){B+='checked="checked" '}B+='onclick="checkboxes.checkboxSets['+this.index+"].onClick("+A+')"';B+=">";B+=this.checkboxLabels[A];B+="</td>";B+="</tr>"}B+="</table>";this.element.innerHTML=B};checkboxes.checkboxSets=new Array();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 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 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 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.setMouseMode("right","none",null);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 gettingStartedToolbar(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.zoomExtentsButton=new zoomExtentsButton("zoomExtentsButton",this);this.tapeMeasureButton=new tapeMeasureButton("tapeMeasureButton",A,this);return this}gettingStartedToolbar.prototype=new toolbar();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 layerCheckboxes(A,B){checkboxes.call(this,A,B);return this}layerCheckboxes.prototype=new checkboxes();layerCheckboxes.prototype.onLoad=function(){for(var C=0;C<this.parent.applet.layerNames.length;C++){var B=this.parent.applet.layerNames[C];if((B.charAt(0)!="(")||(B.charAt(B.length-1)!=")")){this.addLayer(B,this.parent.applet.layerVisibility[C])}}var A=this;var D=function(F){for(var E=0;E<F.length;E++){A.setLayerVisible(E,F[E])}};this.parent.applet.setCallback("layer_visibility",D)};layerCheckboxes.prototype.onStart=function(){this.initiallayerVisibility=new Array();for(counter=0;counter<this.parent.applet.layerVisibility.length;counter++){this.initiallayerVisibility[counter]=this.parent.applet.layerVisibility[counter]}};layerCheckboxes.prototype.onClick=function(A){checkboxes.prototype.onClick.call(this,A);this.parent.applet.setLayerVisible(A,this.isLayerVisible(A))};layerCheckboxes.prototype.addLayer=function(A,B){this.addCheckbox(A,B)};layerCheckboxes.prototype.isLayerVisible=function(A){return this.isCheckboxChecked(A)};layerCheckboxes.prototype.setLayerVisible=function(A,B){this.setCheckbox(A,B)};layerCheckboxes.prototype.toggleLayerVisible=function(A){this.setCheckbox(A,!this.isCheckboxChecked(A))};layerCheckboxes.prototype.parseQueryString=function(C){if(!C){return }for(var A=0;A<this.parent.applet.layerVisibility.length;A++){var B=getQueryVariable(C,"layer"+A);if(B!=undefined){this.parent.applet.setlayerVisibility(A,(B=="true"))}}this.parent.applet.getAttribute("layer_visibility")};layerCheckboxes.prototype.getQueryString=function(){var B=null;for(var A=0;A<this.parent.applet.layerVisibility.length;A++){if(this.parent.applet.layerVisibility[A]!=this.initiallayerVisibility[A]){B=addQueryString(B,"layer"+A+"="+this.parent.applet.layerVisibility[A])}}return B};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 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 HCSketchUpGettingStartedInterface(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.gettingStartedToolbar=new gettingStartedToolbar("gettingStartedToolbar",B,this);this.pageToolbar=new pageTabs("pageTabs",this.path,this.pageSoundNames,this);return this}HCSketchUpGettingStartedInterface.prototype=new HCSketchUpInterface();HCSketchUpGettingStartedInterface.prototype.getCursorResources=function(A){return["orbit_cursor.png, "+A+"/cursors/orbit_cursor.png","pan_cursor.png, "+A+"/cursors/pan_cursor.png","zoom_cursor.png, "+A+"/cursors/zoom_cursor.png","tape_measure_cursor.png, "+A+"/cursors/tape_measure_cursor.png"]};HCSketchUpGettingStartedInterface.prototype.getResources=function(A){return HCSketchUpInterface.prototype.getResources.call(this,A).concat(HCSketchUpGettingStartedInterface.prototype.getCursorResources.call(this,A))};HCSketchUpGettingStartedInterface.prototype.onStart=function(){this.gettingStartedToolbar.orbitButton.setSelected(true);HCSketchUpInterface.prototype.onStart.call(this)};function HCSketchUpLayerControlInterface(C,B,A,D,E){if(!C){return }HCSketchUpGettingStartedInterface.call(this,C,B,A,D,E);this.layerCheckboxes=new layerCheckboxes("layerCheckboxes",this);return this}HCSketchUpLayerControlInterface.prototype=new HCSketchUpGettingStartedInterface();
