﻿//Hide Show functions
function showTextArea(id, classname) {
    $('.' + classname).hide();
    $('#' + id).show();
}
function ShowText(id, classname) {
    if ($('#' + id).is(":hidden")) {
        $('.' + classname).slideUp();
        $('#' + id).slideDown();
    }
    else {
        $('#' + id).slideUp();
    }
}
function ServiceLinkText(anchor, div) {
    anchorclass = $('#' + anchor).attr('class').split(' ').slice(-1);
    divclass = $('#' + div).attr('class').split(' ').slice(-1);
    $('.' + divclass).hide();
    $('#' + div).show();
    $('.' + anchorclass).removeClass("selected");
    $('#' + anchor).addClass("selected");
}
/*mouse over and out events*/
function MouseOverShowText(id, classname) {
    $('#Shown').hide();
    $('#' + id).show();
}
function MouseOuthideText(id, classname) {
    $('.' + classname).hide();
    $('#Shown').show();
}

//LOGIN PAGE
function RestrictedLinkMessage(src) {
    $(document.getElementById(src)).after('<span class="PopUp"><div><p>To view this item you must <a href="javascript:void(0);" title="login" onclick="$(\'#LoginDiv\').slideDown();$(\'.PopUp\').hide();">log in</a></p><p><a href="javascript:void(0);" onclick="$(\'.PopUp\').hide();">Close</a></p></div></span>');
}

//TESTIMONIALS PAGE
hexinput1 = 247;
hexinput2 = 94;
hexinput3 = 184;
var inc = -1
function fadingtext() {
    if (!Stopped) {
        hexinput1 += 5;
        hexinput2 += 5;
        hexinput3 += 5;
        if (hexinput1 > 255)
            hexinput1 = 255;
        if (hexinput2 > 255)
            hexinput2 = 255;
        if (hexinput3 > 255)
            hexinput3 = 255;                     
        if (hexinput1 + hexinput2 + hexinput3 == 0) {
            Stopped = true;
        }
        Testimonials.style.color = "rgb(" + hexinput1 + "," + hexinput2 + "," + hexinput3 + ")"; // Set color value.
    }
    setTimeout("fadingtext()", 60);
}
var Stopped;
function ResetTextColour() {
    hexinput1 = 247;
    hexinput2 = 94;
    hexinput3 = 184;
    Testimonials.style.color = "rgb(" + hexinput1 + "," + hexinput2 + "," + hexinput3 + ")"; // Set color value.
}
function changetext() {
    if (TestimonailsText[Count] == null) {
        Count = 0;
    }
    if (Testimonials == null) {
        Testimonials = document.getElementById("Testimonials");
    }
    if (TestimonailsText.length == 0) {
        return;
    }
    ResetTextColour();
    Testimonials.innerHTML = TestimonailsText[Count];
    Stopped = false;
    Count++;
    setTimeout("changetext()", 9000);
}
function StartText() {
    Stopped = false;
    changetext();
    fadingtext();
}
var Count = 0;
var Testimonials;
var TestimonailsText = ["&quot;In terms of execution, I can honestly say your team has been outstanding.&quot;<br/><br/><b>Brigid Hodges, Director of Talent, Rentokil Initial plc</b>", "&quot;The tenacity and patience shown was fantastic, the key to successful delivery was the professionalism and drive of Linac.&quot; <br/><br/><b>Simon Harrison, Sales &amp; Marketing Director, Valspar Industries</b>", "&quot;The programme has been highly successful in equipping our Leaders with the skills to develop a culture of high performance.&quot; <br/><br/><b>Jonathan Logue, Learning & Development Manager, 02 Ireland</b>", "&quot;The training delivered was customised to our needs and of high quality. In a complex business such as ours, it gave us the outputs we wanted. I will definitely be working with Linac again.&quot; <br/><br/><b>Lisa Gray, European Learning &amp; Development Manager, The Walt Disney Company</b>", "&quot;Linac's approach to learning is dynamic and helped us to dramatically develop our people. I would strongly recommend Linac to any company looking to develop its people and achieve significant results.&quot; <br/><br/><b>Kathy Williams, 3663 Learning & Development Manager</b>"];
