<!--
// Trims characters from the beginning or end of a string
function trimText (inputString, removeChar) {
    if (removeChar==null || removeChar=="") removeChar=" ";
    if (inputString==null || inputString=="") inputString="";
    var returnString = inputString;
    if (removeChar.length) {
        while(''+returnString.charAt(0)==removeChar) {
            returnString=returnString.substring(1,returnString.length);
        }
    }
    return returnString;
}
//-->

<!--
//    Searches in a given string for the first occurrence of another string.
function checkForCharacters(inputString, checkString, startingIndex) {
    if (!startingIndex) startingIndex = 0;
    return inputString.indexOf(checkString);
}
//-->

<!--
function wrapText(inputString, length) 
{
	var strReturn="";
	if (inputString.length > length) 
	{
		var words=inputString.split(" ");
		
		for (i=0; i<words.length; i++)
		{
			strReturn=strReturn + words[i] + " " ;
			if (strReturn.length > length) 
			{
				break;
			}			
		}
		strReturn=strReturn+" ....";
	}
	else
	{
	strReturn=inputString;
	}
return strReturn;
}
//-->

<!--
//    Function to define and write Testimonial
function showTestimony(thedivQuote,thedivSage,thedivSageLink) {   
    // define arrays to contain testimonial information
    var theQuote=new Array();
    var theSage=new Array();
    var theSageLink=new Array();
	
	theQuote=thedivQuote;
	theSage=thedivSage;
	theSageLink=thedivSageLink;
	
	var quoteNum=0;
	
	 // define the number of quotes
	  if (theQuote.length>0) theQuote.length-1;
    quoteNum=theQuote.length-1;

    // Select one of the quotes
    var thisQuoteNum=Math.round(Math.random()*quoteNum+.5);

    //    FailSafe. If an error causes Quote number zero to be chosen,
    //    select quote number one instead
    if (thisQuoteNum<1) thisQuoteNum=1;

    //    FailSafe. If an error causes a Quote that doesn't exist to be chosen,
    //    select the last quote
    if (thisQuoteNum>quoteNum) thisQuoteNum=quoteNum;

    //    Trim any excess spaces from the quote
    var thisQuote=trimText (theQuote[thisQuoteNum], " ");

    //    Trim any excess spaces from the name of the person who made the quote
    var thisSage=trimText (theSage[thisQuoteNum], " ");

    
    //    Trim any excess spaces from the link to the blog/Website of the person
    //    who made the quote
    var thisSageLink=trimText (theSageLink[thisQuoteNum], " ");

    //    The link to my HaloScan code. Modify for yours, if applicable
    //    Leave blank if not
    var HaloScanCheckText="http://www.haloscan.com/comments/basilsblog/";

    //    How long is that. You'll see why in a minute
    var HaloScanCheckTextLength=HaloScanCheckText.length;

	 var divText="";

    //    Define quote and Website mouseover texts  
    var altTitle2="Visit this Web site";

    //    Start writing it
    //    Write the quote
	thisQuote= wrapText(thisQuote,'50');
   divText=divText+"<p>&#8220;"+thisQuote+"&#8221;";
    
    //    Write the source of the quote
    divText=divText+"<br /><div  align='right'><em>";
    //    If there is a link, write the link open
    if (thisSageLink != "") {
        //    The actual link open
        divText=divText+"<a href='";
        //    The link
        divText=divText+thisSageLink;
        divText=divText+"'";
        //    Use this to open the link in a separate window
        //    Omit if you want to open in same window
        //    or change _blank to _self
        divText=divText+" target='_blank'"
        //    Sets the mouseover text
        divText=divText+" alt='"+altTitle2+"' title='"+altTitle2+"'";
        //    The actual link close
        divText=divText+">";
    }
    //    Write the actual name of the source

    divText=divText+theSage[thisQuoteNum];
    //    If there is a link, wrote the link close
    if (thisSageLink != "") divText=divText+"</a>";

    //    Finish writing by close all open HTML tags
    divText=divText+"</em></div></p>";

// second one

// Select one of the quotes
     thisQuoteNum=thisQuoteNum+1;

    //    FailSafe. If an error causes Quote number zero to be chosen,
    //    select quote number one instead
    if (thisQuoteNum<1) thisQuoteNum=1;

    //    FailSafe. If an error causes a Quote that doesn't exist to be chosen,
    //    select the last quote
    if (thisQuoteNum>quoteNum) thisQuoteNum=1;

     //    Trim any excess spaces from the quote
    var thisQuote=trimText (theQuote[thisQuoteNum], " ");

    //    Trim any excess spaces from the name of the person who made the quote
    var thisSage=trimText (theSage[thisQuoteNum], " ");

      //    Trim any excess spaces from the link to the blog/Website of the person
    //    who made the quote
    var thisSageLink=trimText (theSageLink[thisQuoteNum], " ");

    //    The link to my HaloScan code. Modify for yours, if applicable
    //    Leave blank if not
    var HaloScanCheckText="";

    //    How long is that. You'll see why in a minute
    var HaloScanCheckTextLength=HaloScanCheckText.length;

   //    Start writing it
    //    Write the quote
	thisQuote= wrapText(thisQuote,'50');
	
    divText=divText+"<p>&#8220;"+thisQuote+"&#8221;";
    
    //    Write the source of the quote
    divText=divText+"<br /><div  align='right'><em>";
    //    If there is a link, write the link open
    if (thisSageLink != "") {
        //    The actual link open
        divText=divText+"<a href='";
        //    The link
        divText=divText+thisSageLink;
        divText=divText+"'";
        //    Use this to open the link in a separate window
        //    Omit if you want to open in same window
        //    or change _blank to _self
        divText=divText+" target='_blank'"
        //    Sets the mouseover text
        divText=divText+" alt='"+altTitle2+"' title='"+altTitle2+"'";
        //    The actual link close
        divText=divText+">";
    }
    //    Write the actual name of the source
    divText=divText+theSage[thisQuoteNum];
    //    If there is a link, wrote the link close
    if (thisSageLink != "") divText=divText+"</a>";

    //    Finish writing by close all open HTML tags
    divText=divText+"</em></div></p>";
	
	 var div1 = document.getElementById('pad_10_5');
    div1.innerHTML =divText;
}

 
//-->
