// JavaScript Document
var tIndex = 0;
var qArray = new Array();

qArray[tIndex++] = '<img src="/images/testimonial_guy1.jpg" width="170" height="113" style="padding-bottom:5px;"><br/>&ldquo;The audit was completed in a timely and thorough manner, and resulted in considerable savings.&rdquo;&hellip;&ldquo;I have never encountered a company which placed a higher emphasis on ethical conduct.&rdquo; <br /><strong>Thomas Jefferson University Hospital</strong>';
qArray[tIndex++] = '<img src="/images/testimonial_guy2.jpg" width="170" height="113" style="padding-bottom:5px;"/><br/>&ldquo;The service they provided in steering our company through the Pennsylvania Electric Deregulation process was invaluable. The savings we have realized will help us remain competitive in an industry where pennies make the difference.&rdquo; <br /><strong>Boyer&rsquo;s Food Markets, Inc.</strong>';
qArray[tIndex++] = '<img src="/images/testimonial_guy3.jpg" width="170" height="113" style="padding-bottom:5px;"/><br/>&ldquo;It is unlikely that every line on every bill can be effectively audited every month without excessive labor costs. UtiliTech provides a low risk, low cost alternative to attempting to develop expertise in house.&rdquo; <br /><strong>Guard Insurance Group</strong>';
qArray[tIndex++] = '&ldquo;Their fee, which is contingent upon documented savings, is an expense that I don&rsquo;t mind paying because they really earned it.&rdquo; <br /><strong>Commonwealth Mortgage Assurance Company (CMAC)</strong>';
qArray[tIndex++] = '&ldquo;With Caron being a non-profit organization, every dollar counts and the savings that UtiliTech has introduced surely makes a huge difference.&rdquo; <br /><strong>Caron Foundation</strong>';
qArray[tIndex++] = '&ldquo;&hellip;the county commissioners said Tuesday they will receive a $150,000 refund from Bell Atlantic-Pennsylvania Inc., I don&rsquo;t think the mistakes were intentional, it just slipped through the cracks. I&rsquo;m glad they had someone who knows the business (UtiliTech) look at this.&rdquo; <br /><strong>Eagle/Times, a publishing company</strong>';
qArray[tIndex++] = '&ldquo;&hellip;the county has saved $131,518 through April&hellip;an amount that does not go unnoticed by the county controller. Saving that much money, that&rsquo;s savings for the taxpayers, that is something we&rsquo;ve got to do.&rdquo; <br /><strong>New Era</strong>';
qArray[tIndex++] = '&ldquo;I just wanted to let you know how much we appreciated UtiliTech&rsquo;s help in getting us through our telecom transition and our major project to select a new VOIP/PBX vendor.  UtiliTech was instrumental in not only finding the right product but a vendor with a similar service philosophy as our own.&rdquo; <br /><strong>Harleysville National Bank</strong>';
qArray[tIndex++] = '&ldquo;We have been extremely pleased with our long-standing relationship with UtiliTech.  Every dollar represents value in the delivery of essential services to our constituents, in our case disadvantaged youths.&rdquo; <br /><strong>Olivet Boys &amp; Girls Club</strong>';
qArray[tIndex++] = 'UtiliTech obtained a refund of $45,000 for a Retirement Facility caused by a nine month billing error. The electric utility&rsquo;s initial response was that &ldquo;an error was impossible&rdquo; <br /><a href="/cases">Read more...</a>.';
qArray[tIndex++] = 'A National Financial Services Firm headquartered in the Northeast experienced growth in wireless users to around 2,000 devices.  UtiliTech created and continually staffs a wireless help desk on their site and provides billing reviews and allocation database tools and procedures. <br /><a href="/cases">Read more...</a>'; 
qArray[tIndex++] = 'A Massachusetts property management firm was faced with increasing utility costs across multiple locations.  UtiliTech advised them on best rate choices and handled the confusing alternate supplier shopping process.  Electric procurement savings have averaged over $17,000 per month. <br /><a href="/cases">Read more...</a>';
qArray[tIndex++] = 'A Major Ohio shipping company was paying a high average cost for electricity due to their usage pattern, an unfortunate result in the nature of their business.  UtiliTech negotiated an experimental rate saving our client about 30% ($50,000 per month) for nearly two years. <br /><a href="/cases">Read more...</a>';

tIndex = Math.round(Math.random() * (qArray.length -1));
//tIndex = 0;
function showquote() {
  return qArray[tIndex];
}
//document.write(qArray.length)



//clear text box on click
function clearField2(a,b) {
	if (a.value==b) {
		a.value="";
	}
    //a.select();
}

// check for valid email
function isEmail(email) {
    invalidChars = " ~\'^\`\"*+=\\|][(){}$&!#%/:,;";

    // Check for null
    if (email == "") {
        return true;
    }

    // Check for invalid characters as defined above
    for (i=0; i<invalidChars.length; i++) {
        badChar = invalidChars.charAt(i);
        if (email.indexOf(badChar,0) > -1) {
            return false;
        }
    }
    lengthOfEmail = email.length;
    if ((email.charAt(lengthOfEmail - 1) == ".") || (email.charAt(lengthOfEmail - 2) == ".")) {
        return false;
    }
    Pos = email.indexOf("@",1);
    if (email.charAt(Pos + 1) == ".") {
        return false;
    }
    while ((Pos < lengthOfEmail) && ( Pos != -1)) {
        Pos = email.indexOf(".",Pos);
        if (email.charAt(Pos + 1) == ".") {
            return false;
        }
        if (Pos != -1) {
            Pos++;
        }
    }

    // There must be at least one @ symbol
    atPos = email.indexOf("@",1);
    if (atPos == -1) {
        return false;
    }

    // But only ONE @ symbol
    if (email.indexOf("@",atPos+1) != -1) {
        return false;
    }

    // Also check for at least one period after the @ symbol
    periodPos = email.indexOf(".",atPos);
    if (periodPos == -1) {
        return false;
    }
    if (periodPos+3 > email.length) {
        return false;
    }
    return true;
}
