function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(function() { var instr if ((instr = document.getElementById('instr_close'))) { var instructions = document.getElementById('instructions') instr.hideDiv = instructions instr.onclick = hideDiv } }) function showDiv() { this.showDiv.style.display = 'block' } function hideDiv() { this.hideDiv.style.display = 'none' } addLoadEvent(function() { var formObject if ((formObject = document.getElementById('contactForm'))) { var myName = document.getElementById('name') var myOrg = document.getElementById('organisation') var myEmail = document.getElementById('email') var myInfo = document.getElementById('opt_info') var myQuote = document.getElementById('opt_quote') formObject.onsubmit = function() { return validate(myName.value,myOrg.value,myEmail.value,myInfo.checked,myQuote.checked) } } }) function validate(myName,myOrg,myEmail,myInfo,myQuote) { if (myName == '' || myOrg == '' || myEmail == '') { alert('Please complete the required fields') return false } else return true } addLoadEvent(function() { var n; window.slideTitles = [ ['This Slide Show Requires Javascript',0,'',0], ['Getting to Grips with Escendency','1','',0], ['Highest Level Objective','2','',0], ['Posts','3','',0], ['Performance Indicators','4','',0], ['Targets','5','',0], ['Responsibilities','6','',0], ['Inputting Data','7','',0], ['Action Plans','8','',0], ['Reporting','9','',0], ['The End','10','',0] ] window.jumpShip = 31; window.goDemo = 40; var nextButton = document.getElementById('buttonNext'); var prevButton = document.getElementById('buttonPrevious'); var firstButton = document.getElementById('buttonFirst'); var thisButton = document.getElementById('numerator'); if ((document.getElementById('gallery'))) { var thisGallery = document.getElementById('gallery').getElementsByTagName('img')[0] } if ((document.getElementById('newGallery'))) { var thisGallery = document.getElementById('newGallery').getElementsByTagName('img')[0] } var thisGoto = document.getElementById('gotoSlide').getElementsByTagName('a')[0] var thisSelector = document.getElementById('goto') for (n = 1; n < window.slideTitles.length; n++) { var option = document.createElement('option'); if (window.slideTitles[n][3] == 1) { option.setAttribute('class','hilite') option.style.color = '#fff' option.style.backgroundColor = '#69c' } else { option.style.color = '#000' option.style.backgroundColor = '#fff' } thisSelector.appendChild(option); option.setAttribute('value',n); option.appendChild(document.createTextNode(n + ': ' + window.slideTitles[n][0])); } thisButton.firstChild.nodeValue = 1; thisGallery.setAttribute('src','slides/izzy1.jpg'); var myH2 = document.getElementById('slideTitle') myH2.firstChild.nodeValue = window.slideTitles[1][0]; var thisDelimiter = document.getElementById('delimiter'); thisDelimiter.firstChild.nodeValue = window.slideTitles.length - 1; var myNotes = document.getElementById('galleryNotes').firstChild; myNotes.nodeValue = window.slideTitles[1][2]; var buttonVars = {} buttonVars = [thisButton,thisGallery,thisSelector] firstButton.buttonVars = buttonVars firstButton.direction = -1 firstButton.onmousedown = nextSlide firstButton.onmouseover = changeButton firstButton.onmouseout = restoreButton nextButton.buttonVars = buttonVars nextButton.direction = 0 nextButton.onmousedown = nextSlide nextButton.onmouseover = changeButton nextButton.onmouseout = restoreButton prevButton.buttonVars = buttonVars prevButton.direction = 1 prevButton.onmousedown = nextSlide prevButton.onmouseover = changeButton prevButton.onmouseout = restoreButton thisGoto.buttonVars = buttonVars thisGoto.onmousedown = showSelector thisSelector.gallery = thisGallery thisSelector.button = thisButton thisSelector.onchange = newSlide }) function hideLinks() { var newsLink = document.getElementsByTagName('a')[4]; newsLink.setAttribute('href','#'); var libraryLink = document.getElementsByTagName('a')[5]; libraryLink.setAttribute('href','#'); var aboutLink = document.getElementsByTagName('a')[6]; aboutLink.setAttribute('href','#'); var contactLink = document.getElementsByTagName('a')[7]; contactLink.setAttribute('href','#'); var contactLink = document.getElementsByTagName('a')[8]; contactLink.setAttribute('href','#'); } function showLinks() { var newsLink = document.getElementsByTagName('a')[4]; newsLink.setAttribute('href','news.html'); var libraryLink = document.getElementsByTagName('a')[5]; libraryLink.setAttribute('href','specialschools/index.php'); var libraryLink = document.getElementsByTagName('a')[6]; libraryLink.setAttribute('href','documents.html'); var aboutLink = document.getElementsByTagName('a')[7]; aboutLink.setAttribute('href','aboutus.html'); var contactLink = document.getElementsByTagName('a')[8]; contactLink.setAttribute('href','contact.html'); } function showSelector() { var selector = this.buttonVars[2] selector.style.display = 'inline' hideLinks(); } function newSlide() { this.style.display = 'none'; var myOption = this.selectedIndex + 1; var myNum = this.button var mySlide = this.gallery myNum.firstChild.nodeValue = myOption; mySlide.setAttribute('src','slides/izzy' + slideTitles[myOption][1] + '.jpg'); var myH2 = document.getElementById('slideTitle') myH2.style.visibility = 'hidden' window.setTimeout('delayTitle()',1000); myH2.firstChild.nodeValue = window.slideTitles[myOption][0]; var myNotes = document.getElementById('galleryNotes').firstChild; myNotes.nodeValue = window.slideTitles[myOption][2]; var lastSlide = document.getElementById('nextStep'); lastSlide.style.display = 'none'; if (window.slideTitles[myOption][0] == 'Want to know more?' || window.slideTitles[myOption][0] == 'Optional - Fun Reporting for Pupils') { mySlide.setAttribute('src','slides/izzy0.jpg'); lastSlide.style.display = 'block'; lastSlide.style.backgroundColor = 'transparent'; showInstructions() } var myGallery = document.getElementById('newGallery') var mail_link_div = document.createElement('div') var web_link_div = document.createElement('div') var mail_link_a = document.createElement('a') var web_link_a = document.createElement('a') mail_link_div.appendChild(mail_link_a) web_link_div.appendChild(web_link_a) var mail_link_img = document.createElement('img') var web_link_img = document.createElement('img') mail_link_a.appendChild(mail_link_img) web_link_a.appendChild(web_link_img) mail_link_img.setAttribute('src','images/mail_bloc.png') web_link_img.setAttribute('src','images/web_bloc.png') mail_link_a.setAttribute('href','mailto:info@escendency.com') web_link_a.setAttribute('href','http://www.escendency.com/schools') mail_link_div.style.position = 'absolute' mail_link_div.style.left = '420px' mail_link_div.style.top = '408px' web_link_div.style.position = 'absolute' web_link_div.style.left = '296px' web_link_div.style.top = '502px' if (window.slideTitles[myOption][0] == 'Want to see more?') { myGallery.appendChild(mail_link_div) myGallery.appendChild(web_link_div) mail_link_div.style.display = 'block' web_link_div.style.display = 'block' } else { mail_link_div.style.display = 'none' web_link_div.style.display = 'none' } if (window.slideTitles[myOption][1] == window.jumpShip) { mySlide.setAttribute('src','slides/izzy' + window.slideTitles[myOption][1] + '.jpg'); lastSlide.style.display = 'block'; } window.setTimeout('showLinks()',5000); } /* function showInstructions() { var instr if ((instr = document.getElementById('instr_close'))) { var instructions = document.getElementById('instructions') var instrP = instructions.getElementsByTagName('p')[0] clearLabel(instrP) instrP.appendChild(document.createTextNode('Tip: Remember if you have clicked F11 to temporarily remove the browser tool bars, clicking F11 again will restore them')) instructions.style.display = 'block' } } */ function delayTitle() { if ((document.getElementById('responseMessage'))) { var responseMessage = document.getElementById('responseMessage') responseMessage.style.display = 'none'; } var myH2 = document.getElementById('slideTitle'); myH2.style.visibility = 'visible'; } function nextSlide() { showLinks(); var myNum = this.buttonVars[0] var mySlide = this.buttonVars[1] var selector = this.buttonVars[2] var num = this.direction selector.style.display = 'none'; num = num * -2 + 1; var thisNum = eval(myNum.firstChild.nodeValue); if (num == 3) var newNum = '1'; else var newNum = thisNum + num + ''; if (newNum > 0 && newNum < window.slideTitles.length) { myNum.firstChild.nodeValue = newNum; mySlide.setAttribute('src','slides/izzy' + slideTitles[newNum][1] + '.jpg'); var myH2 = document.getElementById('slideTitle'); myH2.style.visibility = 'hidden' window.setTimeout('delayTitle()',1000); myH2.firstChild.nodeValue = window.slideTitles[newNum][0]; var myNotes = document.getElementById('galleryNotes').firstChild; myNotes.nodeValue = window.slideTitles[newNum][2]; var lastSlide = document.getElementById('nextStep'); lastSlide.style.display = 'none'; if (window.slideTitles[newNum][0] == 'Want to know more?' || window.slideTitles[newNum][0] == 'Optional - Fun Reporting for Pupils') { mySlide.setAttribute('src','slides/izzy0.jpg'); lastSlide.style.display = 'block'; lastSlide.style.backgroundColor = 'transparent'; showInstructions() } if (window.slideTitles[newNum][1] == window.jumpShip) { mySlide.setAttribute('src','slides/izzy' + window.slideTitles[newNum][1] + '.jpg'); lastSlide.style.display = 'block'; } } } function changeButton() { this.style.backgroundImage = "url(images/slide_control_o.jpg)"; } function restoreButton() { this.style.backgroundImage = "url(images/slide_control_u.jpg)"; } function clearLabel(myLabel) { while (myLabel.childNodes[0]) { myLabel.removeChild(myLabel.childNodes[0]); } }