function Ensure()
	{
	if (location.href==top.location.href) 
		{top.location.replace("http://www.legalhistory.com/ForumFrame.php?Choice=Blogs");}
	return true;
	}

function RightPage()
	{
	RightHref=parent.right.location.href;
	TopAlready=RightHref.lastIndexOf("#Top");
	Ending="#Top";
	if (TopAlready>0)
		{Ending="";}
	parent.right.location=RightHref+Ending;
	}

function ChoiceConfirm(Choice,NoValue)
	{
	OK=confirm("Are you sure you wish to do this?");
	if (OK)
		{return true;}
	Choice.action.value=NoValue;							/* If not OK, perform specified action */
	return true;
	}

function ConfirmChange(Perform)
	{
	errOne="Please select an entry to work with.";
	var Selection=false;
	var Length=Perform.EditID.length;
	if (!Length)
		{
		if (Perform.EditID.checked==true)
			{Selection=true;}
		}
	for (x=0;x<Length;x++)
		{
		if (Perform.EditID[x].checked)
			{Selection=true;} 
		}
	if (!Selection)
		{
		alert (errOne);
		return false;
		}
	if (Perform.ActToDo.value=="delete")
		{
		OK=confirm("Are you sure you wish to do this?");
		if (OK)
			{return true;}
		return false;
		}
	return true;
	}

function TimeList(Min,Max,Length,SelectItem)
	{
	var Ctr=parseInt(Min);
	var CtrOut="";

	while (Ctr<=Max)
		{
		CtrOut=Ctr+='';
		if (CtrOut.length<Length)
			{
			CtrOut="0"+CtrOut;
			}
		if ((Ctr==Min && SelectItem==-1) || (Ctr==SelectItem))
			{document.write ('<option selected value="'+CtrOut+'">'+CtrOut+'</option>');}
			else
				{document.write ('<option value="'+CtrOut+'">'+CtrOut+'</option>');}
		Ctr=parseInt(Ctr)+1;
		}

	return true;
	}

function ManualValid(manual,TotalFB)
	{
	err="Please enter an integer between 1 and "+TotalFB+".";
	StartPos=parseFloat(manual.StartPos.value);
	SPInt=parseInt(manual.StartPos.value);
	if (SPInt<1 || SPInt>TotalFB || StartPos!=SPInt)
		{
		alert(err); 
		return false;
		}
	return true;
	}

function EntryValid(NewEntry)
	{
	errOne="Please provide an entry text.";
	EntryTxt=NewEntry.EntryText.value;
	if (EntryTxt=="")
		{
		alert(errOne);
		return false;
		}
	return true;
	}

function SelectionValid(ViewCurrent)
	{
	errOne="Please select an archive to work with.";
	var Selection=false;
	var Length=ViewCurrent.ArchID.length;
	if (!Length)
		{
		if (ViewCurrent.ArchID.checked==true)
			{Selection=true;}
		}
	for (x=0;x<Length;x++)
		{
		if (ViewCurrent.ArchID[x].checked)
			{Selection=true;} 
		}
	if (!Selection)
		{
		alert (errOne);
		return false;
		}
	return true;
	}

function FeedbackValid(NewFeedback)
	{
	errOne="Please provide a feedback text.";
	FeedbackTxt=NewFeedback.FeedbackText.value;
	if (FeedbackTxt=="")
		{
		alert(errOne);
		return false;
		}
	return true;
	}

