// Basic JavaScript Functions Used in the Blog Pagefunction showDiv(name){	document.getElementById(name).style.display="block";}function hideDiv(name){	document.getElementById(name).style.display="none";}function addComment(artID){	var theDiv=document.getElementById("addCommentContainer");	//add the correct item to the hidden field for editing	document.forms['commentForm'].artID.value=artID;	// calculate the position of the ideal placement in the y axis for the form	// the height of the window is 200px	//var winHeight=window.innerHeight;	//alert(winHeight);	//if(winHeight>>200){		//var xHeight=winHeight-240;		//theDiv.style.top=xHeight+"px";	//}	theDiv.style.display="block";	document.forms['commentForm'].author.focus();	//set the activeForm variable to commentForm for the toolbar	document.forms['pageForm'].activeForm.value="commentForm";}function addArticle(){	var theDiv=document.getElementById("addArticleContainer");	// calculate the position of the ideal placement in the y axis for the form	// the height of the window is 250px	//var winHeight=window.innerHeight;	//var winHeight=500;	//alert(winHeight);	//if(winHeight>250){		//var xHeight=winHeight-300;		//theDiv.style.top=xHeight+"px";		//theDiv.style.top="140px";	//}	theDiv.style.display="block";	document.forms['articleForm'].author.focus();	document.forms['pageForm'].activeForm.value="articleForm";}function deleteArticle(artID){	if(confirm("Delete this article and any comments for it?")){		theURL="blog/delete_article.php?artID="+artID;		document.location=theURL;	}}function editArticle(artID){	theURL="?editID="+artID;	document.location=theURL;}function editSingleArticle(artID){	theURL="show_article.php?articleID="+artID+"&editID="+artID;	document.location=theURL;}function changeArticleOrder(){	theValue=document.forms['selectSortingForm'].chooseSortOrder.options[document.forms['selectSortingForm'].chooseSortOrder.options.selectedIndex].value;	theURL="?sortOrder="+theValue;	document.location=theURL;}function changeArticleOrder2(){	var theValue=document.forms['selectSortingForm'].chooseSortOrder.options[document.forms['selectSortingForm'].chooseSortOrder.options.selectedIndex].value;	var searchString=document.getElementById('searchString').value;	var theURL="blog_search.php?sortOrder="+theValue+"&search="+searchString;	document.location=theURL;}/*functions to click and drag a window*/var oMoveDiv = null;var nMoveDivOffsetLeft = null;var nMoveDivOffsetTop = null;function StartMove(e, oHeaderDiv){     oMoveDiv = oHeaderDiv.parentNode;     nMoveDivOffsetLeft = e.clientX - oMoveDiv.offsetLeft;     nMoveDivOffsetTop = e.clientY - oMoveDiv.offsetTop;}function Move(e){     if (oMoveDiv == null)     {          return;     }     if (document.all)     {          e = event;     }     oMoveDiv.style.left = e.clientX - nMoveDivOffsetLeft + "px";     oMoveDiv.style.top = e.clientY - nMoveDivOffsetTop + "px";}function StopMove(){     oMoveDiv = null;}document.documentElement.onmousemove = Move;document.documentElement.onmouseup = StopMove;