/*
    var vroster;
    var jvroster;
    var croster;
    var droster;
*/
    var curtable;
    
    //Init function call for each page
    function init(currentPage, depth)
    {
        createHeader(currentPage); //header.js
        createMenu(currentPage, depth);  //navmenu.js
        
        switch (currentPage)
        {
            case "Rosters":
                rosterStart('varsityroster');
            break;
            
            case "Summer":
                summerStart('bschedule');
            break;
            
            case "Schedule":
                springSchedStart('Varsity');
            break;
            
            case "Home":
                indexStart('lf-top', 'rt-top');
            break;
        }
    }
    
    
    function rosterStart(defaultteam)
    {
        def_team = document.getElementById(defaultteam);
        
        def_team.className='team on';
        
        curtable = def_team;
    }
    
        
    function summerStart(defaultteam)
    {
        getSchedule("2011", "Summer", "B","bschedule");
        getSchedule("2011", "Summer", "C","cschedule");
        getSchedule("2011", "Summer", "D","dschedule");
        
        def_team = document.getElementById(defaultteam);
        
        def_team.className='team on';
        
        curtable = def_team;
    }
   
    function springSchedStart(defaultteam)
    {
        getSchedule("2012", "Spring", "Varsity","Varsity");
        getSchedule("2012", "Spring", "JV","JV");
        getSchedule("2012", "Spring", "C","C");

        
        def_team = document.getElementById(defaultteam);
        
        def_team.className='team on';
        
        curtable = def_team;
    }

    
    function switchTab(strNewTab)
    {
        newtab = document.getElementById(strNewTab);
        
        curtable.className='team off';
        newtab.className='team on';
        
        curtable = newtab;
    }
    
    function indexStart(quick_sched,quick_result)
    {
        getGames("Varsity","varsity-sched","now",2,"Varsity",document.getElementById(quick_sched));
        getGames("JV","jv-sched","now",2,"JV",document.getElementById(quick_sched));
        getGames("C","cteam-sched","now",2,"C Team",document.getElementById(quick_sched));
        
        getResults("Varsity","varsity-results",2,"Varsity",document.getElementById(quick_result));
        getResults("JV","jv-results",2,"JV",document.getElementById(quick_result));
        getResults("C","cteam-results",2,"C Team",document.getElementById(quick_result));
        
    
        /* Still too slow...remove for now 
        loadImageStart(); */
    }
    
    function loadImageStart()
    {
      // This is too slow.  Not sure if it is the loop of all divs or the php script 
        var i;
        var allDivs;
        
        if (!document.getElementsByTagName) 
        {
            return;
        }

        /* Find all of the dynamic image divs and call the 
           getImages function */
        allDivs = document.getElementsByTagName('div');
        
        for (i = 0; i < allDivs.length; i++)
        {
            if (allDivs[i].className == "dynamic-photos")
            {
                //allDivs[i].innerHTML = "type: " + allDivs[i].getAttribute("type") + "</br>album: " + allDivs[i].getAttribute("album");
              getImages(allDivs[i], allDivs[i].getAttribute("album"), allDivs[i].getAttribute("type"), allDivs[i].getAttribute("num"),allDivs[i].getAttribute("imgwidth"),allDivs[i].getAttribute("title"), allDivs[i].getAttribute("subtitle"), allDivs[i].getAttribute("customtitle"), allDivs[i].getAttribute("customsubtitle"));
            }
            if (allDivs[i].className == "dynamic-videos")
            {
                //allDivs[i].innerHTML = "type: " + allDivs[i].getAttribute("type") + "</br>album: " + allDivs[i].getAttribute("album");
              getImages(allDivs[i], allDivs[i].getAttribute("album"), allDivs[i].getAttribute("type"), allDivs[i].getAttribute("num"),allDivs[i].getAttribute("imgwidth"),allDivs[i].getAttribute("title"), allDivs[i].getAttribute("subtitle"), allDivs[i].getAttribute("customtitle"), allDivs[i].getAttribute("customsubtitle"));
            }
         }
    }
    
    
    function getImages(objDiv, album, type, num, width, title, subtitle, customtitle, customsubtitle )
    {
        if (objDiv != null)
        {
            xmlhttp=new XMLHttpRequest();
        
            var strUrl = "getimages.php?";
            if (album)
            {
                strUrl = strUrl + "album=" + album;
            }
            if (num)
            {
                strUrl = strUrl + "&num=" + num;
            }
            if (type)
            {
                strUrl = strUrl + "&type=" + type;
            }
            if (width)
            {
                strUrl = strUrl + "&width=" + width;
            }
            if (title)
            {
                strUrl = strUrl + "&title=" + title;
            }
            if (subtitle)
            {
                strUrl = strUrl + "&subtitle=" + subtitle;
            }
            if (customtitle)
            {
                strUrl = strUrl + "&customtitle=" + customtitle;
            }
            if (customsubtitle)
            {
                strUrl = strUrl + "&customsubtitle=" + customsubtitle;
            }
       
            xmlhttp.open("GET",strUrl,false);
            xmlhttp.send();
        
            objDiv.innerHTML=xmlhttp.responseText;
        
        }
    }
    
    function getSchedule(year, season, team, divid)
    {
        var strUrl = "resources/scripts/getsched.php";
        var brow = true;
        var i;
        var schTable;
        var schDiv;
        
        if (year != null)
        {
            strUrl += "?year=" + year;
        }
        
        if (season != null)
        {
            strUrl += "&season=" + season;
        }
        
        if (team != null)
        {
            strUrl += "&team=" + team;
        }
        
        xmlhttp=new XMLHttpRequest();
        
        xmlhttp.open("GET",strUrl,false);
        xmlhttp.send();
        
        //xmlhttp.responseText;
        
        var sched = json_parse(xmlhttp.responseText,scheduleJsonReviver);
                
        schTable = "<table class='roster' border=0 cellpadding=2 cellspacing=0>\n";
        schTable += "<tr class=" + divid + "_headings>\n";
        schTable += "<td class=day>DAY</td>\n";
        schTable += "<td class=date>DATE</td>\n";
        schTable += "<td class=opponent>OPPONENT</td>\n";
        schTable += "<td class=site>LOCATION </td>\n";
        schTable += "<td class=time>TIME</td>\n";
        schTable += "<td class=schedscore>SCORE</td>\n";
        schTable += "<td class=details>DETAILS</td>\n";
        schTable += "<td class=league>LEAGUE</td>\n";
        schTable += "</tr>\n";
        
        for (i = 0; i < sched.length; i++)
        {
            if (brow)
            {
                schTable += "<tr class=row>\n";
                brow = false;
            }
            else
            {
                schTable += "<tr class=otherrow>\n";
                brow = true;
            }
            schTable += "<td class=day>" + sched[i].Day + "</td>\n";
            schTable += "<td class=date>" + sched[i].Date + "</td>\n";
            schTable += "<td class=opponent>" + sched[i].Opponent + "</td>\n";
            schTable += "<td class=site>" + sched[i].Location + "</td>\n";
            schTable += "<td class=time>" + sched[i].Time + "</td>\n";
            schTable += "<td class=schedscore>" + checkNA(sched[i].Score) + "</td>\n";
            schTable += "<td class=details>\n";
            if (sched[i].Summary != "na")
            {
                schTable += sched[i].Summary + "\n";
            }
            if (sched[i].Extras != "na")
            {
                schTable += "</br>" + sched[i].Extras + "\n";
            }
            schTable += "</td>";

            schTable += "<td class=league>" + sched[i].League + "</td>\n";
            schTable += "</td>\n";
            schTable += "</tr>\n";
        }
        schTable += "</table>\n";
        schTable += "</br></br></br>\n";
        schDiv = document.createElement("div");
        document.body.appendChild(schDiv);    
        schDiv.setAttribute("id",divid);
        schDiv.className = "team off";
        schDiv.innerHTML = schTable;

    }
    
    /* 
     * getGames - gets a subset of scheduled games from schFile, starting at start
     *            divid is the id of the div to put the html result
     */
    function getGames(schFile, divid, start, number, heading, parent)
    {
        //var strUrl = "getsched.php";
        var strUrl = "resources/scripts/getsched.php";
        var brow = true;
        var i;
        var schHTML;
        var schDiv;
        
        if (schFile != null)
        {
            strUrl = strUrl + "?team=" + schFile + "&start=" + start + "&num=" + number;
        }
        
        xmlhttp=new XMLHttpRequest();
        
        xmlhttp.open("GET",strUrl,false);
        xmlhttp.send();
                
        var sched = json_parse(xmlhttp.responseText,scheduleJsonReviver);
                         
        schHTML = "<div class='heading'>\n";
        schHTML += heading + "\n";
        schHTML += "</div>\n";   
                 
        for (i = 0; i < sched.length; i++)
        {
            schHTML += "<div class='game-schedule'>\n";
            schHTML += sched[i].Day + " " + sched[i].Date + " " + sched[i].Time + "</br>vs " + sched[i].Opponent + "</br>\n";
            schHTML += sched[i].Location + "\n</div>\n";
        }

        schDiv = document.createElement("div");
        parent.appendChild(schDiv);    
        schDiv.setAttribute("id",divid);
        schDiv.className = "team-section";
        schDiv.innerHTML = schHTML;
    }
    
    function getResults(schFile, divid, number, heading, parent)
    {
        //var strUrl = "getresults.php";
        var strUrl = "resources/scripts/getresults.php";
        var brow = true;
        var i;
        var schHTML;
        var schDiv;
        
        if (schFile != null)
        {
            strUrl = strUrl + "?team=" + schFile + "&num=" + number;
        }
        
        xmlhttp=new XMLHttpRequest();
        
        //xmlhttp.open("GET",strUrl,false);
        //xmlhttp.send();
                
        var sched = json_parse(xmlhttp.responseText,scheduleJsonReviver);
                         
        schHTML = "<div class='heading'>\n";
        schHTML += heading + " " + getRecord(schFile) + "\n";
        schHTML += "</div>\n";   
                 
        for (i = 0; i < sched.length; i++)
        {
            schHTML += "<div class='game-results'>\n";
            schHTML += sched[i].Date + "</br>\n";
            schHTML += "<div class='green'>" +  "<center>" + sched[i].Score + "</center></div>\n";
            if (sched[i].Summary != "na")
            {
                schHTML += "<div class='small'>" + sched[i].Summary + "</div>\n";
            }
            if (sched[i].Extras != "na")
            {
                schHTML += "<div class='small'>" + sched[i].Extras + "</div>\n";
            }
            schHTML += "</div>\n";
        }

        schDiv = document.createElement("div");
        parent.appendChild(schDiv);    
        schDiv.setAttribute("id",divid);
        schDiv.className = "team-section";
        schDiv.innerHTML = schHTML;
    
    }
    
    
    function getRecord(schFile)
    {
        //var strUrl = "getsched.php";
        var strUrl = "resources/scripts/getresults.php";
        var i;
        var wins = 0, losses = 0;
        var strRet;
        var schHTML;
        var schDiv;
        
        if (schFile != null)
        {
            strUrl = strUrl + "?team=" + schFile;
        }
        
        xmlhttp=new XMLHttpRequest();
        
        xmlhttp.open("GET",strUrl,false);
        xmlhttp.send();
                
        var sched = json_parse(xmlhttp.responseText,scheduleJsonReviver);
        
        for (i = 0; i < sched.length; i++)
        {
            if (sched[i].Score.substring(0,1) == 'W')
            {
                wins++;
            }
            else if (sched[i].Score.substring(0,1) == 'L')
            {
                losses++;
            }
        }

        return ( "(" + wins + "-" + losses + ")");
    }
    
    function checkNA(strData)
    {
       if (strData == "na")
       {
            return (" ");
       }
       else
       {
            return (strData);
        }
    }
    
    /* The reviver function will be called by json_parse for each key:value pair in the json input
       the reviver can replace the value if needed.
       
       Current feature:  replaces location with link to a map of the location
       
    */
    function scheduleJsonReviver(key, value)
    {
        var new_value = value;
        switch (key)
        {
            case "Location":
                switch (value)
                {
                    case "Niwot":
                        new_value="<a target='_blank' href='niwotfield.html'>Niwot</a>";
                    break;
                    
                    case "Boulder":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Scott+Carpenter+Park,+30th+Street,+Boulder,+CO&aq=3&sll=37.0625,-95.677068&sspn=30.599615,47.285156&ie=UTF8&hq=Scott+Carpenter+Park,+30th+Street,&hnear=Boulder,+Colorado&ll=40.012858,-105.2531&spn=0.014429,0.039439&z=15'>Boulder</a>";
                    break;
                    
                    case "Centaurus":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Centaurus+High+School,+10300+East+South+Boulder+Road,+Lafayette,+CO+80026-2853&hl=en&ll=39.985127,-105.107474&spn=0.021768,0.032701&sll=33.545974,-111.945115&sspn=0.047356,0.065403&oq=Centaurus+h&vpsrc=6&t=v&hq=Centaurus+High+School,+10300+East&hnear=S+Boulder+Rd,+Lafayette,+Boulder,+Colorado+80026&z=15'>Centaurus</a>";
                    break;
                    
                    case "Westminster":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=11800+Lowell+Blvd.+Westminster,+co&aq=&sll=37.0625,-95.677068&sspn=34.396866,61.083984&ie=UTF8&hq=&hnear=11800+Lowell+Blvd,+Westminster,+Colorado+80031&ll=39.912501,-105.040369&spn=0.032522,0.092354&z=14'>Westminster</a>";
                    break;
                    
                    case "Bryan":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=4700+Giles+Rd,+Omaha,+NE+&aq=t&sll=40.014701,-105.256061&sspn=0.009992,0.01472&ie=UTF8&hq=&hnear=4700+Giles+Rd,+Omaha,+Nebraska+68157&ll=41.176231,-95.984116&spn=0.014762,0.029826&z=15'>Bryan High School, Omaha, NE</a>";
                    break;
                    
                    case "Brighton":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=270+South+8th+Avenue,+Brighton,+CO&aq=&sll=39.981658,-104.813604&sspn=0.019993,0.02944&gl=us&ie=UTF8&hq=&hnear=270+S+8th+Ave,+Brighton,+Colorado+80601&ll=39.980589,-104.810386&spn=0.009997,0.01472&z=16'>Brighton High School</a>";
                    break;
                    
                    case "Weld Central":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=4715+County+Road+59,+Keenesburg,+CO&aq=&sll=40.071077,-104.508569&sspn=0.009984,0.01472&gl=us&ie=UTF8&hq=&hnear=4715+County+Road+59,+Keenesburg,+Colorado+80643&ll=40.049431,-104.500237&spn=0.159788,0.235519&z=12'>Weld Central High School</a>";
                    break;
                    
                    case "Rocky Mtn":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1300+West+Swallow+Road+Fort+Collins,+CO+80526-2412&aq=&sll=40.48456,-105.287476&sspn=2.435646,3.768311&gl=us&ie=UTF8&hq=&hnear=1300+W+Swallow+Rd,+Fort+Collins,+Colorado+80526&ll=40.547967,-105.099936&spn=0.009913,0.01472&z=16'>Rocky Mountain High School</a>";
                    break;
                    
                    case "Butch Butler":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2227+23rd+Ave,+Greeley,+Colorado&aq=&sll=37.0625,-95.677068&sspn=36.094886,61.875&ie=UTF8&hq=&hnear=2227+23rd+Ave,+Greeley,+Colorado+80631&ll=40.40241,-104.716262&spn=0.00212,0.00582&t=h&z=18'>Butch Butler Field</a>";
                    break;
                    
                    case "Fort Lupton":
                    case "Ft. Lupton":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=530+Reynolds+Street+Fort+Lupton,+CO&aq=&sll=40.066512,-104.859009&sspn=0.612714,0.942078&gl=us&ie=UTF8&hq=&hnear=530+Reynolds+St,+Fort+Lupton,+Colorado+80621&ll=40.074722,-104.812231&spn=0.009983,0.01472&z=16'>Fort Lupton</a>";
                    break;
                    
                    case "University":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=6525+W+18th+St,+Greeley,+CO&aq=&sll=37.0625,-95.677068&sspn=42.174768,60.292969&ie=UTF8&hq=&hnear=6525+W+18th+St,+Greeley,+Colorado+80634&z=16'>University High School</a>";
                    break;
                    
                    case "Eaton":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=114+Park+Avenue,+Eaton,+CO&aq=&sll=40.526809,-104.71806&sspn=0.009916,0.01472&ie=UTF8&hq=&hnear=114+Park+Ave,+Eaton,+Colorado+80615&z=16'>Eaton High School</a>";
                    break;
                    
                    case "Cowboy Field":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=307+Willett+Drive+Laramie,+WY&aq=&sll=39.91288,-105.035423&sspn=0.003761,0.011544&ie=UTF8&hq=&hnear=Willett+Dr,+Laramie,+Albany,+Wyoming&ll=41.314523,-105.561275&spn=0.003683,0.007457&t=h&z=17'>Cowboy Field</a>";
                    break;
                    
                    case "Coors Field":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=coors+field&ll=39.755521,-104.994171&spn=0.011151,0.015385&fb=1&gl=us&hq=coors+field&hnear=coors+field&cid=0,0,1665420542562589150&t=v&z=16&iwloc=A'>Coors Field</a>";
                    break;
                    
                    case "Fairview":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Fairview+High+School,+Greenbriar+Boulevard,+Boulder,+CO&aq=&sll=39.972713,-105.24411&sspn=0.007219,0.01972&ie=UTF8&hq=Fairview+High+School,&hnear=Greenbriar+Blvd,+Boulder,+Colorado&ll=39.972615,-105.24411&spn=0.007219,0.01972&z=16'>Fairview</a>";
                    break;
                    
                    case "Littleton":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=99+East+Littleton+Boulevard,+Littleton,+CO&aq=&sll=39.567059,-104.975739&sspn=0.116186,0.184708&ie=UTF8&hq=&hnear=99+E+Littleton+Blvd,+Littleton,+Colorado+80121&ll=39.613259,-104.98621&spn=0.014514,0.039439&z=15'>Littleton High School</a>";
                    break;
                    
                    case "Faith Christian":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=4890+Carr+Street,+Arvada,+CO&aq=&sll=39.82805,-105.068436&sspn=0.218838,0.369415&ie=UTF8&hq=&hnear=4890+Carr+St,+Arvada,+Colorado+80002&ll=39.7875,-105.092297&spn=0.014477,0.039439&z=15'>Faith Christian</a>";
                    break;
                    
                    case "Forbes":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2200+8th+St,+Greeley,+Colorado&aq=&sll=39.871591,-105.382584&sspn=0.925372,1.477661&ie=UTF8&hq=&hnear=2200+8th+St,+Greeley,+Colorado+80631&ll=40.424082,-104.715457&spn=0.014342,0.039439&z=15'>Forbes</a>";
                    break;
                    
                    case "Fort Morgan":
                        new_value="<a target='_blank' href='http://www.google.com/mapmaker?hl=en&gw=10&ll=40.241635,-103.810287&spn=0.015953,0.036306&z=15'>Fort Morgan</a>";
                    break;
                    
                    case "Legacy":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Legacy+High+School,+West+136th+Avenue,+Broomfield,+Colorado&aq=0&sll=40.424082,-104.715457&sspn=0.014342,0.039439&ie=UTF8&hq=Legacy+High+School,&hnear=W+136th+Ave,+Broomfield,+Colorado&ll=39.944062,-105.018096&spn=0.014444,0.039439&z=15'>Legacy High School</a>";
                    break;
                    
                    case "Holy Family":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Holy+Family+High+School,+West+144th+Avenue,+Broomfield,+CO&aq=0&sll=39.944062,-105.018096&sspn=0.014444,0.039439&ie=UTF8&hq=Holy+Family+High+School,+West+144th+Avenue,&hnear=Broomfield,+Colorado&ll=39.958965,-105.075302&spn=0.115526,0.315514&z=12'>Holy Family</a>";
                    break;
                    
                    case "Heritage":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Heritage+High+School&aq=&sll=39.958965,-105.075302&sspn=0.115526,0.315514&ie=UTF8&hq=Heritage+High+School&hnear=&ll=39.588625,-104.992561&spn=0.058075,0.157757&z=13'>Heritage High School</a>";
                    break;
                    
                    case "Elizabeth":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Elizabeth+High+School&aq=&sll=39.588625,-104.992561&sspn=0.058075,0.157757&ie=UTF8&hq=Elizabeth+High+School&hnear=&ll=39.384202,-104.670868&spn=0.116492,0.315514&z=12'>Elizabeth High School</a>";
                    break;
                    
                    case "Monarch":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Monarch+High+School,+329+Campus+Drive,+Louisville,+CO+80027-9746&aq=0&sll=39.384202,-104.670868&sspn=0.116492,0.315514&ie=UTF8&hq=Monarch+High+School,+329+Campus+Drive,&hnear=Louisville,+Boulder,+Colorado&ll=39.951991,-105.154781&spn=0.028885,0.078878&z=14'>Monarch High School</a>";
                    break;
                                        
                    case "Sterling":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Sterling+High+School,+Sterling,+CO&aq=0&sll=39.982184,-104.813776&sspn=0.014436,0.039439&ie=UTF8&hq=Sterling+High+School,&hnear=Sterling,+Logan,+Colorado&ll=40.633301,-103.214793&spn=0.014297,0.039439&t=h&z=15'>Sterling</a>";
                    break;
                    
                    case "Mountain Range":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Mountain+Range+High+School,+Huron+Street,+Denver,+CO&aq=0&sll=39.766325,-104.089966&sspn=1.85354,2.955322&ie=UTF8&hq=Mountain+Range+High+School,&hnear=Huron+St,+Denver,+Adams,+Colorado&ll=39.921849,-104.995995&spn=0.014449,0.039439&z=15'>Mountain Range High School</a>";
                    break;
                    
                    case "Mead":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=mead+high+school,+mead,+co&aq=&sll=39.921849,-104.995995&sspn=0.014449,0.039439&ie=UTF8&hq=mead+high+school,+mead,+co&ll=40.184873,-104.99754&spn=0.014393,0.039439&z=15'>Mead High School</a>";
                    break;
                    
                    case "Arapahoe":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Arapahoe+high+school&aq=&sll=40.184873,-104.99754&sspn=0.014393,0.039439&ie=UTF8&hq=Arapahoe+high+school&hnear=&ll=39.580819,-104.961705&spn=0.01452,0.039439&z=15'>Arapahoe High School</a>";
                    break;
                    
                    case "Doherty":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?f=q&source=s_q&hl=en&q=Doherty+High+School,+Colorado+Springs,+El+Paso,+Colorado+80917&aq=&sll=39.580819,-104.961705&sspn=0.01452,0.039439&ie=UTF8&geocode=FdOAUQIdSbzB-Q&split=0&hq=&hnear=Doherty+High+School,+Colorado+Springs,+El+Paso,+Colorado+80917&ll=38.895542,-104.750991&spn=0.007331,0.01972&t=h&z=16'>Doherty</a>";
                    break;
                    
                    case "Mountain View":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Mountain+View+High+School,+3500+Mountain+Lion+Drive,+Loveland,+CO+80537-8929&hl=en&ll=40.404599,-105.021209&spn=0.043268,0.065403&sll=39.985127,-105.107474&sspn=0.021768,0.032701&oq=Mountain+View+High+school,+CO+&vpsrc=6&t=v&hq=Mountain+View+High+School,+3500+Mountain+Lion+Drive,+Loveland,+CO+80537-8929&z=14'>Mountain View</a>";
                    break;
                    
                    case "Longmont":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Longmont+High+School,+1040+Sunset+Street,+Longmont,+CO+80501-4118&hl=en&sll=40.404599,-105.021209&sspn=0.043268,0.065403&oq=Longmont+High&vpsrc=0&t=v&hq=Longmont+High+School,+1040+Sunset+Street,+Longmont,+CO+80501-4118&z=15'>Longmont</a>";
                    break;
                    
                    case "Chandler":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Chandler+High+School,+Chandler,+Arizona&hl=en&ll=33.308874,-111.842131&spn=0.047486,0.065403&sll=40.176568,-105.121292&sspn=0.021707,0.032701&oq=Chandler+High+School&vpsrc=6&t=v&hq=Chandler+High+School,+Chandler,+Arizona&z=14'>Chandler</a>";
                    break;
                    
                    case "Willow Canyon":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Willow+Canyon+High+School,+West+Lundberg+Street,+Surprise,+Arizona&hl=en&ll=33.635744,-112.44422&spn=0.047307,0.065403&sll=33.308874,-111.842131&sspn=0.047486,0.065403&oq=Willow+Canyon+Arizona&vpsrc=6&t=v&hq=Willow+Canyon+High+School,+West+Lundberg+Street,+Surprise,+Arizona&z=14'>Willow Canyon</a>";
                    break;
                    
                    case "Higley":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Higley+High+School,+East+Pecos+Road,+Gilbert,+Arizona&hl=en&ll=33.294915,-111.700176&spn=0.047493,0.065403&sll=33.634909,-112.444279&sspn=0.011827,0.016351&oq=Higley+High+School,+Arizona&vpsrc=6&t=v&hq=Higley+High+School,+East+Pecos+Road,+Gilbert,+Arizona&z=14'>Higley</a>";
                    break;
                    
                    case "Valley Vista":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Valley+Vista+High+School,+North+Parkview+Place,+Surprise,+Arizona&hl=en&sll=33.294915,-111.700176&sspn=0.047493,0.065403&oq=Valley+Vista+High+School+Arizona&vpsrc=0&t=v&hq=Valley+Vista+High+School,+North+Parkview+Place,+Surprise,+Arizona&z=15'>Valley Vista</a>";
                    break;
                    
                    case "Broomfield":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Broomfield+High+School,+Eagle+Way,+Broomfield,+CO&hl=en&ll=39.929872,-105.075374&spn=0.043571,0.065403&sll=33.625334,-112.384898&sspn=0.023656,0.032701&oq=Broomfield+High+School&vpsrc=6&t=v&hq=Broomfield+High+School,+Eagle+Way,+Broomfield,+CO&z=14'>Broomfield</a>";
                    break;
                    
                    case "Silver Creek":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Silver+Creek+High+School,+Nelson+Road,+Longmont,+CO&hl=en&ll=40.151124,-105.167327&spn=0.021715,0.032701&sll=39.929872,-105.075374&sspn=0.043571,0.065403&oq=Silver+Creek+high+school,+CO&vpsrc=6&t=v&hq=Silver+Creek+High+School,+Nelson+Road,+Longmont,+CO&z=15'>Silver Creek</a>";
                    break;
                    
                    case "Thompson Valley":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Thompson+Valley+High+School,+1669+Eagle+Drive,+Loveland,+Colorado+80537&hl=en&ll=40.387483,-105.102759&spn=0.043279,0.065403&sll=40.387483,-105.102759&sspn=0.021639,0.032701&oq=Thompson+Valley+High+School,&vpsrc=6&t=v&hq=Thompson+Valley+High+School,+1669+Eagle+Drive,+Loveland,+Colorado+80537&z=14'>Thompson Valley</a>";
                    break;
                    
                    case "Greeley Central":
                        new_value="<a target='_blank' href='http://maps.google.com/maps?q=Greeley+Central+High+School,+1515+14th+Avenue,+Greeley,+CO+80631-4737&hl=en&sll=40.387483,-105.102759&sspn=0.043279,0.065403&oq=Greeley+Central+High+School,+&vpsrc=6&t=v&hq=Greeley+Central+High+School,+1515+14th+Avenue,+Greeley,+CO+80631-4737&z=15'>Greeley Central</a>";
                    break;
                    
                    
                }
            
            break;
        }
        
        return new_value;
    }

