﻿// JScript File

function setColor(span, active)
{
    switch(active)
    {
        case 0:
            span.style.color = "black";
        break;
        case 1:
            span.style.color = "red";
        break;
    }
}

var hex = 255;
var references = null;
var index = 0;
var fadingIn = true;
var browserType = null;

function fadeReferenceText()
{
    if(browserType == null)
    {
        if(navigator.appVersion.indexOf("MSIE") > -1)
                browserType = 0;
            else
                browserType = 1;
    }
    
    if(references == null)
    {
        references = new Array();
        
        references[0] = new Reference("'ACAP designed and developed a transaction processing API for us using the latest in .NET technology. When the transaction component was run against a leading POS processing engine, it ran 60% faster, with broadband connections hooked up to both competing systems. The software module was built in record time and with an impressive design that has required little or no modification.'", "Todd Giblette,", "VP of Business Development", "Merchant Warehouse", "http://www.merchantwarehouse.com", 15000);
        references[1] = new Reference("'ACAP does highly quality work at competitive prices. They are extremely adept at delivering timely solutions while simultaneously keeping an eye on long term strategy. ACAP has a high level of expertise in architecture and design direction and effectively delivered facing a difficult situation.'", "Brian Garibaldi, ", "President", "PanaceaRx", "http://www.panacearx.com", 15000);
        references[2] = new Reference("'We started working with ACAP after an unsuccessful attempt at a large scale, complex, real-time system with another IT solutions provider. ACAP delivered a very well architected solution using a combination of Microsoft .Net and Java platforms. The project ran very smoothly and implementation quality was exceptional. Professionalism, responsiveness and dedication to the application of software technologies offered by ACAP are a rare find.'", "Client Confidential", "", "", "", 15000);
        references[3] = new Reference("'ACAP has a team of very thorough and talented software developers. Highly recommended.'", "Evan Fleck, ", "VP of Development", "Kincaid Technologies", "http://www.kincaidtech.com", 5000);
        references[4] = new Reference("'We were matched with ACAP after posting a Request for Proposal. ACAP was one of nine organizations that responded to our inquiry, in addition to two other local companies which also responded. After much scrutiny, ACAP came out ahead of the pack based on their previous experience in developing online multimedia players, in addition to their price point and excellent communication. ACAP was very understanding toward our organization’s process for review and worked with us every step of the way when we had questions. Burtay Arat, our ACAP representative, was very knowledgeable and responded to our inquires almost instantly. His experience aided us throughout the project and led to its successful completion, both on time and budget. We would highly recommend ACAP to other organizations and look forward to contacting them about projects and IT solutions in the future.'", "Client Confidential", "", "", "", 30000);
        
        references[5] = new Reference("'My experience working with ACAP has been excellent. They have the resources and skills to bring all of our concepts to fruition.  However, what sets the ACAP team apart is their unwavering commitment to ensuring that the finished product exceeds our expectations.'", "Omar Gambito,", "CEO", "HERMES", "http://www.hermesmessage.com", 15000);
        references[6] = new Reference("'Thank you for a job well done. We have been working with ACAP for over 3 years now and they have delivered consistent successful results, I highly recommend them.'", "Uri Avissar,", "Founder and CEO", "ReadEasy", "http://www.readeasy.com", 15000);
        references[7] = new Reference("'977music.com came to ACAP with an idea.  ACAP took our idea and turned it into a reality.  These guys know their stuff and will do whatever it takes to get the job done and do it right.  I couldn’t be happier.'", "Jeff Bachmeier,", "President", "977music.com", "http://www.977music.com", 15000);
        references[8] = new Reference("'At Pendle House we needed a professional, well managed outsource partner to help us build a sophisticated web based financial services platform. With ACAP we found the ideal development company and would certainly recommend them as partners on any long term project.'", "Michael Furey,", "CEO", "Pendle House Ltd", "http://www.pendlehouse.com", 15000);
        references[9] = new Reference("'Without question ACAP must be your number one choice for complex web and database programming projects - they take through a thorough design brief linked to a development/project plan with great communications. Not only was the project completed on time, the quality of work was far beyond our expectations. Well done ACAP! We'll without doubt be in touch soon.'", "William Harvey,", "Technical Director", "Executive Standard", "http://www.executivestandard.co.uk/", 15000);
        
        references[10] = new Reference("'ACAP delivered exceptional level of communication, excellent service and end product.'", "Riyaad Seecharan,", "President", "Ayumma, LLC", "http://www.ayumma.com", 5000);
        references[11] = new Reference("'I have found that ACAP delivers to a high standard of work.  They were easily the most competitive supplier during tender, and have done a great job of supporting the initial software as requirements have grown.'", "Alex Butcher,", "President", "A_Butcher Ltd.", "http://www.abutcher.co.uk", 15000);
        references[12] = new Reference("'We’ve worked with 7 different development teams on 3 different applications and at the end of the day, ACAP has gained the support/development agreements for all three applications. ACAP has been the winner.'", "Andy Hineman,", "Vice President", "Adastra Metro Golf, LLC", "http://www.adastrametrogolf.com", 15000);
        references[13] = new Reference("'ACAP worked very closely with us to complete the project on time and on budget. They understood the technology we used and made a number of suggestions that enhanced the outcome of the project. If in the future another project allows us to contract out the work, ACAP will be on the top of the list.'", "Dennis Miller,", "VP of Development", "Eagle Technology Management", "http://www.byetm.com", 15000);
        
        
        index = Math.floor(Math.random() * references.length);    
        
        loadReference();
    }
   
    if(fadingIn)
    {
       if(hex > 0)
       {
            hex -=11;
            document.getElementById("referenceText").style.color="rgb(" + hex + "," + hex + "," + hex + ")";
            setTimeout("fadeReferenceText()", 20);
       } 
       else
       {
            fadingIn = false;
            setTimeout("fadeReferenceText()", reference.wait);
       }
    }
    else
    {
        if(hex < 255)
        {
            hex += 11;
            document.getElementById("referenceText").style.color="rgb(" + hex + "," + hex + "," + hex + ")";
            setTimeout("fadeReferenceText()", 20);
        }
        else
        {
            fadingIn = true;
            setTimeout("fadeReferenceText()", 20);
            //change reference
            
            loadReference();
        }
    }
}

var reference;

function loadReference()
{
    reference = references[index];
    var element = document.getElementById("referenceText");
    var name = document.getElementById("referenceName");
    var title = document.getElementById("referenceTitle");
    var link = document.getElementById("referenceCompanyLink");
    index++;
    if(index == references.length)
        index = 0;
    
    link.href = reference.url;
    
    if(browserType == 0)
    {
        element.innerText = reference.text;    
        name.innerText = reference.name;
        title.innerText = reference.title;
        link.innerText = reference.companyName;    
    }
    else
    {
        element.textContent = reference.text;    
        name.textContent = reference.name;
        title.textContent = reference.title;
        link.textContent = reference.companyName;
    }
}

function Reference(text, name, title, companyName, url, wait)
{
    this.wait = wait;
    this.text = text;
    this.name = name;
    this.title = title;
    this.url = url;
    this.companyName = companyName;
}


