//FUCNTION FOR PILLAR NAVIGATION POPOUT MENU
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}

//FUNCTION FOR COLLAPSING MENU IN INFO CORNER
var arrOnOff=new Array();
var arrSubmenu=new Array();
var arrExpandImg=new Array();

arrExpandImg[0]='common/img/SignPLUS.gif';
arrExpandImg[1]='common/img/SignMINUS.gif';

//define numOfMenus. It should be equal to the number of submenus you have.
numOfMenus=17;

//Define arrays with submenu items
arrSubmenu[0]='<span class="submenu_display"><a href="/hr_howtoapply.asp?q=cert">Certified Staff</a><br><a href="/hr_howtoapply.asp?q=sub">Substitute Teachers</a><br><a href="/hr_howtoapply.asp?q=supt">Support Staff</a><br><a href="/hr_howtoapply.asp?q=admin">Administrative</a><br><a href="/hr_howtoapply.asp?q=vol">Volunteers</a><br></span>';
arrSubmenu[1]='<span class="submenu_display"><a href="/docs/HR/SalarySchedule_Certified.pdf" target="_blank">Certified Staff</a><br><a href="/docs/HR/SalarySchedule_SupportStaff.pdf" target="_blank">Support Staff</a><br><a href="/docs/HR/SalarySchedule_AssistantPrincipalSchoolPsychologist.pdf" target="_blank">Assistant Principal</a><br><a href="/docs/HR/SalarySchedule_AssistantPrincipalSchoolPsychologist.pdf" target="_blank">School Psychologist</a><br><a href="/docs/HR/SalarySchedule_TechnologyStaff.pdf" target="_blank">Technology Staff</a><br><a href="/docs/HR/SalarySchedule_NurseLPN.pdf" target="_blank">Nurse LPN</a><br><a href="/docs/HR/SalarySchedule_ExtraCurricular.Coaching.pdf" target="_blank">Extra Curricular</a><br></span>';
arrSubmenu[2]='<span class="submenu_display"><a href="/docs/StudentAchievement/StudentInfoCards/StudentInfoCard_English.pdf" target="_blank">Registration/Student Info</a><br><a href="/docs/StudentAchievement/StudentInfoCards/CourseSelections.pdf" target="_blank">Course Selections</a><br><a href="/docs/Bilingual/HomeLanguageSurvey-English.pdf" target="_blank">Home Language Survey</a><br><a href="/docs/StudentAchievement/McKinneyVentoInformationForm_English.pdf" target="_blank">Homeless Assistance</a><br></span>';
arrSubmenu[3]='<span class="submenu_display"><a href="/docs/StudentAchievement/StudentInfoCards/StudentInfoCard_Spanish.pdf" target="_blank">Formulario de Inscripci&oacute;n</a><br><a href="/docs/Bilingual/HomeLanguageSurvey-Spanish.pdf" target="_blank">Encuesta Sobre el Idioma</a><br><a href="/docs/StudentAchievement/McKinneyVentoInformationForm_Spanish.pdf" target="_blank">Formulario McKinney- Vento</a><br></span>';
arrSubmenu[4]='<span class="submenu_display"><a href="/docs/SpecialServices/ProceduralSafeguardsEnglish.pdf" target="_blank">English Version</a><br><a href="/docs/SpecialServices/ProceduralSafeguardsSpanish.pdf" target="_blank">En Espa&ntilde;ol</a><br></span>';
arrSubmenu[5]='<span class="submenu_display"><a href="/supportservices_main.asp">Support Services Home</a><br><a href="/facilities_main.asp">Facilities</a><br><a href="/finance_main.asp">Finance</a><br><a href="/foodservices_main.asp">Food Services</a><br><a href="/hr_main.asp">Human Resources</a><br><a href="/athletics_main.asp">Interscholastic Programs</a><br><a href="/purchasing_main.asp">Purchasing</a><br><a href="/transportation_main.asp">Transporation</a><br></span>';
arrSubmenu[6]='<span class="submenu_display"><a href="/docs/Athletics/CCHSAthleticDir.pdf" target="_blank">Copper Canyon HS</a><br><a href="/docs/Athletics/LJHSAthleticDir.pdf" target="_blank">LaJoya Community HS</a><br><a href="/docs/Athletics/SLHSAthleticDir.pdf" target="_blank">Sierra Linda HS</a><br><a href="/docs/Athletics/TUHSAthleticDir.pdf" target="_blank">Tolleson Union HS</a><br><a href="/docs/Athletics/WHSAthleticDir.pdf" target="_blank">Westview HS</a><br></span>';
arrSubmenu[7]='<span class="submenu_display"><a href="http://www.avondale.org/" target="_blank">City of Avondale</a><br><a href="http://www.glendaleaz.com/" target="_blank">City of Glendale</a><br><a href="http://www.phoenix.gov/" target="_blank">City of Phoenix</a><br><a href="http://www.tollesonaz.org/" target="_blank">City of Tolleson</a><br><a href="http://www.gric.nsn.us/newdirection/" target="_blank">Gila River Indian Community</a><br></span>';
arrSubmenu[8]='<span class="submenu_display"><a href="/curriculum_main.asp">Curriculum Home</a><br><a href="/bilingual_main.asp">Bilingual &amp; Migrant</a><br><a href="/careertechnical_main.asp">Career &amp; Technical Ed.</a><br><a href="/gifted_main.asp">Gifted Education</a><br><a href="/grants_main.asp">Grants</a><br><a href="/sped_main.asp">Special Education</a><br><a href="/studentachievement_main.asp">Student Achievement</a><br></span>';
arrSubmenu[9]='<span class="submenu_display"><a href="/docs/Bilingual/HomeLanguageSurvey-Spanish.pdf" target="_blank">Encuesta Sobre el Idioma</a><br><a href="/docs/Bilingual/ParentalNotification-Spanish.pdf" target="_blank">Formulario de Consentimiento</a><br><a href="/docs/Bilingual/ParentNotificationAfterReclassification-Spanish.pdf" target="_blank">Aviso a los Padres de Clasificaci&oacute;n Nueva</a><br><a href="/docs/Bilingual/ParentRequestforWithdrawal-Spanish.pdf" target="_blank">Solicitud de Retiro</a><br><a href="/docs/Bilingual/WaiverRequestForm-Spanish.pdf" target="_blank">Solicitud de Exenci&oacute;n</a><br></span>';
arrSubmenu[10]='<span class="submenu_display"><a href="univ_appoverview.asp">Application Overview</a><!--<br><a href="docs/UniversityHigh/AdmissionApp.pdf" target="_blank">Admission Application</a><img src="common/img/ico.acrobat.12x12.gif" hspace="2" border="0"><br><a href="docs/UniversityHigh/AdmissionCalendarOfEvents.pdf" target="_blank">Admission Calendar</a><img src="common/img/ico.acrobat.12x12.gif" hspace="2" border="0"><br>--></span>';
arrSubmenu[11]='<span class="submenu_display"><a href="/docs/CTE/CTE08_Finance_Accounting.pdf" target="_blank">Accounting</a><br><a href="/docs/CTE/CTE08_Transportation-Distribution_AutomotiveTechnologies.pdf" target="_blank">Automotive Technologies</a><br><a href="/docs/CTE/CTE08_HealthScience_BiomedicalTechnology.pdf" target="_blank">Biomedical Technologies</a><br><a href="/docs/CTE/CTE08_ArchitectureConstruction_CarpentryTechnologies.pdf" target="_blank">Carpentry</a><br><a href="/docs/CTE/CTE08_ArchitectureConstruction_ConstructionTechnologies.pdf" target="_blank">Construction</a><br><a href="/docs/CTE/CTE08_Hospitality_CulinaryArts.pdf" target="_blank">Culinary Arts</a><br><a href="/docs/CTE/CTE08_ArchitectureConstruction_DraftingAndDesign.pdf" target="_blank">Drafting & Design</a><br><a href="/docs/CTE/CTE08_Education_EarlyChildhood.pdf" target="_blank">Early Childhood</a><br><a href="/docs/CTE/CTE08_InformationTechnology_Electronics.pdf" target="_blank">Electronics</a><br><a href="docs/CTE/CTE08_Manufacturing_FashionDesignAndMerchandising.pdf" target="_blank">Fashion Design</a><br><a href="/docs/CTE/CTE08_Finance_FinancialServices.pdf" target="_blank">Financial Services</a><br><a href="/docs/CTE/CTE08_Education_FutureTeachers.pdf" target="_blank">Future Teachers</a><br><a href="/docs/CTE/CTE08_Marketing_ManagementAndEntrepreneurship.pdf" target="_blank">Marketing</a><br><a href="/docs/CTE/CTE08_InformationTechnology_Programming.pdf" target="_blank">Programming</a><br><a href="/docs/CTE/CTE08_HealthScience_SportsMedicine.pdf" target="_blank">Sports Medicine</a><br><a href="/docs/CTE/CTE08_InformationTechnology_WebPageDesign.pdf" target="_blank">Web Page Design</a><br><a href="/docs/CTE/CTE08_ArchitectureConstruction_WeldingTechnology.pdf" target="_blank">Welding Technology</a><br></span>';
arrSubmenu[12]='<span class="submenu_display"><a href="/docs/StudentAchievement/AcademicPlanningGuide_1011.pdf" target="_blank">10/11 School Year</a><br><a href="/docs/StudentAchievement/AcademicPlanningGuide_1011Spanish.pdf" target="_blank">10/11 en Espa&ntilde;ol</a><br><a href="/docs/StudentAchievement/AcademicPlanningGuide_0910.pdf" target="_blank">09/10 School Year</a><br><a href="/docs/StudentAchievement/AcademicPlanningGuide_0910Spanish.pdf" target="_blank">09/10 en Espa&ntilde;ol</a><br></span>';
arrSubmenu[13]='<span class="submenu_display"><a href="/docs/Calendars/TUHSD.Calendar2007-08.pdf" target="_blank">07/08 School Year</a><br><a href="/docs/Calendars/TUHSD.Calendar2008-09.pdf" target="_blank">08/09 School Year</a><br><a href="/docs/Calendars/TUHSD.Calendar2009-10.pdf" target="_blank">09/10 School Year</a><br></span>';
arrSubmenu[14]='<span class="submenu_display"><a href="docs/Scholarships/EstrellaRepublicanWomen\'sClub.pdf" target="_blank">Estrella Republican Women\'s Club</a><br><a href="docs/Scholarships/NationalLatinoPeaceOfficersAssociation.pdf" target="_blank">National Latino Peace Officers Association</a><br><a href="docs/Scholarships/EstrellaRotaryScholarshipApplication.doc" target="_blank">Estrella Rotary Club</a><br></span>';
arrSubmenu[15]='<span class="submenu_display"><a href="/hr_benefits.asp">Benefits Overview</a><br><a href="docs/HR/403bRetirementInformation.pdf" target="_blank">403(b) Retirement <img src="common/img/ico.acrobat.12x12.gif" alt="" hspace="2" border="0"/></a><br></span>';
arrSubmenu[16]='<span class="submenu_display"><a href="/docs/StudentAchievement/StudentProceduresHandbook.pdf" target="_blank">English Handbook</a><br><a href="/docs/StudentAchievement/StudentProceduresHandbookSP.pdf" target="_blank">Manual en Espa&ntilde;ol</a><br></span>';
arrSubmenu[17]='<span class="submenu_display"><a href="/docs/Calendars/TUHSD.Calendar2009-10.pdf" target="_blank">2009-2010 Calendar</a><br><a href="/docs/Calendars/TUHSD.Calendar2010-11.pdf" target="_blank">2010-2011 Calendar</a><br><a href="/docs/Calendars/TUHSD.Calendar2011-12.pdf" target="_blank">2011-2012 Calendar</a><br></span>';