function ExtraChars()
	{
	Char=new Array(1);
	var MasterList="";
	var delimiter="|";
	var Count=0;
	var x=0;

	MasterList="&Aacute;|&aacute;|&Agrave;|&agrave;|&Acirc;|&acirc;|&Auml;|&auml;|&Aring;|&aring;|&Atilde;|&atilde;|&AElig;|&aelig;|&Ccedil;|&ccedil;|&Eacute;|&eacute;|&Egrave;|&egrave;|&Ecirc;|&ecirc;|&Euml;|&euml;|&Iacute;|&iacute;|&Igrave;|&igrave;|&Icirc;|&icirc;|&Iuml;|&iuml;|&Ntilde;|&ntilde;|&Oacute;|&oacute;|&Ograve;|&ograve;|&Ocirc;|&ocirc;|&Ouml;|&ouml;|&Oslash;|&oslash;|&Otilde;|&otilde;|&Uacute;|&uacute;|&Ugrave;|&ugrave;|&Ucirc;|&ucirc;|&Uuml;|&uuml;|&Yacute;|&yacute;|&yuml;|&szlig;|&ETH;|&eth;|&THORN;|&thorn;|&ndash;|&mdash;|&iquest;|&iexcl;|&laquo;|&raquo;|&sect;|&para;|&#36;|&pound;|&#8364;|&yen;|";

	while (MasterList.indexOf(delimiter)>0) 
		{
	    Char[Count]=MasterList.substr(0,MasterList.indexOf(delimiter));
			NewStart=MasterList.indexOf(delimiter)+1;
			NewLength=MasterList.length-NewStart;
			MasterList=MasterList.substr(NewStart,NewLength);
		Count=Count+1;
		}

	document.write ('<option value="">Special</option>');
	
	for (x=0;x<Count;x++)
		{document.write ('<option value="'+Char[x]+'">'+Char[x]+'</option>');}

	return true; 
	}

function Txt(Type,DocForm,Box)
	{
	if (Type=="Bold")
		{
		var bold=new Image;
		var bsrc=document.bold.src.substring(document.bold.src.lastIndexOf("/")+1);
		if (bsrc=="BoldOn.gif")
			{
			TypeValue="<b>";
			document.bold.src="Images/BoldOff.gif";
			}
			if (bsrc=="BoldOff.gif")
			{
			TypeValue="</b>";
			document.bold.src="Images/BoldOn.gif";
			}
		}
	if (Type=="Italics")
		{
		var italics=new Image;
		var isrc=document.italics.src.substring(document.italics.src.lastIndexOf("/")+1);
		if (isrc=="ItalicsOn.gif")
			{
			TypeValue="<i>";
			document.italics.src="Images/ItalicsOff.gif";
			}
		if (isrc=="ItalicsOff.gif")
			{
			TypeValue="</i>";
			document.italics.src="Images/ItalicsOn.gif";
			}
		}
	if (Type=="Underline")
		{
		var underline=new Image;
		var usrc=document.underline.src.substring(document.underline.src.lastIndexOf("/")+1);
		if (usrc=="UnderlineOn.gif")
			{
			TypeValue="<u>";
			document.underline.src="Images/UnderlineOff.gif";
			}
		if (usrc=="UnderlineOff.gif")
			{
			TypeValue="</u>";
			document.underline.src="Images/UnderlineOn.gif";
			}
		}
	if (Type=="Indent")
		{
		var indent=new Image;
		var isrc=document.indent.src.substring(document.indent.src.lastIndexOf("/")+1);
		if (isrc=="IndentOn.gif")
			{
			TypeValue="<indent>";
			document.indent.src="Images/IndentOff.gif";
			}
		if (isrc=="IndentOff.gif")
			{
			TypeValue="<end indent>";
			document.indent.src="Images/IndentOn.gif";
			}
		}
	if (Type=="Extra")
		{
		var opt=document.forms[DocForm].extra;
		TypeValue=opt.options[opt.selectedIndex].value;
		}
	if (Type=="Link")
		{
		TypeValue="<url=Address>Name of Link</url>";
		}
	if (Type=="Mail")
		{
		TypeValue="<mail=Address>Recipient</mail>";
		}

	var ExistInput=document.forms[DocForm].elements[Box];
	ExistInput.value=ExistInput.value+TypeValue;

	document.forms[DocForm].elements[Box].scrollTop=document.forms[DocForm].elements[Box].scrollHeight;
	document.forms[DocForm].elements[Box].focus();
	}

function EM(name,domain,type,subject,display)
	{document.write('<a href=mailto:'+name+'@'+domain+'.'+type+'?subject='+subject+'>'+display+'</a>');} 

function CancelBlog()
	{top.location="http://www.legalhistory.com";}



