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 k=d.height;if(a==0){a=getElementAttribute(d,"width")}if(k==0){k=getElementAttribute(d,"height")}var b="<span "+e+h+c+' style="width:'+a+"px; height:"+k+"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 m=this.parallel(e);var l=Math.cos(f*Math.PI/180);var h=Math.sin(f*Math.PI/180);var g=b.scaledBy(l);var k=a.scaledBy(h);var d=(g.plus(k)).plus(m);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 l=this.parallel(d);var k=Math.cos(e*Math.PI/180);var g=Math.sin(e*Math.PI/180);var f=b.scaledBy(k);var h=a.scaledBy(g);return(f.plus(h)).plus(l)}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!=undefined){if(this.element.clientWidth>this.element.clientHeight){this.orientation="horizontal"}else{this.orientation="vertical"}}this.handleElement=getElementById("handle",this.element);this.handleHotSpotElement=getElementById("hotSpot",this.handleElement);this.textFieldElement=getElementById(a);if(!this.handleHotSpotElement){this.handleHotSpotElement=this.handleElement}this.sliderHandleX=0;this.sliderHandleY=0;this.onmousemove=null;this.onmouseup=null;this.onchange=null;var d=this;if(this.visible){this.width=this.element.clientWidth;this.height=this.element.clientHeight;if(this.handleElement){this.handleElement.style.position="relative";this.handleElement.style.cursor="default";this.handleHotSpotElement.onmousedown=function(h){d.onMouseDown(h)};this.handleHotSpotElement.onmouseup=function(h){d.onMouseUp(h)}}if(this.textFieldElement){this.textFieldElement.onchange=function(h){d.setValue(parseInt(d.textFieldElement.value))}}}this.setValue(e);if(this.element!=undefined){this.element.style.overflow="hidden"}return this}slider.prototype=new component();slider.prototype.setValue=function(a){if(a<this.minValue){a=this.minValue}if(a>this.maxValue){a=this.maxValue}if(a!=this.value){this.value=a;this.positionHandle();this.onChange()}};slider.prototype.getValue=function(){return this.value};slider.prototype.positionHandle=function(){if(this.handleElement&&(this.element!=undefined)){if(this.orientation=="horizontal"){var a=this.element.clientWidth-this.handleElement.clientWidth;var b=(this.value-this.minValue)/(this.maxValue-this.minValue)*a;this.handleElement.style.left=b+"px";this.sliderHandleX=b}else{var c=this.element.clientHeight-this.handleElement.clientHeight;var b=(this.value-this.minValue)/(this.maxValue-this.minValue)*c;this.handleElement.style.top=b+"px";this.sliderHandleY=b}}};slider.prototype.onMouseDown=function(c){if(!this.visible){return}if(!c){c=window.event}this.mouseDownX=c.clientX;this.mouseDownY=c.clientY;var b=this;this.moveHandler=function(e){b.onMouseMove(e)};this.upHandler=function(e){b.onMouseUp(e)};if(document.addEventListener){document.addEventListener("mousemove",this.moveHandler,true);document.addEventListener("mouseup",this.upHandler,true)}else{if(document.attachEvent){this.handleElement.setCapture();this.handleElement.attachEvent("onmousemove",this.moveHandler);this.handleElement.attachEvent("onmouseup",this.upHandler);this.handleElement.attachEvent("onlosecapture",this.upHandler)}else{var a=document.onmousemove;var d=document.onmouseup;document.onmousemove=this.moveHandler;document.onmouseup=this.upHandler}}if(c.stopPropagation){c.stopPropagation()}else{c.cancelBubble=true}if(c.preventDefault){c.preventDefault()}else{c.returnValue=false}};slider.prototype.onMouseUp=function(a){if(!this.visible){return}if(!a){a=window.event}this.sliderHandleX+=a.clientX-this.mouseDownX;this.sliderHandleY+=this.mouseDownY-a.clientY;if(document.removeEventListener){if(this.upHandler){document.removeEventListener("mouseup",this.upHandler,true)}if(this.moveHandler){document.removeEventListener("mousemove",this.moveHandler,true)}}else{if(document.detachEvent){if(this.upHandler){this.handleElement.detachEvent("onlosecapture",this.upHandler);this.handleElement.detachEvent("onmouseup",this.upHandler)}if(this.moveHandler){this.handleElement.detachEvent("onmousemove",this.moveHandler)}this.handleElement.releaseCapture()}else{document.onmouseup=olduphandler;document.onmousemove=oldmovehandler}}if(this.onmouseup){this.onmouseup()}if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}};slider.prototype.stringToValue=function(a){if(this.maxValue>1){return parseInt(a)}else{return parseFloat(a)}};slider.prototype.valueToString=function(a){if(this.maxValue>1){return this.value.toFixed(0)}else{return this.value.toPrecision(textFieldElement.getAttribute("maxlength"))}};slider.prototype.onMouseMove=function(f){if(!f){f=window.event}if(this.orientation=="horizontal"){var b=f.clientX-this.mouseDownX;var d=this.sliderHandleX+b;var e=this.element.offsetWidth-this.handleElement.clientWidth;if((d>=0)&&(d<=e)){this.value=this.minValue+(d/e)*(this.maxValue-this.minValue);this.handleElement.style.left=d+"px"}}else{var a=f.clientY-this.mouseDownY;var c=this.sliderHandleY-a;var g=this.element.offsetHeight-this.handleElement.clientHeight;if((c>=0)&&(c<=g)){this.value=this.minValue+(c/g)*(this.maxValue-this.minValue);this.handleElement.style.top=-c+"px"}}this.onChange();if(this.onmousemove){this.onmousemove()}if(f.stopPropagation){f.stopPropagation()}else{f.cancelBubble=true}};slider.prototype.onChange=function(a){if(this.textFieldElement){this.textFieldElement.value=this.valueToString(this.value)}if(this.onchange){this.onchange()}};slider.prototype.onResize=function(a){if(this.width!=this.element.clientWidth||this.height!=this.element.clientHeight){this.positionHandle();this.width=this.element.clientWidth;this.height=this.element.clientHeight}};function tabs(b,a,c){component.call(this,b,c);this.selectedTab=null;this.tabNames=new Array();this.tabVisibilities=new Array();if(this.element&&!tabs.images){tabs.images=new Array();tabs.images["selected left"]=new Image();tabs.images["selected left"].src=a+"tab-selected-left.png";tabs.images["selected middle"]=new Image();tabs.images["selected middle"].src=a+"tab-selected-middle.png";tabs.images["selected right"]=new Image();tabs.images["selected right"].src=a+"tab-selected-right.png";tabs.images["unselected left"]=new Image();tabs.images["unselected left"].src=a+"tab-unselected-left.png";tabs.images["unselected middle"]=new Image();tabs.images["unselected middle"].src=a+"tab-unselected-middle.png";tabs.images["unselected right"]=new Image();tabs.images["unselected right"].src=a+"tab-unselected-right.png";tabs.images.blank=new Image();tabs.images.blank.src=a+"tab-blank.gif"}return this}tabs.prototype=new component();tabs.prototype.addTab=function(a,b){this.tabNames[this.tabNames.length]=a;this.tabVisibilities[this.tabVisibilities.length]=(b!=false);this.update()};tabs.prototype.addTabs=function(c,a){for(var b=0;b<c.length;b++){this.tabNames[this.tabNames.length]=c[b];this.tabVisibilities[this.tabVisibilities.length]=((a==undefined)||(a[b]!=false))}this.update()};tabs.prototype.getTabs=function(){return this.tabNames.length};tabs.prototype.getTabName=function(a){return this.tabNames[a]};tabs.prototype.isTabVisible=function(a){return this.tabVisibilities[a]};tabs.prototype.setTab=function(a){this.selectedTab=a;this.update()};tabs.prototype.getTab=function(){return this.selectedTab};tabs.prototype.onClick=function(a){this.setTab(a)};tabs.prototype.createSelectedTab=function(b,g){var d=document.createElement("table");d.border=0;d.cellPadding=0;d.cellSpacing=0;d.style.cursor="default";var f=d.insertRow(0);var a,e,c=0;a=f.insertCell(c++);e=document.createElement("img");e.src=tabs.images["selected left"].src;a.appendChild(e);a=f.insertCell(c++);a.setAttribute("background",tabs.images["selected middle"].src);a.appendChild(document.createTextNode("\u00A0"));a=f.insertCell(c++);a.setAttribute("background",tabs.images["selected middle"].src);a.appendChild(document.createTextNode(b));a.className="tab-selected";a.onclick=g;a=f.insertCell(c++);a.setAttribute("background",tabs.images["selected middle"].src);a.appendChild(document.createTextNode("\u00A0"));a=f.insertCell(c++);e=document.createElement("img");e.src=tabs.images["selected right"].src;a.appendChild(e);return d};tabs.prototype.createUnselectedTab=function(b,g){var d=document.createElement("table");d.border=0;d.cellPadding=0;d.cellSpacing=0;d.style.cursor="default";var f=d.insertRow(0);var a,e,c=0;a=f.insertCell(c++);e=document.createElement("img");e.src=tabs.images["unselected left"].src;a.appendChild(e);a=f.insertCell(c++);a.setAttribute("background",tabs.images["unselected middle"].src);a.appendChild(document.createTextNode("\u00A0"));a=f.insertCell(c++);a.setAttribute("background",tabs.images["unselected middle"].src);a.appendChild(document.createTextNode(b));a.className="tab-unselected";a.onclick=g;a=f.insertCell(c++);a.setAttribute("background",tabs.images["unselected middle"].src);a.appendChild(document.createTextNode("\u00A0"));a=f.insertCell(c++);e=document.createElement("img");e.src=tabs.images["unselected right"].src;a.appendChild(e);return d};tabs.prototype.createTabs=function(e){if(e.length==0){return}var f=document.createElement("table");f.border=0;f.width="100%";f.cellPadding=0;f.cellSpacing=0;var g=f.insertRow(0);g.align="left";g.vAlign="bottom";for(var c=0;c<e.length;c++){if(this.tabVisibilities[c]){var b=this;if(c==this.selectedTab-1){var d=this.createSelectedTab(e[c],getClosure(this,"onClick",(c+1)))}else{var d=this.createUnselectedTab(e[c],getClosure(this,"onClick",(c+1)))}var a=g.insertCell(c);a.style.padding=0;a.appendChild(d)}}var a=g.insertCell(e.length);a.width="100%";a.height=tabs.images.blank.height;a.style.padding=0;a.setAttribute("background",tabs.images.blank.src);return f};tabs.prototype.update=function(){if(!this.element||(this.tabNames.length==0)){return}else{this.setElement(this.createTabs(this.tabNames))}};function toolbar(a,c,b){container.call(this,a,c,b);this.handle=getElementById("handle",this.element);return this}toolbar.prototype=new container();toolbar.prototype.addControl=function(b){this.control=b;if(this.handle&&b){var a=this;this.handle.onclick=function(){a.setVisible(false)}}};toolbar.prototype.setVisible=function(a){component.prototype.setVisible.call(this,a);if(a){this.call("onShow")}this.parent.call("onMove");if(this.control){this.control.update()}};toolbar.prototype.onMove=function(a){this.call("onMove")};toolbar.prototype.onLoad=function(){this.componentGroup.call("onLoad")};toolbar.prototype.onStart=function(){this.componentGroup.call("onStart")};toolbar.prototype.onUnload=function(){this.componentGroup.call("onUnload")};toolbar.prototype.parseQueryString=function(a){for(i=0;i<this.componentGroup.components.length;i++){if(this.componentGroup.getComponent(i).parseQueryString){this.componentGroup.getComponent(i).parseQueryString(a)}}};toolbar.prototype.getQueryString=function(){var a=null;for(i=0;i<this.componentGroup.components.length;i++){if(this.componentGroup.getComponent(i).getQueryString){a=addQueryString(a,this.componentGroup.getComponent(i).getQueryString())}}return a};function toolbarButton(a,b,d){button.call(this,a,b);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var c="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){c=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarButton.highlightedImage){toolbarButton.highlightedImage=new Image();toolbarButton.highlightedImage.src=c+"highlighted_button.gif"}if(!toolbarButton.pressedImage){toolbarButton.pressedImage=new Image();toolbarButton.pressedImage.src=c+"pressed_button.gif"}}if(d==undefined){d=true}this.showHelp=d;this.helpMessage="";return this}toolbarButton.prototype=new button();toolbarButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.showHighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.showPressed=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarButton.prototype.showDisabled=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}button.prototype.onMouseOver.call(this)};toolbarButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}button.prototype.onMouseOut.call(this)};toolbarButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return}}}}}}button.prototype.onMouseDown.call(this)};toolbarButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}button.prototype.onMouseUp.call(this)};function toolbarToggleButton(a,b,d){toggleButton.call(this,a,b);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var c="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){c=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarToggleButton.highlightedImage){toolbarToggleButton.highlightedImage=new Image();toolbarToggleButton.highlightedImage.src=c+"highlighted_button.gif"}if(!toolbarToggleButton.pressedImage){toolbarToggleButton.pressedImage=new Image();toolbarToggleButton.pressedImage.src=c+"pressed_button.gif"}if(!toolbarToggleButton.selectedImage){toolbarToggleButton.selectedImage=new Image();toolbarToggleButton.selectedImage.src=c+"selected_button.gif"}}if(d==undefined){d=true}this.showHelp=d;this.helpMessage="";return this}toolbarToggleButton.prototype=new toggleButton();toolbarToggleButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showHighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showPressed=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.showSelected=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.showDisabled=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarToggleButton.prototype.showSelectedDisabled=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarToggleButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarToggleButton.prototype.onShow=function(){if(this.enabled){if(this.selected){this.showSelected()}else{this.showUnhighlighted()}}else{if(this.selected){this.showSelectedDisabled()}else{this.showDisabled()}}};toolbarToggleButton.prototype.onMove=function(){if(this.selected){if(this.enabled){this.showSelected()}else{this.showSelectedDisabled()}}};toolbarToggleButton.prototype.onSelect=function(){toggleButton.prototype.onSelect.call(this)};toolbarToggleButton.prototype.onDeselect=function(){toggleButton.prototype.onDeselect.call(this)};toolbarToggleButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}toggleButton.prototype.onMouseOver.call(this)};toolbarToggleButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}toggleButton.prototype.onMouseOut.call(this)};toolbarToggleButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return}}}}}}toggleButton.prototype.onMouseDown.call(this)};toolbarToggleButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}toggleButton.prototype.onMouseUp.call(this)};function toolbarRadioButton(c,b,d,a,f){radioButton.call(this,c,b,d,a);if(this.element){this.table=document.createElement("table");this.table.border=0;this.table.cellPadding=0;this.table.cellSpacing=0;this.row=this.table.insertRow(0);this.cell=this.row.insertCell(0);this.cell.style.padding=0;this.image=document.createElement("img");this.image.src=this.imageSrc;this.cell.appendChild(this.image);this.setElement(this.table);this.setActivated(true);if(isDefined("correctPNG")){correctPNG(this.image)}var e="../images/toolbars/buttons/";if(this.parent){if(this.parent.parent){if(this.parent.parent.path!=undefined){e=this.parent.parent.path+"images/toolbars/buttons/"}}}if(!toolbarRadioButton.highlightedImage){toolbarRadioButton.highlightedImage=new Image();toolbarRadioButton.highlightedImage.src=e+"highlighted_button.gif"}if(!toolbarRadioButton.pressedImage){toolbarRadioButton.pressedImage=new Image();toolbarRadioButton.pressedImage.src=e+"pressed_button.gif"}if(!toolbarRadioButton.selectedImage){toolbarRadioButton.selectedImage=new Image();toolbarRadioButton.selectedImage.src=e+"selected_button.gif"}}if(f==undefined){f=true}this.showHelp=f;this.helpMessage="";return this}toolbarRadioButton.prototype=new radioButton();toolbarRadioButton.prototype.showUnhighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showHighlighted=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.highlightedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showPressed=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.pressedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.showSelected=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.imageSrc;this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.showDisabled=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="static";this.image.style.clip="rect(auto auto auto auto)"};toolbarRadioButton.prototype.showSelectedDisabled=function(){if(!this.isVisible()){return}this.table.width=this.getWidth();this.table.height=this.getHeight();this.table.style.background="url("+toolbarRadioButton.selectedImage.src+")";this.cell.width=this.table.width;this.cell.height=this.table.height;this.image.src=this.getDisabledImageName(this.imageSrc);this.image.style.position="absolute";this.image.style.left=(this.getLeft()+1)+"px";this.image.style.top=(this.getTop()+1)+"px";this.image.style.clip="rect(auto "+(this.cell.width-1)+"px "+(this.cell.height-1)+"px auto)"};toolbarRadioButton.prototype.onShow=function(){if(this.enabled){if(this.selected){this.showSelected()}else{this.showUnhighlighted()}}else{if(this.selected){this.showSelectedDisabled()}else{this.showDisabled()}}};toolbarRadioButton.prototype.onMove=function(){if(this.selected){if(this.enabled){this.showSelected()}else{this.showSelectedDisabled()}}};toolbarRadioButton.prototype.onMouseOver=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}radioButton.prototype.onMouseOver.call(this)};toolbarRadioButton.prototype.onMouseOut=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}radioButton.prototype.onMouseOut.call(this)};toolbarRadioButton.prototype.onMouseDown=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){this.parent.parent.standardToolbar.helpButton.showHelpMessage(this.helpMessage);return}}}}}}radioButton.prototype.onMouseDown.call(this)};toolbarRadioButton.prototype.onMouseUp=function(){if(this.showHelp){if(this.parent){if(this.parent.parent){if(this.parent.parent.standardToolbar){if(this.parent.parent.standardToolbar.helpButton){if(this.parent.parent.standardToolbar.helpButton.selected){return}}}}}}radioButton.prototype.onMouseUp.call(this)};function searchToolbar(a,b){toolbar.call(this,a,null,b);this.searchButton=getElementById("searchButton",this.element);this.searchTextField=getElementById("searchTextField",this.element);return this}searchToolbar.prototype=new toolbar();searchToolbar.prototype.onLoad=function(){toolbar.prototype.onLoad.call(this);var a=this;this.searchButton.onclick=function(){a.parent.searchFor(a.searchTextField.value)}};searchToolbar.prototype.searchFor=function(a){this.searchTextField.value=a;this.parent.searchFor(a)};searchToolbar.prototype.parseQueryString=function(b){var a=getQueryVariable(b,"search");if(a!=undefined){this.searchFor(a)}};searchToolbar.prototype.getQueryString=function(){var a=this.searchTextField.value;return"search="+a};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");this.parent.parent.applet.loadIcon(this.cursor)};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");this.parent.parent.applet.loadIcon(this.cursor)};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");this.parent.parent.applet.loadIcon(this.cursor)};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");this.parent.parent.applet.loadIcon(this.cursor)};tapeMeasureButton.prototype.onSelect=function(){this.parent.parent.applet.beginMessages();toolbarRadioButton.prototype.onSelect.call(this);this.parent.parent.applet.setMouseMode("left","tape_measure",this.cursor);this.parent.parent.applet.endMessages()};tapeMeasureButton.prototype.onDeselect=function(){toolbarRadioButton.prototype.onDeselect.call(this);this.parent.parent.applet.setMouseMode("left","none",null)};tapeMeasureButton.prototype.parseQueryString=function(b){var a=getQueryVariable(b,"mouse_mode");if(a=="tape_measure"){this.setSelected(true)}};tapeMeasureButton.prototype.getQueryString=function(){var a=null;if(this.selected&&!this.initiallySelected){a="mouse_mode=tape_measure"}return a};function 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 HCAlphabetIcons(a,b){if(!a){a="marker"}if(!b){b=".png"}this.prefix=a;this.suffix=b;this.nextIcon=null;this.nextIconIndex=0;return this}HCAlphabetIcons.prototype.getNextAlphabeticalIcon=function(){var c=byteToChar(charToByte("A")+this.nextIconIndex%26);var a=this.prefix+c+this.suffix;var b=new HCIcon(a,"center","bottom");return b};HCAlphabetIcons.prototype.toFirstIcon=function(){this.nextIconIndex=0;this.nextIcon=this.getNextAlphabeticalIcon()};HCAlphabetIcons.prototype.getNextIcon=function(){var a=this.nextIcon;this.nextIconIndex++;this.nextIcon=this.getNextAlphabeticalIcon();return a};function 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 k=parseFloat(f[0]);var h=parseFloat(f[1]);var g=parseFloat(f[2]);this.eye=new HCVector3(k,h,g)}var b=getQueryVariable(a,"lookat");if(b!=undefined){var f=b.split(",");var k=parseFloat(f[0]);var h=parseFloat(f[1]);var g=parseFloat(f[2]);this.lookAt=new HCVector3(k,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,k){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,k,e)}}else{a.handler(c,k,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 HCSketchUpSearchInterface(d,c,b,e,f){if(!d){return this}HCSketchUpInterface.call(this,d,c,b,e,f);this.numReferences=0;this.titles=new Array();this.locations=new Array();this.descriptions=new Array();this.keywords=new Array();this.mouseModeButtons=new radioButtonGroup();this.internetToolbar=new internetToolbar("internetToolbar",this);this.gettingStartedToolbar=new gettingStartedToolbar("gettingStartedToolbar",this.mouseModeButtons,this);this.pageToolbar=new pageTabs("pageTabs",this.path,this.pageSoundNames,this);this.searchToolbar=new searchToolbar("searchToolbar",this);var a=this;if(window.addEvent){window.addEvent(window,"resize",function(){a.call("onResize")})}else{window.prevClientWidth=0;window.prevClientHeight=0;window.checkWindowSize=function(){if(window.clientWidth!=window.prevClientWidth||window.clientHeight!=window.prevClientHeight){a.call("onResize")}setTimeout("window.checkWindowSize()",100)};setTimeout("window.checkWindowSize()",100)}return this}HCSketchUpSearchInterface.prototype=new HCSketchUpInterface();HCSketchUpSearchInterface.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"]};HCSketchUpSearchInterface.prototype.getMarkerResources=function(a){return["marker.png, "+a+"/overlays/marker.png","markerA.png, "+a+"/overlays/markerA.png","markerB.png, "+a+"/overlays/markerB.png","markerC.png, "+a+"/overlays/markerC.png","markerD.png, "+a+"/overlays/markerD.png","markerE.png, "+a+"/overlays/markerE.png","markerF.png, "+a+"/overlays/markerF.png","markerG.png, "+a+"/overlays/markerG.png","markerH.png, "+a+"/overlays/markerH.png","markerI.png, "+a+"/overlays/markerI.png","markerJ.png, "+a+"/overlays/markerJ.png","markerK.png, "+a+"/overlays/markerK.png","markerL.png, "+a+"/overlays/markerL.png","markerM.png, "+a+"/overlays/markerM.png","markerN.png, "+a+"/overlays/markerN.png","markerO.png, "+a+"/overlays/markerO.png","markerP.png, "+a+"/overlays/markerP.png","markerQ.png, "+a+"/overlays/markerQ.png","markerR.png, "+a+"/overlays/markerR.png","markerS.png, "+a+"/overlays/markerS.png","markerT.png, "+a+"/overlays/markerT.png","markerU.png, "+a+"/overlays/markerU.png","markerV.png, "+a+"/overlays/markerV.png","markerW.png, "+a+"/overlays/markerW.png","markerX.png, "+a+"/overlays/markerX.png","markerY.png, "+a+"/overlays/markerY.png","markerZ.png, "+a+"/overlays/markerZ.png"]};HCSketchUpSearchInterface.prototype.getResources=function(a){return HCSketchUpInterface.prototype.getResources.call(this,a).concat(HCSketchUpSearchInterface.prototype.getCursorResources.call(this,a).concat(HCSketchUpSearchInterface.prototype.getMarkerResources.call(this,a)))};HCSketchUpSearchInterface.prototype.onStart=function(){this.gettingStartedToolbar.orbitButton.setSelected(true);this.icons=new HCAlphabetIcons();HCSketchUpInterface.prototype.onStart.call(this)};HCSketchUpSearchInterface.prototype.searchFor=function(f){var c="";var b=0;var n;n=f.split(" ");this.applet.clearOverlays();this.icons.toFirstIcon();c+="<html>";c+="<head>";c+='<link href="'+this.path+'styles/text_styles.css" rel="stylesheet" type="text/css">';c+="</head>";c+="<body>";for(var k=0;k<n.length;k++){for(var h=0;h<this.numReferences;h++){var d=this.titles[h].match(n[k]);if(!d&&this.descriptions[h]){d=this.descriptions[h].match(n[k])}if(!d&&this.keywords[h]){for(var g=0;g<this.keywords[h].length;g++){if(!d){d=this.keywords[h][g].match(n[k])}}}if(d){var a=byteToChar(charToByte("A")+b%26);var m="marker"+a+".png";c+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';c+="<tr>";c+='<td valign="top" width="1"><img src="'+this.path+"images/markers/"+m+'" width="20" height="34"></td>';c+='<td width="15"></td>';c+='<td><span class="title">';c+=this.titles[h];c+="</span>";if(this.descriptions[h]){c+='</br><span class="normal">'+this.descriptions[h]+"</span>"}c+="</td>";c+="</tr>";c+="</table>";c+="<br>";var e=0;var l=this.icons.getNextIcon();if(this.locations[h]){for(var g=0;g<this.locations[h].length;g++){this.applet.addOverlay(new HCMarker(this.locations[h][g],l,new RGBColor(255,118,106)),e)}}b++}}}if(b==0){c+='<span class="title">';c+="No search results found for ";c+='"';c+=f;c+='".';c+="</span>"}c+="</body>";c+="</html>";window.frames.searchResults.document.close();window.frames.searchResults.document.open();window.frames.searchResults.document.write(c)};HCSketchUpSearchInterface.prototype.addReference=function(d,a,c,b){this.titles[this.numReferences]=d;this.locations[this.numReferences]=a;this.descriptions[this.numReferences]=c;this.keywords[this.numReferences]=b;this.numReferences++};
