/*JavaScript for: whelancoaching.com*///find and process external links to open in new window/tabfunction externalLinks() { 	if (!document.getElementsByTagName) return;  	var anchors = document.getElementsByTagName("a");  	for (var i=0; i<anchors.length; i++) {    		var anchor = anchors[i];    		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")			anchor.target = "_blank";	} } window.onload = externalLinks;//get required information for producing bookmarks for sitefunction getBookmarks(SITE){	var URI;	var TILE;		URI = encodeURIComponent(location.href);		//get address of current site/page	TITLE = encodeURIComponent(document.title);		//get title of current site/page		//array of bookmark sites	var bookmarkArray = new Array();	bookmarkArray[0] = "delicious";	bookmarkArray[1] = "diigo";	bookmarkArray[2] = "furl";	bookmarkArray[3] = "google";	bookmarkArray[4] = "magnolia";	bookmarkArray[5] = "spurl";		//list of bookmarks	document.write('<ul><li class="linkHeading">Bookmark this page:</li>');		var x;			//for each site in array produce link, queries, for site		for (x in bookmarkArray)		{			bookmarks (bookmarkArray[x], URI, TITLE, SITE);		}	document.write('</ul>');	}//produce link, queries, for sitefunction bookmarks(BOOKMARKER, URI, TITLE, SITE){	//make URL with queries dependent on bookmark site	switch(BOOKMARKER)	{	case 'delicious':		siteQuery = 'http://del.icio.us/post?&url='+URI+'&title='+TITLE;		altText = 'del.icio.us';		break;			case 'diigo':		siteQuery = 'javascript://';		altText = 'diigo';		break;	case 'furl':		siteQuery = 'http://www.furl.net/storeIt.jsp?u='+URI+'&t='+TITLE;		altText = 'Furl';		break	case 'google':		siteQuery = 'http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+URI+'&title='+TITLE;		altText = 'Google';		break			case 'magnolia':		siteQuery = 'http://ma.gnolia.com/bookmarklet/add?url='+URI+'&title='+TITLE;		altText = 'ma.gnolia';		break			case 'spurl':		siteQuery = 'http://www.spurl.net/spurl.php?title='+TITLE+'&url='+URI;		altText = 'Spurl';		break	//if error write nothing to avoid ugly error script	default:		document.write('');	}		//produce img and any external script script	var imgSrc;	var extScript;	if(BOOKMARKER != 'diigo') {		imgSrc = 'images/'+BOOKMARKER+'.gif';		extScript = '';	} else {		imgSrc = 'http://www.diigo.com/images/difb_big.gif';		extScript = 'onclick="var s=document.createElement(\'script\');s.type=\'text/javascript\';s.src=\'http://www.diigo.com/javascripts/webtoolbar/diigolet_b_h_b.js\';document.body.appendChild(s);"';	}		//write list items to page	document.write('<li><a href='+siteQuery+' rel="bookmark" '+extScript+'><img src="'+imgSrc+'" alt="'+altText+'" title="Bookmark '+SITE+' in '+altText+'" /></a></li>');			}function randomQuotes(){	var quotes = new Array(8);	quotes[0] = '<div><p>Ninety per cent of the world&#039;s woe comes from people not knowing themselves, their abilities, their frailties, and even their real virtues.  Most of us go almost all the way through life as complete strangers to ourselves.</p></div><cite>Sidney Harris</cite>';	quotes[1] = '<div><p>The greatest revolution of our generation is the discovery that human beings, by changing the inner attitudes of their minds, can change the outer aspects of their lives.</p></div><cite>William James</cite>';	quotes[2] = '<div><p>There is no passion to be found playing small - in settling for a life that is less than the one you are capable of living.</p></div><cite>Nelson Mandela</cite>';	quotes[3] = '<div><p>One&#039;s only rival is one&#039;s own potentialities.  One&#039;s only failure is failing to live up to one&#039;s own possibilities.</p></div><cite>Abraham Maslow</cite>';	quotes[4] = '<div><p>You have your way. I have my way. As for the right way, the correct way, and the only way, it does not exist.</p></div><cite>Friedrich Nietzsche</cite>';	quotes[5] = '<div><p>Logic will get you from A to B. Imagination will take you everywhere.</p></div><cite>Albert Einstein</cite>';	quotes[6] = '<div><p>The dreamers of the day are dangerous, for they may act on their dreams with open eyes, to make them possible.</p></div><cite>Thomas E. Lawrence</cite>';	quotes[7] = '<div><p>The battles that count aren\'t the ones for gold medals. The struggles within yourself - the invisible, inevitable battles inside all of us - that\'s where it\'s at.</p></div><cite>Jesse Owens</cite>';		index = Math.floor(Math.random() * quotes.length);	document.write(quotes[index]);	}
