if(typeof Prototype=="undefined"||Prototype.Version<"1.6"){Log.critical("Prototype library version 1.6+ is not loaded.");alert("Importing a map requires the Prototype JavaScript framework version 1.6.0 or greater to be available.")}else{if(typeof jive_username=="undefined"||jive_username===null||jive_username.blank()){Log.critical("Missing variable: jive_username.");alert("Importing a map requires the jive_username variable to be populated.")}else{if(typeof jive_userAvatar=="undefined"||jive_userAvatar===null||jive_userAvatar.blank()){Log.critical("Missing variable: jive_userAvatar.");alert("Importing a map requires the jive_userAvatar variable to be populated.")}else{var vpDevelopDebug=false;if(window.location.host.indexOf("serafina")>=0||window.location.host.indexOf("localhost")>=0||window.location.host.indexOf("vaiism")>=0){vpDevelopDebug=true}document.write(' <style type="text/css" media="screen"> @import "/styles/virtual-pavilion2.css"; </style>');document.write('<!--[if IE 6]><style type="text/css" media="screen"> #virtual-pavilion-inner { height: 1%; /* This sub element needs has layout for IE6 to work */ } div.booth, div.exit { border: none; /* IE6 does not support transparent borders  */ } #virtual-pavilion-chat { width: 948px; } #virtual-pavilion-chat-stats { margin:2px 1px 0px 0px; } </style><![endif]-->');document.write('<script type="text/javascript" src="/resources/scripts/scriptaculous/dragdrop.js"><\/script> <script type="text/javascript" src="/resources/scripts/scriptaculous/slider.js"><\/script> <script type="text/javascript" src="/scripts/wz_tooltip.js"><\/script> <script type="text/javascript" charset="ISO-8859-1" src="/scripts/pavilion/livepipe.js"><\/script> <script type="text/javascript" src="http://www.vmware.com/files/include/jquery.js"><\/script> <script type="text/javascript" charset="ISO-8859-1" src="/scripts/pavilion/vpxmpp.js"><\/script><noscript><div style="margin: 8px;"><h1>JavaScript Required</h1><p>The Virtual Pavilion requires a <a href="http://browsehappy.com/browsers/">modern browser</a> with JavaScript enabled.</p></div></noscript>');document.write('<div id="content-left-new" style="margin-top:0px;padding:0;width:950px;"><div id="map-container" class="jive-content-block-container jive-content-block-container-home"><div id="virtual-pavilion-wrapper"><div id="virtual-pavilion-container"><div id="virtual-pavilion-inner"><h3 class="jive-content-block-header">Virtual Pavilion</h3><img id="map-loading-indicator" src="/images/ajax-loader-transparent.gif" alt="Loading map." name="map-loading-indicator"></div></div></div><div id="virtual-pavilion-chat" class="jive-content-block"><div id="vp-chat-container"><div id="vp-backpack-inventory" class="virtual-pavilion-command-box"><div class="line-item"><h6>Backpack Inventory:&nbsp;<a href="/static/popup_items.html">Item Descriptions</a></h6></div><div id="vp-inventory-container"></div></div><div id="vp-actions-box" class="virtual-pavilion-command-box"><div class="line-item"><h6>Actions:</h6></div><div class="line-item"><a class="href-replace-username" href="/people/guest?view=profile">View Your Profile</a></div><div class="line-item"><a href="/vp-avatar-settings.jspa">Change Your Avatar</a></div><div class="line-item"><h6>Help:</h6></div><div class="line-item"><a id="chat_commands" href="/static/chat_commands.html" title=" Live Chat Commands" name="chat_commands">Live Chat Commands</a></div><div class="line-item"><a id="nav_help" href="/static/navigation.html" title="Virtual Pavilion Navigation" name="nav_help">Navigation Options</a></div></div><div id="virtual-pavilion-chat-history"></div><div id="virtual-pavilion-chat-input"><form name="chat-input-form" id="chat-input-form" autocomplete="off"><img id="chat-loading-indicator" src="/images/ajax-loader-dark.gif" alt="" name="chat-loading-indicator" /><input type="text" name="chat-input-text" value="type here to chat" id="chat-input-text" /></form></div></div><div id="vp-login-container"><h3>Please sign in to see other members online and to use live chat.</h3><form name="loginform" method="post" action="/cs_login" id="loginform" autocomplete="off"><label>Username:</label><input type="text" maxlength="150" size="20" name="username" class="text" />&nbsp;<label>Password:</label><input type="password" maxlength="150" size="20" name="password" class="text" />&nbsp;<input type="image" src="/images/button_sign-in.gif" style="vertical-align: bottom; margin-bottom: -1px;" /></form><h3>Accounts are free!&nbsp;<a href="/create-account.jspa">Get yours today!</a></h3></div><div id="vp-connection-lost"><h2>Connection lost: <a href="#reconnect" id="vp-reconnect">Reconnect</a></h2><img id="vp-reconnect-loading" src="/images/ajax-loader-dark-long.gif" alt="" style="display:none;" /></div></div></div><div id="log"><h3>General Log</h3></div><div id="chat-log"><h3>XMPP Log</h3></div><noscript><div style="margin: 16px;"><h1>JavaScript Required</h1><p>The Virtual Pavilion requires a <a href="http://browsehappy.com/browsers/">modern browser</a> with JavaScript enabled.</p></div></noscript><div style="clear:both;">&nbsp;</div></div>');var virtualMap=null;var offScreenMap=null;var vpLoadMap=function(){if(typeof mapURL!="undefined"&&mapURL!==null&&!mapURL.empty()){if(typeof Log!="undefined"&&Log!==null){if(vpDevelopDebug){Log.level=4}else{Log.level=0}}Log.info("Loading map from URL: "+mapURL);new Ajax.Request(mapURL,{method:"get",onCreate:function(){$("map-loading-indicator").show()},onComplete:function(a){$("map-loading-indicator").hide()},onSuccess:function(b){if(b.responseText.isJSON()){var a=b.responseText.evalJSON(false);virtualMap=new VirtualMap(a.mapID,a.description,a.width,a.height,a.backgroundImageFile,a.horizon,a.minAvatarHeight,a.scaleRatio,a.defaultLanding,a.locations,a.itemsJiveProperty);virtualMap.onWindowLoad();Log.debug(virtualMap.toJSON())}else{Log.error("JSON Syntax Error in "+mapURL)}},onFailure:function(a){alert("Map could not be loaded from JSON file at "+mapURL);Log.critical("Map could not be loaded from JSON file at "+mapURL)}});if(jive_username!="guest"){$$("a.href-replace-username").each(function(a){a.href=a.href.replace("guest",jive_username)})}popup_factory($("chat_commands"),{width:535,height:135,position:"center"});popup_factory($("nav_help"),{width:215,height:200,position:[620,450]});Event.observe(window,"unload",function(a){if(typeof current_muc!="undefined"&&current_muc!==null){current_muc.exitRoom();global_muc.exitRoom()}if(typeof connection!="undefined"){connection.disconnect()}})}else{alert("You must specify the which map to load by url.")}};var watchFor={element:document,event:"dom:loaded"};if(Prototype.Browser.IE){watchFor={element:window,event:"load"}}Event.observe(watchFor.element,watchFor.event,function(a){Log.info("Document loaded.");if(typeof vpMemory=="undefined"){vpMemory=true}if($("jive-widgets-panel")!==null){vpMemory=false}if(jive_username!="guest"&&vpMemory!==false){new Ajax.Request("/vp-user-location.jspa",{method:"get",onSuccess:function(b){Log.info("responseText: "+b.responseText);if(typeof VirtualPavilion=="undefined"||VirtualPavilion===null){VirtualPavilion={}}var c=VirtualPavilion.locationProperty=b.responseText.evalJSON();if(c!==null&&("destination" in c)){Log.info("Valid location property loaded for user.");if(!window.location.href.match(c.destination.url)){jQuery("#map-loading-indicator").after("<h4>Moving to last known location...</h4>");window.location=c.destination.url;return}else{if(c.destination.mapFile!==null){mapURL=c.destination.mapFile}}}else{Log.error("User location property was empty or invalid.");if(c!==null&&typeof c.toJSON=="function"){Log.error("Invalid User location property: "+c.toJSON())}}vpLoadMap()},onFailure:function(b){Log.error("Error fetching user location data from url: "+b.status+": "+b.statusText);vpLoadMap()},onException:function(b,c){Log.critical("Exception in AJAX request: ("+c.name+") "+c.message);vpLoadMap()}})}else{vpLoadMap()}})}}};