for (loop=0; loop<numOfMenus; loop++){
 arrOnOff[loop]=0;
}

function dropmenu(menu_id, menu_number, img_id){

if (arrOnOff[menu_number]==0)
  {
    menu_id.innerHTML=arrSubmenu[menu_number];
    arrOnOff[menu_number]=1;
	img_id.src=arrExpandImg[1];	
  }
else
  {
    menu_id.innerHTML="";
    arrOnOff[menu_number]=0;
	img_id.src=arrExpandImg[0];	
  }
}

//FUNCTION FOR SLHS CONSTRUCTION PICS IN SLIDE VIEW
//Global array set for picture slides
var arrSlides = new Array();

function Slide(filename, postedDate, caption)
{
	this.Filename = filename;
	this.PostedDate = postedDate;
	this.Caption = caption;
}

function loadSlides()
{
//Populate array
arrSlides[0] = new Slide('01_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[1] = new Slide('02_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[2] = new Slide('03_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[3] = new Slide('04_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[4] = new Slide('05_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[5] = new Slide('06_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[6] = new Slide('07_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[7] = new Slide('08_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[8] = new Slide('09_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[9] = new Slide('10_SLHS_groundbreaking.jpg', '10\/26\/07', 'Ground Breaking Ceremony');
arrSlides[10] = new Slide('SLHS_01_11.26.07.jpg', '11\/26\/07', 'Ariel View 1');
arrSlides[11] = new Slide('SLHS_02_11.26.07.jpg', '11\/26\/07', 'Ariel View 2');
arrSlides[12] = new Slide('SLHS_03_11.26.07.jpg', '11\/26\/07', 'Ariel View 3');
arrSlides[13] = new Slide('SLHS_04_12.27.07.jpg', '12\/27\/07', 'Ariel View 4');
arrSlides[14] = new Slide('SLHS_05_12.27.07.jpg', '12\/27\/07', 'Ariel View 5');
arrSlides[15] = new Slide('SLHS_06_12.27.07.jpg', '12\/27\/07', 'Ariel View 6');
arrSlides[16] = new Slide('SLHS_07_01.25.08.jpg', '01\/25\/08', 'Ariel View 7');
arrSlides[17] = new Slide('SLHS_08_01.25.08.jpg', '01\/25\/08', 'Ariel View 8');
arrSlides[18] = new Slide('SLHS_09_01.25.08.jpg', '01\/25\/08', 'Ariel View 9');
arrSlides[19] = new Slide('SLHS_01_07.28.08.jpg', '07\/28\/08', 'Ariel View 10');
arrSlides[20] = new Slide('SLHS_02_07.28.08.jpg', '07\/28\/08', 'Ariel View 11');
arrSlides[21] = new Slide('SLHS_03_07.28.08.jpg', '07\/28\/08', 'Ariel View 12');
arrSlides[22] = new Slide('SLHS08.27.08_01.jpg', '08\/27\/08', 'Ariel View 13');
arrSlides[23] = new Slide('SLHS08.27.08_02.jpg', '08\/27\/08', 'Ariel View 14');
arrSlides[24] = new Slide('SLHS08.27.08_03.jpg', '08\/27\/08', 'Ariel View 15');
}

//Declare a variable to hold the array index of picture to display
var currentIndex = 0;

function cycleSlides()
{
	
	 // Make sure that there are image filenames in the array
     if(arrSlides.length>0 && document.getElementById)
     {		
       // Increment the image index
       currentIndex++;
				
       // Check to see if the current image index is greater than the last index of the array
       if (currentIndex > arrSlides.length - 1)
     	  currentIndex = 0;
		
		// Update the span tag that display the number of the image that is currently displayed
    	document.getElementById('spnCounter').innerHTML='Image ' + (currentIndex+1) + ' of ' + arrSlides.length;

		//Update the image that is displayed
		document.getElementById('slideFrame').src='/common/img/schools/SLHS/construction/' + arrSlides[currentIndex].Filename;
		
		// Update the span tag that contains the caption, or description of the picture 
    	document.getElementById('spnCaption').innerHTML = arrSlides[currentIndex].Caption;
		
	 	// Update the span tag that contains the date posted 
    	document.getElementById('spnDate').innerHTML = 'Date: ' + arrSlides[currentIndex].PostedDate;
	
		document.frmPicViewer.btnPrev.disabled = true;
	}
	
}

function picNext()
{
	// Increment counter
	currentIndex++;

	// Make sure we are not past the end of our array
	if (currentIndex < arrSlides.length)
	
	{
	
		// Disable the Next button if we are on the last picture
		document.frmPicViewer.btnNext.disabled = (currentIndex == arrSlides.length-1)

		// Update the span tag that display the number of the image that is currently displayed
    	document.getElementById('spnCounter').innerHTML='Image ' + (currentIndex+1) + ' of ' + arrSlides.length;

		//Update the image that is displayed
		document.getElementById('slideFrame').src='/common/img/schools/SLHS/construction/' + arrSlides[currentIndex].Filename;
		
		// Update the span tag that contains the caption, or description of the picture 
    	document.getElementById('spnCaption').innerHTML = arrSlides[currentIndex].Caption;

		 // Update the span tag that contains the date posted 
    	document.getElementById('spnDate').innerHTML = 'Date: ' + arrSlides[currentIndex].PostedDate;

		document.frmPicViewer.btnPrev.disabled = false;
	}
	
}

function picPrev()
{
	// Decrement counter
	currentIndex --;
	
	// Make sure we are not past the end of our array
	if (currentIndex >= 0)
	{
		
		
		// Disable the Previous button if we are on the last picture
		document.frmPicViewer.btnPrev.disabled = (currentIndex == 0);

		// Update the span tag that display the number of the image that is currently displayed
    	document.getElementById('spnCounter').innerHTML='Image ' + (currentIndex+1) + ' of ' + arrSlides.length;

		//Update the image that is displayed
		document.getElementById('slideFrame').src='/common/img/schools/SLHS/construction/' + arrSlides[currentIndex].Filename;
		
		// Update the span tag that contains the caption, or description of the picture 
    	document.getElementById('spnCaption').innerHTML = arrSlides[currentIndex].Caption;

	 	// Update the span tag that contains the date posted 
    	document.getElementById('spnDate').innerHTML = 'Date: ' + arrSlides[currentIndex].PostedDate;
		
		document.frmPicViewer.btnNext.disabled = false;
	}
	
}

var timer;
function picAuto()
{
	if(document.frmPicViewer.btnAuto.value == 'Slide Show')
	{
	timer = window.setInterval('cycleSlides()',3000);
	document.frmPicViewer.btnAuto.value = 'Stop';
	document.frmPicViewer.btnNext.disabled = true;
	document.frmPicViewer.btnPrev.disabled = true;
	}
	else
	{
	window.clearInterval(timer);
	document.frmPicViewer.btnAuto.value = 'Slide Show';
	document.frmPicViewer.btnNext.disabled = false;
	document.frmPicViewer.btnPrev.disabled = false;
	}
}

//FUNCTION FOR AJAX FUNCTIONALITY ON PAGES USING DIV TO DYNAMICALLY REPLACE CONTENT
var myHttpRequest = false;

if(window.XMLHttpRequest)
	myHttpRequest = new XMLHttpRequest();
else if(window.ActiveXObject)
	myHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
	
	
function loadContent(source, content)
{
 	if(myHttpRequest)
	{
		var data = document.getElementById(content);
		myHttpRequest.open("GET",source);
		myHttpRequest.onreadystatechange = function()
		{
			if(myHttpRequest.readyState	== 4)
				data.innerHTML = myHttpRequest.responseText;
		}
		
		myHttpRequest.send(null);
	}
	
}
//***********************************************************************//

//FUNCTION FOR AJAX/XML TICKER

// -------------------------------------------------------------------
// Ajax XML Ticker (txt file source)
// Author: Dynamic Drive (http://www.dynamicdrive.com)
// -------------------------------------------------------------------

////////////No need to edit beyond here//////////////

function createAjaxObj(){
var httprequest=false
if (window.XMLHttpRequest){ // if Mozilla, Safari etc
httprequest=new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject){ // if IE
try {
httprequest=new ActiveXObject("Msxml2.XMLHTTP");
} 
catch (e){
try{
httprequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
return httprequest
}

// -------------------------------------------------------------------
// Main Ajax Ticker Object function
// ajax_ticker(xmlfile, divId, divClass, delay, optionalfadeornot)
// -------------------------------------------------------------------

function ajax_ticker(xmlfile, divId, divClass, delay, fadeornot){
this.xmlfile=xmlfile //Variable pointing to the local ticker xml file (txt)
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over ticker (and pause it if it is)
this.pointer=0
this.opacitystring=(typeof fadeornot!="undefined")? "width: 100%; filter:progid:DXImageTransform.Microsoft.alpha(opacity=100); -moz-opacity: 1" : ""
if (this.opacitystring!="") this.delay+=500 //add 1/2 sec to account for fade effect, if enabled
this.opacitysetting=0.2 //Opacity value when reset. Internal use.
this.messages=[] //Arrays to hold each message of ticker
this.ajaxobj=createAjaxObj()
document.write('<div id="'+divId+'" class="'+divClass+'"><div style="'+this.opacitystring+'">Initializing ticker...</div></div>')
this.getXMLfile()
}

// -------------------------------------------------------------------
// getXMLfile()- Use Ajax to fetch xml file (txt)
// -------------------------------------------------------------------

ajax_ticker.prototype.getXMLfile=function(){
if (this.ajaxobj){
var instanceOfTicker=this
var url=this.xmlfile+"?bustcache="+new Date().getTime()
this.ajaxobj.onreadystatechange=function(){instanceOfTicker.initialize()}
this.ajaxobj.open('GET', url, true)
this.ajaxobj.send(null)
}
}

// -------------------------------------------------------------------
// initialize()- Initialize ticker method.
// -Gets contents of xml file and parse it using JavaScript DOM methods 
// -------------------------------------------------------------------

ajax_ticker.prototype.initialize=function(){ 
if (this.ajaxobj.readyState == 4){ //if request of file completed
if (this.ajaxobj.status==200 || window.location.href.indexOf("http")==-1){ //if request was successful
this.contentdiv=document.getElementById(this.tickerid).firstChild //div of inner content that holds the messages
var xmldata=this.ajaxobj.responseText
this.contentdiv.style.display="none"
this.contentdiv.innerHTML=xmldata
if (this.contentdiv.getElementsByTagName("div").length==0){ //if no messages were found
this.contentdiv.innerHTML="<b>Error</b> fetching remote ticker file!"
return
}
var instanceOfTicker=this
document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){instanceOfTicker.contentdiv=instanceOfTicker.ajaxobj=null})
//Cycle through XML object and store each message inside array
for (var i=0; i<this.contentdiv.getElementsByTagName("div").length; i++){
if (this.contentdiv.getElementsByTagName("div")[i].className=="message")
this.messages[this.messages.length]=this.contentdiv.getElementsByTagName("div")[i].innerHTML
}
this.contentdiv.innerHTML=""
this.contentdiv.style.display="block"
this.rotatemsg()
}
}
}

// -------------------------------------------------------------------
// rotatemsg()- Rotate through ticker messages and displays them
// -------------------------------------------------------------------

ajax_ticker.prototype.rotatemsg=function(){
var instanceOfTicker=this
if (this.mouseoverBol==1) //if mouse is currently over ticker, do nothing (pause it)
setTimeout(function(){instanceOfTicker.rotatemsg()}, 100)
else{ //else, construct item, show and rotate it!
this.fadetransition("reset") //FADE EFFECT- RESET OPACITY
this.contentdiv.innerHTML=this.messages[this.pointer]
this.fadetimer1=setInterval(function(){instanceOfTicker.fadetransition('up', 'fadetimer1')}, 100) //FADE EFFECT- PLAY IT
this.pointer=(this.pointer<this.messages.length-1)? this.pointer+1 : 0
setTimeout(function(){instanceOfTicker.rotatemsg()}, this.delay) //update container periodically
}
}

// -------------------------------------------------------------------
// fadetransition()- cross browser fade method for IE5.5+ and Mozilla/Firefox
// -------------------------------------------------------------------

ajax_ticker.prototype.fadetransition=function(fadetype, timerid){
var contentdiv=this.contentdiv
if (fadetype=="reset")
this.opacitysetting=0.2
if (contentdiv.filters && contentdiv.filters[0]){
if (typeof contentdiv.filters[0].opacity=="number") //IE6+
contentdiv.filters[0].opacity=this.opacitysetting*100
else //IE 5.5
contentdiv.style.filter="alpha(opacity="+this.opacitysetting*100+")"
}
else if (typeof contentdiv.style.MozOpacity!="undefined" && this.opacitystring!=""){
contentdiv.style.MozOpacity=this.opacitysetting
}
else
this.opacitysetting=1
if (fadetype=="up")
this.opacitysetting+=0.1
if (fadetype=="up" && this.opacitysetting>=1)
clearInterval(this[timerid])
}

//*******************************************************************//

//FUNCTION FOR DISPLAYING NEW / UPDATE IMAGE FOR A LENGTH OF TIME
var disp = 7;          // days to display
var imgn = 'common/img/new.gif';  // image filename
var imgw = 25;         // image width
var imgh = 12;         // image height

// display "new" image for set period
// copyright Stephen Chapman, 25th February 2005
// you may copy this provided that you retain the copyright notice
function newCheck(y,m,d) {var after = new Date(); after.setDate(after.getDate() - disp); var nc = new Date(); nc.setFullYear(y); nc.setMonth(m-1); nc.setDate(d); if (nc.valueOf() >= after.valueOf()) {document.write('<img src="'+imgn+'" width="'+imgw+'" height="'+imgh+'"alt="new" align="absmiddle" border="0" \/>');}}

var show = 14;          // days to display
var imgsrc = 'common/img/update.gif';  // image filename
var imgwid = 36;         // image width
var imght = 14;         // image height

// display "update" image for set period
// copyright Stephen Chapman, 25th February 2005
// you may copy this provided that you retain the copyright notice
function updateCheck(y,m,d) {var after = new Date(); after.setDate(after.getDate() - show); var nc = new Date(); nc.setFullYear(y); nc.setMonth(m-1); nc.setDate(d); if (nc.valueOf() >= after.valueOf()) {document.write('<img src="'+imgsrc+'" width="'+imgwid+'" height="'+imght+'"alt="new" align="absmiddle" border="0" \/>');}}


//******************************************************************//
//FUNCTION FOR AUDIO PLAYER (SRC = SLHS\common\flash\audio)
var ap_instances = new Array();

function ap_stopAll(playerID) {
	for(var i = 0;i<ap_instances.length;i++) {
		try {
			if(ap_instances[i] != playerID) document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1);
			else document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0);
		} catch( errorObject ) {
			// stop any errors
		}
	}
}

function ap_registerPlayers() {
	var objectID;
	var objectTags = document.getElementsByTagName("object");
	for(var i=0;i<objectTags.length;i++) {
		objectID = objectTags[i].id;
		if(objectID.indexOf("audioplayer") == 0) {
			ap_instances[i] = objectID.substring(11, objectID.length);
		}
	}
}

var ap_clearID = setInterval( ap_registerPlayers, 100 );
//*******************************************************************//
//FUNCTION SELECT FROM DROP DOWN MENU -- BUDGET DATA
function selectIt(URL)
{
var newWindow = window.open(URL)	
}

//**************************************************************************//

window.onload=function() {
	
	startList();
	loadSlides();
	
}


