// Jurassic Parliament JavaScripts
var MoreLink={
	init: function(section, message) {
		var message;
		var sectID=section;
		var secID=document.getElementById(sectID);
		var secChildren=secID.childNodes;
		for( var i=0,ii=secChildren.length;i<ii;i++)
		{
			if(secChildren[i].className=="blog-post")
			{
				var blogPost=secChildren[i].childNodes;
			}
		}
		// Set variables postTitle & postTitleChildren
		for(var i=0,ii=blogPost.length;i<ii;i++)
		{
			if(blogPost[i].className=="post-title")
			{
				var postTitleChildren=blogPost[i].childNodes;
				var postTitle=blogPost[i];
			}
			else if(blogPost[i].classname=="post-body")
			{
				var postBodyChildren=blogPost[i].childNodes;
			}
		}
		// Set position of target
		for(var i=0,ii=postTitleChildren.length;i<ii;i++)
		{
			if(postTitleChildren[i].nodeName=="A")
			{
				var blogLink=postTitleChildren[i].href;
				link="<a href=\"" + blogLink + "\">" + message + "</a>";
				return link;
			}
		}
	}
}; 


var ReadMore={
	init: function(section, message) {
		var message;
		var sectID=section;
		var secID=document.getElementById(sectID);
		var secChildren=secID.childNodes;
		for( var i=0,ii=secChildren.length;i<ii;i++)
		{
			if(secChildren[i].className=="blog-post")
			{
				var blogPost=secChildren[i].childNodes;
			}
		}
		// Set variables postTitle & postTitleChildren
		for(var i=0,ii=blogPost.length;i<ii;i++)
		{
			if(blogPost[i].className=="post-title")
			{
				var postTitleChildren=blogPost[i].childNodes;
				var postTitle=blogPost[i];
			}
			else if(blogPost[i].classname=="post-body")
			{
				var postBodyChildren=blogPost[0].childNodes;
				var postBody=blogPost[0];
				return postBody;
			}
		}
	}
}; 

var emailInput={
	init: function(){
		var getEmail=getElementById(inputEmail);
		if(getEmail.search(/aol/i)){alert("this is an aol email");}
	}
}
function copyDate() {
				var curdate = new Date();
				var thisyear = curdate.getFullYear();
				if(thisyear > 2009) {document.write('2009 - ' + thisyear);} else {document.write(thisyear);}
}
