BLUEPRINT ( "B6322BDCD73140A18873C2F3F86FFED2", { inputs: [ 'fog_trigger_in' , 'clear_trigger_in' , 'etch_content_in' ] , input_specs: [ { queue_size: 1 } , { queue_size: 1 } , { queue_size: 1 } ] , outputs: [ 'cleared_indication_out' , 'fogged_indication_out' , 'etched_content_out' ] , properties: [ 'fogs_to_percent' , 'fogs_in_seconds' , 'clears_in_seconds' ] , name: 'Electric Glass' }, function(Class) {Class.prototype._onInit=function(props) {this._max_fog=props["fogs_to_percent"]||100.0;this._fog_duration=props["fogs_in_seconds"]||0;this._clear_duration=props["clears_in_seconds"];if(this._clear_duration===undefined){this._clear_duration=this._fog_duration;} if(this._getCssProp(this.dom_node,"display")=="none"){this._fog_val=0;}else{this._fog_val=parseFloat(this._getCssProp(this.dom_node,"opacity"));} if(this._fog_val===undefined){this._fog_val=100;}else{this._fog_val*=100;if(this._fog_val>100){this._fog_val/=100;}} if(this._fog_duration<0||this._fog_duration>5000){throw"The electric glass can only fog up within 5 seconds. You specified "+(this._fog_duration);}else{this._fog_duration=this._fog_duration*20;} if(this._clear_duration<0||this._clear_duration>5000){throw"The electric glass can only clear up within 5 seconds. You specified "+(this._clear_duration);}else{this._clear_duration=this._clear_duration*20;} if(this._max_fog<0||this._max_fog>100){throw"The electric glass can only fog up to 100%. You specified "+(this._clear_duration/1000);} this._timer=null;} Class.prototype._getCssProp=function(node,prop) {if(node.currentStyle){if(node.currentStyle.getAttribute){return node.currentStyle.getAttribute(prop.replace(/-/g,""));}else{return node.currentStyle[prop.replace(/-/g,"")];}}else{return node.ownerDocument.defaultView.getComputedStyle(node,null).getPropertyValue(prop);}};Class.prototype.onMsgFor["etch_content_in"]=function(msg) {this.dom_node.innerText=msg;this.dom_node.textContent=msg;this.postMessage("etched_content_out",msg);};Class.prototype.onMsgFor["fog_trigger_in"]=function(msg) {this.dom_node.style.visibility="visible";this.dom_node.style.display="block";if(this._fog_duration){var self=this;var incr=(self._max_fog-self._fog_val)/self._fog_duration;function __fog() {var i=Math.min(self._max_fog,self._fog_val+incr);self._fog_val=i;self.dom_node.style.opacity=i/100.0;self.dom_node.style.filter='alpha(opacity='+i+')';if(i0){self._timer=window.setTimeout(__fog,50);}else{self.dom_node.style.visibility="hidden";self.dom_node.style.display="none";self.postMessage("cleared_indication_out",msg);self.unblockAllTerminals();}} if(this._timer){window.clearTimeout(this._timer);this._timer=null;} this.blockAllTerminalsExcept("fog_trigger_in");__fog();}else{this.dom_node.style.visibility="hidden";this.dom_node.style.display="none";this.postMessage("cleared_indication_out",msg);}};}); BLUEPRINT ( "7D835839F7BD4A01A6F0481718F570A9", { inputs: [ 'collection_in' , 'detail_in' ] , input_specs: [ { queue_size: 10 } , { queue_size: 10 } ] , outputs: [ 'clicked_location_out' ] , properties: [ 'centers_latitude_at' , 'centers_longitude_at' , 'does_show_zoom_control' , 'does_show_map_type_control' , 'does_show_pan_control' ] , name: 'Minimal Google Maps' }, function(Class) {Class.prototype._onInit=function(props) {var lat=props["centers_latitude_at"];var lon=props["centers_longitude_at"];var size=[parseInt(this._getCssProp(this.dom_node,"width")),parseInt(this._getCssProp(this.dom_node,"height"))];var map_node=this.dom_node;this._markers=[];if(isNaN(lat)){lat=37.5038;} if(isNaN(lon)){lon=127.0046;} this._map=new GMap2(map_node);this._map.setCenter(new GLatLng(lat,lon),14);this._map.setMapType(G_NORMAL_MAP);if(props["does_show_zoom_control"]&&props["does_show_map_type_control"]&&props["does_show_pan_control"]){this._map.addControl(new GSmallMapControl());} this._registerEvent();};Class.prototype._getCssProp=function(node,prop) {if(node.currentStyle){if(node.currentStyle.getAttribute){return node.currentStyle.getAttribute(prop.replace(/-/g,""));}else{return node.currentStyle[prop.replace(/-/g,"")];}}else{return node.ownerDocument.defaultView.getComputedStyle(node,null).getPropertyValue(prop);}};Class.prototype._registerEvent=function() {var self=this;function _onClick(m) {self.postMessage("clicked_location_out",m.eform);} GEvent.addListener(this._map,"click",function(marker,point){if(marker){_onClick(marker);}});} Class.prototype.onMsgFor["detail_in"]=function(msg) {var o,p,i,n,marker;var entity_info="",contact_info="",aux_info="";if(msg.length==1){msg=msg[0];}else if(typeof(msg)!="object"){self.error("expected single item, got "+msg);return;} if(!msg["html_content"]){entity_info=msg["name"];if(msg["uri"]){entity_info=""+entity_info+"";} entity_info+="
"+(msg["description"]||"");contact_info=(msg["telephone_number"]||"No Phone Number");if(msg["image_data"]){aux_info="
";} aux_info+=msg["text_content"]||"";html="
"+ entity_info+"

"+msg["street"]+"

"+aux_info+"

"+contact_info+"

";}else{html=msg["html_content"];} n=this._markers.length;for(i=0;i/g,"");} val=val.replace(/\ /g," ");val=val.replace(/\</g,"<");val=val.replace(/\>/g,">");val=val.replace(/\—/g,"--");val=val.replace(/\—/g,"--");val=val.replace(/^\s+|\s+$/g,"");return val;} Class.prototype._getFirstChildByTagName=function(dom,tag_name) {var o=dom.firstChild;while(o){if(o.nodeType==1&&o.tagName==tag_name){return o;} o=o.nextSibling;}};Class.prototype.onMsgFor["collection_in"]=function(msg) {var i,n,row,col,ef,val;var thead=this._getFirstChildByTagName(this._table,"THEAD");var keys=[];var members=msg["members"];for(i=0;row=this.dom_node.getElementsByTagName("TR")[i];i++){row.eform=null;row.origClassName=row.className;} this.onMsgFor["match_in"].call(this,{});n=thead.getElementsByTagName("TH").length;for(i=0;i is required!";} this._base_url=a.href;this._app_id=props["uses_app_id"];if(!this._app_id){throw"Invalid Yahoo Application ID";}else{this.info("Using APP ID "+this._app_id);}};Class.prototype.onMsgFor["parameters_in"]=function(msg) {var o,e,type,url;type;url=this._createUrl(msg);o=document.createElement("SCRIPT");o.type="text/javascript";o.src=url;this.debug(url);this.dom_node.appendChild(o);};Class.prototype._onResponse=function(msg) {this.postMessage("response_out",this._toCollection(msg));} Class.prototype._createUrl=function(msg) {var args,v;args="" for(key in msg){v=escape(msg[key]);if(this._use_plus){try{v=v.replace(/%20/g,'%2b');}catch(ex){}} args+=escape(key)+"="+v+"&";} return this._base_url+"?"+"output=json&callback=__star.infotrons."+ this.id+"._onResponse"+"&appid="+this._app_id+"&"+args} Class.prototype._toCollection=function(msg) {var coll=[];var i,n,result,results,err_msg;try{n=parseInt(msg.ResultSet.totalResultsReturned);}catch(ex){if(msg["Error"]){err_msg=msg["Error"]["Message"];this.error(msg["Error"]["Title"]+": "+err_msg,"Error returned from Yahoo!");}else{err_msg="Malformed JSON RSS Output returned from Yahoo!";this.error(ex,"malformed JSON RSS output");} return{"name":"There is a problem.","description":err_msg};} if(n==1){results=[msg.ResultSet.Result];}else{results=msg.ResultSet.Result;} for(i=0;i