// LMI web script
// © Flipside 2005
// Author: Richard Adams

function testy() {
// Displays random testimonial from the following
testimonials = new Array(
'"LMI-UK were keen to incorporate our culture and values into the training.  	Following completion of the programme, the feedback from all involved was universally positive."<br>&nbsp;<br><strong>CD - Bank of America</strong>',
'"I have emerged from this programme with a different outlook on leading my team, one that will enable a more effective performance from a more empowered group of managers."<br>&nbsp;<br><strong>AR - BP</strong>',
'"It is a testament to the programme I completed that I have been able to cope with a recent exceptional workload far more effectively than I would otherwise have done.  A highly motivating experience."<br>&nbsp;<br><strong>RB - Airtex Products</strong>',
'"Since working with LMI-UK our customers have commented on the sense of focus, energy and determination to succeed throughout the company.  This is having a positive impact on our bottom line."<br>&nbsp;<br><strong>DA - Start-rite Shoes Limited</strong>',
'"A major benefit of the programme was a better understanding of why and how to plan for my professional and personal life that, over just a short period of time, have both shown excellent results."<br>&nbsp;<br><strong>GB - Prolinx Computer Systems</strong>',
'"I made changes that significantly increased my productivity, developed new working habits that benefit my team, my family and me.  Although our workload has actually increased since I started the programme, I feel now that I am better equipped to manage it."<br>&nbsp;<br><strong>RH - Allied Irish Bank</strong>'
);

var testy = Math.floor(Math.random() * testimonials.length);
document.write('<p class=testimonial>'+testimonials[testy]+'<br>&nbsp;<br><a href="testimonials.html" class=menu>More client testimonials...</a></p>');
}

function printMenu(thispage) {
    // Prints menu
    if (thispage=='home') { 
        document.write('<a href="/index.html"><img src="/images/mhome1.gif" alt="Home"></a>') 
    } else { 
        document.write('<a href="/index.html"><img src="/images/mhome0.gif" alt="Home" onMouseOver="this.src=\'/images/mhome1.gif\'" onMouseOut="this.src=\'/images/mhome0.gif\'"></a>') 
    }
    if (thispage=='why_lmi-uk') { 
        document.write('<a href="/why_lmi-uk.html"><img src="/images/mwhy1.gif" alt="Why LMI-UK"></a>') 
    } else { document.write('<a href="/why_lmi-uk.html"><img src="/images/mwhy0.gif" alt="Programmes" onMouseOver="this.src=\'/images/mwhy1.gif\'" onMouseOut="this.src=\'/images/mwhy0.gif\'"></a>') 
    }
    if (thispage=='programmes') { 
        document.write('<a href="/programmes.html"><img src="/images/mprogrammes1.gif" alt="Programmes"></a>') 
    } else { document.write('<a href="/programmes.html"><img src="/images/mprogrammes0.gif" alt="Programmes" onMouseOver="this.src=\'/images/mprogrammes1.gif\'" onMouseOut="this.src=\'/images/mprogrammes0.gif\'"></a>') 
    }
    if (thispage=='successstories') { 
        document.write('<a href="/successstories.html"><img src="/images/msuccess1.gif" alt="Success Stories"></a>') 
    } else { 
        document.write('<a href="/successstories.html"><img src="/images/msuccess0.gif" alt="Success Stories" onMouseOver="this.src=\'/images/msuccess1.gif\'" onMouseOut="this.src=\'/images/msuccess0.gif\'"></a>') 
    }
    if (thispage=='ourteam') { 
        document.write('<a href="/ourteam.html"><img src="/images/mteam1.gif" alt="Our Team"></a>') 
    } else { 
        document.write('<a href="/ourteam.html"><img src="/images/mteam0.gif" alt="News" onMouseOver="this.src=\'/images/mteam1.gif\'" onMouseOut="this.src=\'/images/mteam0.gif\'"></a>') 
    }			
    if (thispage=='news') { 
        document.write('<a href="/news.html"><img src="/images/mnews1.gif" alt="News"></a>') 
    } else { 
        document.write('<a href="/news.html"><img src="/images/mnews0.gif" alt="News" onMouseOver="this.src=\'/images/mnews1.gif\'" onMouseOut="this.src=\'/images/mnews0.gif\'"></a>') 
    }
    if (thispage=='contact-us') { 
        document.write('<a href="/contact.html"><img src="/images/mcontact-us1.gif" alt="Contact Us"></a>') 
    } else { 
        document.write('<a href="/contact.html"><img src="/images/mcontact-us0.gif" alt="Contact Us" onMouseOver="this.src=\'/images/mcontact-us1.gif\'" onMouseOut="this.src=\'/images/mcontact-us0.gif\'"></a>') 
    }
}

