﻿menuHideDelay = 500;
lastMenu = "";
myTime = null;

function setHeight()
    {
    
        var pageDivHeight = document.getElementById("page").offsetHeight;
        
        var menuHeight = document.getElementById("menucontent").offsetHeight + document.getElementById("menubottom").offsetHeight
        
        var spacerHeight = pageDivHeight - menuHeight;
        document.getElementById("menuspacer").style.height = spacerHeight+"px";

    }
    
    
function showSecondMenu(sender, menuId)
{
	if(menuId != lastMenu)
	{
		hideSecondMenu(lastMenu);
	}
	
	if(myTime != null)
	{
		clearTimeout(myTime);
	}

	var menu2 = document.getElementById(menuId);
	menu2.style.top = getElementPosition(sender.id).top + 23 +"px";
	menu2.style.left = getElementPosition(sender.id).left + -40 +"px";
	menu2.style.display = "";
	lastMenu = menuId;
}

function hideSecondMenu(menuId)
{
	if(lastMenu != "")
	{
		var menu2 = document.getElementById(menuId);
		menu2.style.display = "none";
	}
}

function selectedSecondMenu()
{
	clearTimeout(myTime);
}

function setMenuHideTimer(menuId)
{
	myTime = setTimeout("hideSecondMenu('"+menuId+"')", menuHideDelay)
}

function getElementPosition(elemID){
var offsetTrail = document.getElementById(elemID);
var offsetLeft = 0;
var offsetTop = 0;
while (offsetTrail){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
offsetTrail = offsetTrail.offsetParent;
}
if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
offsetLeft += document.body.leftMargin;
offsetTop += document.body.topMargin;
}
return {left:offsetLeft,top:offsetTop};
}


function random_imglink()
{
      var myimages = new Array();
      myimages[1]="Images/header2.jpg";
      myimages[2]="Images/header3.jpg";
      myimages[3]="Images/header4.jpg";
      myimages[4]="Images/header5.jpg";
      myimages[5]="Images/header_Home.jpg";

      var ry=Math.floor(Math.random()*myimages.length);

      if (ry==0)
         ry=1;
      
      document.getElementById("header").style.backgroundImage = "url("+myimages[ry]+")";
      
}


function random_requestimage()
{
      var supportimages = new Array();
      supportimages[1]="Images/Request1.jpg";
      supportimages[2]="Images/Request2.jpg";


      var ry=Math.floor(Math.random()*supportimages.length);

      if (ry==0)
         ry=1;
      
      document.getElementById("supportbg").style.backgroundImage = "url("+supportimages[ry]+")";
}



function random_successimage()
{
      var successimages = new Array();
      successimages[1]="Images/Success1.jpg";
      successimages[2]="Images/Success2.jpg";

      var ry=Math.floor(Math.random()*successimages.length);

      if (ry==0)
         ry=1;
      
      document.getElementById("successbg").style.backgroundImage = "url("+successimages[ry]+")";
}


function SwapImage(elementid, newimageurl)
{
    var elem = document.getElementById(elementid);
    elem.src = newimageurl;
}

function random_text_clients()
{
  var mytext=new Array()
  //specify random text below. You can have as many as you wish
  mytext[1]='"I really enjoy the experiencial style that can be related to what we all do, even though it is usually a completely different market. It makes me think outside the box."'
  mytext[2]='"Excellent, easy to absorb and put into practice."'
  mytext[3]='"Great course! Pace of learning is very good."'
  mytext[4]='"This was a great course-lively, good group, good venue, absolutely superb trainer"'
  mytext[5]='"Excellent tuition."'
  mytext[6]='"Everything was prepared and explained professionally."'
  mytext[7]='"All more than met my requirements from this course. Good enthusiastic trainer."'
  mytext[8]='"We have enjoyed a valuable range of support including training assessment and consultancy; the benefits are huge."'
  mytext[9]='"All great; learnt loads. Thanks"'
  mytext[10]='"I thoroughly enjoyed the course and would recommend it to anyone interested in team dynamics and leadership approaches."'

  var mytext2=new Array()
  mytext2[1]='Sally Swift, Medirep Marketing Ltd'
  mytext2[2]='John Ridley, Asmech Systems Ltd'
  mytext2[3]='Claire Ledger, Bredent UK Ltd'
  mytext2[4]='Barry Richardson, Forlinux Ltd'
  mytext2[5]='Michael White, Walton Garden Buildings'
  mytext2[6]='Chris Tansley, Steetley Dolomite'
  mytext2[7]='Bill Saville, Uponor Ltd'
  mytext2[8]='Pete Warner, Knight Warner Ltd'
  mytext2[9]='Louise Berrisford, Gonalston Farm Shop'
  mytext2[10]='Jenny Ashworth, APTCOO Ltd'
  
  var ry=Math.floor(Math.random()*mytext.length)

  if (ry==0)
     ry=1
     document.write(''+mytext[ry]+'<p style="text-align:center; margin-bottom:8px;">'+mytext2[ry]+'</p>')
      
}

