/*
sidewiki-defeat.js

Project page: http://code.google.com/p/sidewiki-defeat/

Usage:
1) Upload this file to your web server.
2) Insert this line right after your opening <head> tag:

   <script type="text/javascript" src="path-to-your-uploaded-file/sidewiki-defeat.js"></script>

Copyright 2009 by Steve Diamond - http://stevediamondconsulting.com/

Released under GNU General Public License version 3 (GPLv3) - http://opensource.org/licenses/gpl-3.0.html

All distributions must retain this copyright and license information.
*/

function getHash(stringLength) {
	var legalCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz0123456789";
	var theHash = '';
	for (var k=0; k<stringLength; k++) {
		var theRand = Math.floor(Math.random() * legalCharacters.length);
		theHash += legalCharacters.substring(theRand, theRand + 1);
	}
	return theHash;
}

var myLoc = window.location.href;
if (myLoc.indexOf('#') == -1) {
	window.location.href = myLoc + '#' + getHash(12);
}