var pagestring = new String();
	pagestring = '';
	
var pagestringpad = '&nbsp;|&nbsp;';

var uri = document.location.href;

var origOL = document.onLoad;

function trimComments(contentsToTrim) {
 replacestring = contentsToTrim;
 // replacestring = replacestring.replace('.aspx','.aspx#commentstart');
 replacestring = replacestring.replace('Comments [','');
 replacestring = replacestring.replace(']</a>','</a>');
 document.write('' + replacestring);

}

var Posted=new Array()

Posted[0] = "Posted at";
Posted[1] = "Authored about";
Posted[2] = "Created at";
Posted[3] = "Uploaded about";
Posted[4] = "Brain-dumped at";
Posted[5] = "Encoded at";
Posted[6] = "Dreamt up at";
Posted[7] = "Downgraded around";
Posted[8] = "Declassified around";

function givethyposted(numtopost) {
	if (numtopost >= 0) {
		document.write(Posted[numtopost]);
	} else {
		document.write(Posted[Math.round(Math.random()*(Posted.length-1))]);
	}
}


function addpageJump()
{
	if (origOL)
		eval(origOL);
		

		
	//checkScrollNecessary('commentstartdiv');
	//location.href = uri + '#commentstart';
}




function getAnchorPosition(anchorName) {
   
   var anchor = document.getElementById(anchorName);
  
  alert(anchor);
  
  if (document.layers) {
    return { x: anchor.x, y: anchor.y };
  } else {
  alert (anchor.x);
    var coords = {x: 0, y: 0 };
		  coords.x += anchor.offsetLeft;
		  coords.y += anchor.offsetTop;
    return coords;
  }
}



function checkScrollNecessary (link) {

	    var coords = getAnchorPosition(link);
		window.scrollTo(coords.x , coords.y);
		return false;

}






if (uri.indexOf(',category,') > 0) {
	capstring = String(uri).substring(uri.indexOf('category,') + 9,String(uri).length - 5);
	pagestring = pagestringpad + 'Catagory: ' + unescape(capstring);
} 
if (uri.indexOf('category=') > 0) {
	capstring = String(uri).substring(uri.indexOf('category=') + 9,uri.indexOf('#'));
	pagestring = pagestringpad + 'Catagory: ' + unescape(capstring);
} 

if (uri.indexOf('date,') > 0) {
	capstring = String(uri).substring(uri.indexOf('date,') + 5,String(uri).length - 5);
	pagestring = pagestringpad + 'Day Archive: ' + unescape(capstring);
} 
if (uri.indexOf('date=') > 0) {
	capstring = String(uri).substring(uri.indexOf('date=') + 5,uri.indexOf('#'));
	pagestring = pagestringpad + 'Catagory: ' + unescape(capstring);
} 


if (uri.indexOf('month,') > 0) {
	capstring = String(uri).substring(uri.indexOf('month,') + 6,String(uri).length - 5);
	pagestring = pagestringpad + 'Month Archive: ' + unescape(capstring);
} 
if (uri.indexOf('month=') > 0) {
	capstring = String(uri).substring(uri.indexOf('month=') + 6,uri.indexOf('#'));
	pagestring = pagestringpad + 'Month Archive: ' + unescape(capstring);
} 



if (uri.indexOf('CommentView,') > 0) {
	pagestring = pagestringpad + 'View Comments on this Post';
	//document.onLoad = addpageJump();

}