function random_text_clients2()
{
  var mytext=new Array()
  //specify random text below. You can have as many as you wish
  mytext[1]='"Very Professional"'
  mytext[2]='"Presentation and delivery were first class."'
  mytext[3]='"I liked the mix of accedemic theories and real world solutions"'
  mytext[4]='"Everything very good, very well organised."'
  mytext[5]='"The exercises were a good way of getting us to communicate as a group and to access our strenths and weaknesses."'
  mytext[6]='"Inspired me with confidence to try different approach to leading."'
  mytext[7]='"The teaching technique is one to be admired and used in future coaching sessions."'
  mytext[8]='"Provoked thoughts around general areas of learning within the company."'
  mytext[9]='"Great use of my time. Good value for money!!"'
  mytext[10]='"An excellent delivery method which encourages trainee interaction."'

  var mytext2=new Array()
  mytext2[1]='Robert Oldham, Uponor Ltd'
  mytext2[2]='Mervyn Hodgson, Ansec (UK) Ltd'
  mytext2[3]='Ann Coxall, Notts Dyslexia Soc'
  mytext2[4]='Amanda Marsden, Jacksons the Bakers'
  mytext2[5]='Andrew Brewer, Avoca Systems Ltd'
  mytext2[6]='Dave Yeomans, Acres Willington'
  mytext2[7]='Brian Roberts, Gardner Aerospace Ltd'
  mytext2[8]='Mark Scott, Fairfield Control Systems'
  mytext2[9]='Simon Meadows, Sterling Property Care Ltd'
  mytext2[10]='Brian Roberts, Gardner Aerospace Ltd'
  
  var ry=Math.floor(Math.random()*mytext.length)

  if (ry==0)
     ry=1
     document.write(''+mytext[ry]+'<p style="text-align:center; margin-bottom:8px;">'+mytext2[ry]+'</p>')
      
}

function random_text_clients3()
{
  var mytext=new Array()
  //specify random text below. You can have as many as you wish
  mytext[1]='"You had taken on board our comments of what the group would like to discuss. The style of training perfectly met the learning style of the group. Topics discussed were excellent and timing perfectly suited our needs. I gained much from the programme"'
  mytext[2]='"Very useful. Delivered in a relaxed and informal environment. Excellent use of "real-life" business examples."'
  mytext[3]='"The programme did everything it was designed to do."'
  mytext[4]='"Very professionally run course, clearly delivered and at a good pace."'
  mytext[5]='"Enjoyed the fact that this was very much an interacting group learning from each other as well as the trainer."'
  mytext[6]='"Everything has been useful in different ways"'
  mytext[7]='"Great facilitator - thanks"'
  mytext[8]='"Every aspect was useful"'
  mytext[9]='"Good programme delivered in an interesting and professional manner."'
  mytext[10]='"Well presented, clear, understandable"'

  var mytext2=new Array()

  mytext2[1]='Sarah Stuart, Derwent Stepping Stones'
  mytext2[2]='Helen Richardson, Orbital Recruitment Limited'
  mytext2[3]='Rebecca Safhill-Barber, The Millstone Inn'
  mytext2[4]='Victoria Tabiner, Ethiprint'
  mytext2[5]='Adam Morris, Zibrant (IBR)'
  mytext2[6]='Sasha Nugent, Discovery Childcare'
  mytext2[7]='Liz Pattison, Food & Drink Forum'
  mytext2[8]='Carl Matts, Sherwood Press'
  mytext2[9]='Keith Walker, Fairfield Control Systems'
  mytext2[10]='David Charlton, The Mansfield Building Society'
  
  var ry=Math.floor(Math.random()*mytext.length)

  if (ry==0)
     ry=1
     document.write(''+mytext[ry]+'<p style="text-align:center; margin-bottom:8px;">'+mytext2[ry]+'</p>')
      
}