﻿<!-- hide this script from non-javascript-enabled browsers

//Open all external links in a new window
//1. using the href value of the anchors, it finds the "external" links inside a given element ("mainbody" in this case). 
//2. it applies a style to the links (applies a class or appends a class name to an existing class attribute's value) 
//3. it attaches a title attribute to the links (or appends a string to the existing title attribute's value) 
//4. it applies the behavior to each one of these links (through the onclick event handler) 
//It also ignores links to "comm100.com" so that those applications work properly.
//From http://www.tjkdesign.com/articles/popup_window_with_no_extra_markup.asp
function ExternalPop(){ 
  var e = document.getElementById('mainbody');
  if (e){
    var a=e.getElementsByTagName('a');
    for (var i=0;i<a.length;i++){
    if (a[i].getAttribute('href') != null && a[i].getAttribute('href').indexOf("://") >= 0 && a[i].getAttribute('href').toUpperCase().indexOf(document.domain.toUpperCase()) == -1 && a[i].getAttribute('href').indexOf("comm100.com") == -1){
        a[i].className+=a[i].className?' outlink':'outlink';
        a[i].title+=' (opens in new window)';
        a[i].onclick=function(){newWin=window.open(this.href,'ExtWin');if(window.focus){newWin.focus()} return false;}
//      a[i].onkeypress=function(){newWin=window.open(this.href,'ExtWin');if(window.focus){newWin.focus()} return false;}
      }
    }
  }
}

//Keeps count of how many characters are in a text area field, and prevents user from typing more than the maximum allowed.
//We use this to display an ongoing counter, so the user knows when they have reached the limit.
//From http://www.rosshawkins.net/archive/2006/12/04/asp.net-text-counter.html.aspx
function textCounter(field, countfield, maxlimit) 
{
if (field.value.length > maxlimit)
   field.value = field.value.substring(0, maxlimit);
else
   countfield.value = maxlimit - field.value.length;
}

//Functions for adding bookmarks to Social Networks
function AddToFacebook() {
	var window_handle = window.open('http://www.facebook.com/share.php?u='+encodeURIComponent(location.href)+'&amp;t='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToYahoo() {
	var window_handle = window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?t='+encodeURIComponent(document.title)+'&amp;d=&amp;tag=&amp;u='+encodeURIComponent(location.href),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToSpurl() {
	var window_handle = window.open('http://www.spurl.net/spurl.php?v=3&amp;tags=&amp;title='+encodeURIComponent(document.title)+'&amp;url='+encodeURIComponent(document.location.href),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToGoogle() {
	var window_handle = window.open('http://www.google.com/bookmarks/mark?op=add&amp;hl=en&amp;bkmk='+encodeURIComponent(location.href)+'&amp;annotation=&amp;labels=&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToBlinklist() {
	var window_handle = window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=&amp;Tag=&amp;Url='+encodeURIComponent(location.href)+'&amp;Title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToBlogmarks() {
	var window_handle = window.open('http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url='+encodeURIComponent(location.href)+'&amp;content=&amp;public-tags=&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToTechnorati() {
	var window_handle = window.open('http://technorati.com/faves?add='+encodeURIComponent(location.href)+'&amp;tag=',"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToBlinkbits() {
	var window_handle = window.open('http://www.blinkbits.com/bookmarklets/save.php?v=1&amp;title='+encodeURIComponent(document.title)+'&amp;source_url='+encodeURIComponent(location.href)+'&amp;source_image_url=&amp;rss_feed_url=&amp;rss_feed_url=&amp;rss2member=&amp;body=',"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToMagnolia() {
	var window_handle = window.open('http://ma.gnolia.com/bookmarklet/add?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title)+'&amp;description=&amp;tags=',"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToMisterWong() {
	var window_handle = window.open('http://www.mister-wong.com/index.php?action=addurl&amp;bm_url='+encodeURIComponent(location.href)+'&amp;bm_notice=&amp;bm_description='+encodeURIComponent(document.title)+'&amp;bm_tags=',"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToDigg() {
	var window_handle = window.open('http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(location.href)+'&amp;bodytext=&amp;tags=&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToDelicious() {
	var window_handle = window.open('http://del.icio.us/post?v=2&amp;url='+encodeURIComponent(location.href)+'&amp;notes=&amp;tags=&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToReddit() {
	var window_handle = window.open('http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToSimpy() {
	var window_handle = window.open('http://www.simpy.com/simpy/LinkAdd.do?title='+encodeURIComponent(document.title)+'&amp;tags=&amp;note=&amp;href='+encodeURIComponent(location.href),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToStumbleUpon() {
	var window_handle = window.open('http://www.stumbleupon.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToSlashdot() {
	var window_handle = window.open('http://slashdot.org/bookmark.pl?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToNetscape() {
	var window_handle = window.open('http://www.netscape.com/submit/?U='+encodeURIComponent(location.href)+'&amp;T='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}
function AddToFurl() {
	var window_handle = window.open('http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(location.href)+'&amp;keywords=&amp;t='+encodeURIComponent(document.title),"AddTo",'top=0,left=0,height=400,width=640,status=no,toolbar=no,menubar=yes,location=yes,scrollbars=yes,resizable=yes');
	if (window.focus) {window_handle.focus()}
}

// stop hiding -->

