
function Emailhref(element,cn,dc1,dc2,alternatetext){var el=document.getElementById(element);for(var i=el.childNodes.length-1;i>=0;i-=1)el.removeChild(el.childNodes[i]);el.lastChild;var anode=document.createElement('a');anode.setAttribute('class','text');anode.className='text';anode.setAttribute('href','mailto:'+cn+'@'+dc1+'.'+dc2);addEvent(anode,'mouseover',function(cn,dc1,dc2){window.status='mail'+'to:'+cn+'@'+dc1+'.'+dc2;return true});addEvent(anode,'mouseout',function(){window.status='';return true});var txtnode;if(alternatetext!='')txtnode=document.createTextNode(alternatetext);else txtnode=document.createTextNode(cn+'@'+dc1+'.'+dc2);anode.appendChild(txtnode);el.appendChild(anode);}function addEvent(obj,type,fn){if(obj.addEventListener){obj.addEventListener(type,fn,false);EventCache.add(obj,type,fn);}else if(obj.attachEvent){obj['e'+type+fn]=fn;obj[type+fn]=function(){obj['e'+type+fn](window.event);};obj.attachEvent('on'+type,obj[type+fn]);EventCache.add(obj,type,fn);}else{obj['on'+type]=obj['e'+type+fn]}}EventCache=function(){var listEvents=[];return{listEvents:listEvents,add:function(node,sEventName,fHandler){listEvents.push(arguments);},flush:function(){var i,item;for(i=listEvents.length-1;i>=0;i-=1){item=listEvents[i];if(item[0].removeEventListener){item[0].removeEventListener(item[1],item[2],item[3]);};if(item[1].substring(0,2)!='on'){item[1]='on'+item[1]};if(item[0].detachEvent){item[0].detachEvent(item[1],item[2]);};item[0][item[1]]=null}}}}();addEvent(window,'unload',EventCache.flush);
function Winload(){this.Add=function(func){this.winload[this.winload.length]=func};this.Execute=function(){for(var i=0;i<this.winload.length;i++)eval(this.winload[i]);};this.winload=new Array();}
function UnMouse() {
  message = 'No portion of this site—text or photographs—may be copied, retransmitted, reposted, duplicated or otherwise used without the express written approval of Frank Caruso.';
  document.onmousedown = click;
  document.onmouseup = click;
  if( document.layers ) window.captureEvents(Event.MOUSEDOWN);
  if( document.layers ) window.captureEvents(Event.MOUSEUP);
  window.onmousedown = click;
  window.onmouseup = click;
  function click(e) {
    if( (document.layers || (document.getElementById&&!document.all)) && (e.which==2||e.which==3) ) {
      alert(message);
      return false;
    }
    else if( document.all && (event.button==2||event.button==3) ) {
      alert(message);
      return false;
    }
    return true;
  }
}
function googlemaps( a ) {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById( a[0] ));
    map.setCenter(new GLatLng(a[1], a[2]), 15);
    map.addControl(new GLargeMapControl()); // zoom control
    map.addControl(new GMapTypeControl()); // satellite
    var point = new GLatLng(a[1], a[2]);
    var marker = new GMarker(point);
    map.addOverlay(marker);
    // display blowup of map over this marker
    GEvent.addListener(marker, "click", function() {
      marker.showMapBlowup();
    });
    // display text over marker
    //   GEvent.addListener(marker, "click", function() {
    //     marker.openInfoWindowHtml("<b>Toronto Studio</b>, Suite 206, 20 Leslie Street, Toronto");
    //   });
    // icon
    var baseIcon = new GIcon();
    baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
    baseIcon.iconSize = new GSize(20, 34);
    baseIcon.shadowSize = new GSize(37, 34);
  }
}

