function sendToAFriend() {
subject = '?subject=Check out this page on the Thunder Bay Hydro website';
message = '&body='+ window.location;
window.location = 'mailto:' + subject + message;
}

function bookmark() {
var title = top.document.title; 
var url = 'http://www.tbhydro.on.ca'; // window.location;
var agent = navigator.userAgent.toLowerCase();
var mac = (agent.indexOf('mac')!=-1);
var key = mac ? 'Cmd' : 'Ctrl';
if (window.external && !window.sidebar) { // ie
window.external.AddFavorite(url,title);
} else { // other browsers
alert('Please press '+ key +' + D to bookmark this page.');
} // end other browsers
}

function encrypt(username,hostname,linktext,subject,message){
var username = username || 'info';
var hostname = hostname || 'tbhydro.on.ca';
var address = username + '&#64;' + hostname;
var linktext = linktext || address;
var subject = subject || '';
if (subject != '') {
subject = '?subject=' + subject;
}
var message = message || '';
if (message != '') {
message = '?body=' + message;
}
var output = '<a href="&#109;&#97;&#105;&#108;' + '&#116;&#111;&#58;'+ address + subject + message +'" class="email">'+ linktext +'</a>';
document.write(output);
}

<!-- start open window code -->

function open_win(what_link, what_high){ 
var the_url = "http://www.tbhydro.on.ca"
var the_x = 80;
var the_y = 200;
the_x -= 0;
the_y -= 0;
var how_wide = screen.availWidth;
var how_high = screen.availHeight;
if(what_link != ""){the_url=what_link;}
if(what_high !=""){the_y=what_high;}
var the_toolbar = "no";
var the_addressbar = "no";
var the_directories = "no";
var the_statusbar = "no";
var the_menubar = "no";
var the_scrollbars = "no";
var the_do_resize =  "yes";
var the_copy_history = "no";
top_pos = (how_high/2) -  (the_y/2);
left_pos = (how_wide/2) -  (the_x/2);
if (window.outerWidth ){
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",outerWidth="+the_x+",outerHeight="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open(the_url, "DisplayWindow", option);
var Opera = (navigator.userAgent.indexOf('Opera') != -1);
if(Opera){
site.resizeTo(the_x,the_y);
site.moveTo(0,0);
}
}
else
{
var option = "toolbar="+the_toolbar+",location="+the_addressbar+",directories="+the_directories+",status="+the_statusbar+",menubar="+the_menubar+",scrollbars="+the_scrollbars+",resizable="+the_do_resize+",Width="+the_x+",Height="+the_y+",copyhistory="+the_copy_history+",left="+left_pos+",top="+top_pos;
site=open('', "DisplayWindow", option);
site.location=the_url;
if(site.open){site.focus();return false;}
site.resizeTo(the_x,the_y);
}
} 
