﻿// JScript File

function swap(id){
    document.getElementById('directors').src = "images/directors.jpg";
    document.getElementById('students').src = "images/students.jpg";
    document.getElementById('parents').src = "images/parents.jpg";
    document.getElementById('volunteers').src = "images/volunteers.jpg";
    document.getElementById('fans').src = "images/fans.jpg";
    document.getElementById('advocates').src = "images/advocates.jpg";
    document.getElementById(id).src = "images/" + id + "-on.jpg";
}

function subswap(id){
document.getElementById('directors').src = "images/subdirectors.jpg";
    document.getElementById('students').src = "images/substudents.jpg";
    document.getElementById('parents').src = "images/subparents.jpg";
    document.getElementById('volunteers').src = "images/subvolunteers.jpg";
    document.getElementById('fans').src = "images/subfans.jpg";
    document.getElementById('advocates').src = "images/advocates.jpg";
    document.getElementById(id).src = "images/sub" + id + "-on.jpg";
}

function swapButtonsImage(id, path){ 
        document.getElementById(id).src = path + "/" + id + "Down.png";              
}

function swapButtonImagesBack(id, path){
        document.getElementById(id).src = path + "/" + id + ".png";                      
}

function swapSponsors(id, path){
       document.getElementById(id).src = path + "/sponsors/" + id + "White.png";
}

function swapSponsorsBack(id, path){
       document.getElementById(id).src = path + "/sponsors/" + id + ".png";
}

function swapSponsorsPop(id, path){
       document.getElementById(id).src = path + "/sponsors/" + id.substring(0,id.indexOf('Pop')) + "White.png";
}

function swapSponsorsBackPop(id, path){
       document.getElementById(id).src = path + "/sponsors/" + id.substring(0,id.indexOf('Pop')) + ".png";
}

function search(){
var text = "http://www.musicforall.org/searchresults.aspx?cx=006606626834994227517%3Acpofgh8gv_o&cof=FORID%3A11&q=";
var t1 = document.getElementById('ctl00_ContentPlaceHolder1_TextBox1');
var t2 = document.getElementById('ctl00_ctl00_ContentPlaceHolder1_TextBox1');
if(t1){                          
    text += t1.value;
}
else
{
    text += t2.value;
}
text += "&sa=Search#435";   
    self.location.href = text;
}