function piccy(pics) {
// Displays random pic from the following
piclist = new Array();
piclist = pics.split(',');

var picno = Math.floor(Math.random() * piclist.length);
document.write('<div align=center><img src="/images/'+piclist[picno]+'.jpg" alt="Leadership Management Training" width=500 height=183 border=0></div>');
}

function menupic() {
// Displays random menu pic from the following
piclist = new Array('41','42','44','45','49');

var picno = Math.floor(Math.random() * piclist.length);
document.write('<img src="/images/'+piclist[picno]+'.jpg" alt="Sales Training, Management Training and Personal Development">');
}

function popup(mylink)
{
windowname='LMI';
width=440;
height=365;
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'top=400,left=400,width='+width+',height='+height+',status=no,scrollbars=yes,resizable=yes');
return false;
}


function redirect_regions() {
    var siteprefix = 'http://www.lmi-uk.com/staff';
    if(window.location.href.indexOf("lmi-eastern.com") > -1) {
        window.location.href = siteprefix+'eastern.html';
    }
    if(window.location.href.indexOf("lmi-eastern.co.uk") > -1) {
        window.location.href = siteprefix+'eastern.html';
    }
    if(window.location.href.indexOf("lmi-london.com") > -1) {
        window.location.href = siteprefix+'london.html';
    }
    if(window.location.href.indexOf("lmi-london.co.uk") > -1) {
        window.location.href = siteprefix+'london.html';
    }
    if(window.location.href.indexOf("lmi-northeast.com") > -1) {
        window.location.href = siteprefix+'northeast.html';
    }
    if(window.location.href.indexOf("lmi-northeast.co.uk") > -1) {
        window.location.href = siteprefix+'northeast.html';
    }
    if(window.location.href.indexOf("lmi-northwest.com") > -1) {
        window.location.href = siteprefix+'northwest.html';
    }
    if(window.location.href.indexOf("lmi-northwest.co.uk") > -1) {
        window.location.href = siteprefix+'northwest.html';
    }
    if(window.location.href.indexOf("lmi-scotland.com") > -1) {
        window.location.href = siteprefix+'scotland.html';
    }
    if(window.location.href.indexOf("lmi-scotland.co.uk") > -1) {
        window.location.href = siteprefix+'scotland.html';
    }
    if(window.location.href.indexOf("lmi-southeast.com") > -1) {
        window.location.href = siteprefix+'southeast.html';
    }
    if(window.location.href.indexOf("lmi-southeast.co.uk") > -1) {
        window.location.href = siteprefix+'southeast.html';
    }
    if(window.location.href.indexOf("lmi-southwest.co.uk") > -1) {
        window.location.href = siteprefix+'southwest.html';
    }
    if(window.location.href.indexOf("lmi-southwest.com") > -1) {
        window.location.href = siteprefix+'southwest.html';
    }
    if(window.location.href.indexOf("lmi-westmidlands.com") > -1) {
        window.location.href = siteprefix+'westmidlands.html';
    }
    if(window.location.href.indexOf("lmi-westmidlands.co.uk") > -1) {
        window.location.href = siteprefix+'westmidlands.html';
    }
}


function highlight_page_topnav() {
    var topnav = document.getElementById('topnav');
    var li_list = topnav.getElementsByTagName('li');
    for (var i = 0; i < li_list.length; i++) {
        var this_link = li_list[i].getElementsByTagName('a')[0];
        if (window.location.href == this_link.href) {
            this_link.className = 'highlighted';
        }
    }
}

