/***********************
* Adobe Edge Composition Actions
*
* Edit this file with caution, being careful to preserve 
* function signatures and comments starting with 'Edge' to maintain the 
* ability to interact with these actions from within Adobe Edge
*
***********************/
(function($, Edge, compId){
var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

   //Edge symbol: 'stage'
   (function(symbolName) {
      
      
      Symbol.bindElementAction(compId, symbolName, "document", "compositionReady", function(sym, e) {
//var stages=[811243,811244,811245,811246,811247,811248,811249,811250,811251,811253,811254,811255,811256,811257,811258,811260,811261,811262,811263,811264,811265];
var stages=[816633,816634,816635,816636,816637,816638,816639,816640,816641,816643,816644,816645,816646,816647,816648,816650,816651,816652,816653,816654,816655];
sym.$("results").css ({top:-610});
var todayDate = new Date();
var startDate= Date.UTC(2013,05,29,06,00,01);
if (todayDate<startDate){
sym.$("stageMc").css({left:455});
}
var todayStage=0;
         var headline;
         var headlinetxt = sym.getSymbol("styleMc").$("headlineTxt").css("pointer-events","none");
         var source;
         var sourcetxt = sym.getSymbol("baseBar").$("sourceTxt").css("pointer-events","none");
         var menuIcon0;
         var menuIcon0txt = sym.getSymbol("styleMc").getSymbol("menuBtn0").$("txt").css("pointer-events","none");
         var menuIcon1;
         var menuIcon1txt = sym.getSymbol("styleMc").getSymbol("menuBtn1").$("txt").css("pointer-events","none");
         var menuIcon2;
         var menuIcon2txt = sym.getSymbol("styleMc").getSymbol("menuBtn2").$("txt").css("pointer-events","none");
         var menuIcon3;
         var menuIcon3txt = sym.getSymbol("styleMc").getSymbol("menuBtn3").$("txt").css("pointer-events","none");
         var menuTxt0;
         var menuTxt0txt = sym.getSymbol("styleMc").$("menuTxt0").css("pointer-events","none");
         var menuTxt1;
         var menuTxt1txt = sym.getSymbol("styleMc").$("menuTxt1").css("pointer-events","none");
         var menuTxt2;
         var menuTxt2txt = sym.getSymbol("styleMc").$("menuTxt2").css("pointer-events","none");
         var menuTxt3;
         var menuTxt3txt = sym.getSymbol("styleMc").$("menuTxt3").css("pointer-events","none");
         var nameShort0;
         var nameShort0txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams1Mc").$("nameShort0").css("pointer-events","none");
         var nameShort1;
         var nameShort1txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams1Mc").$("nameShort1").css("pointer-events","none");
         var nameShort2;
         var nameShort2txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams1Mc").$("nameShort2").css("pointer-events","none");
         var nameShort3;
         var nameShort3txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams1Mc").$("nameShort3").css("pointer-events","none");
         var nameShort4;
         var nameShort4txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams1Mc").$("nameShort4").css("pointer-events","none");
         var nameShort5;
         var nameShort5txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams2Mc").$("nameShort5").css("pointer-events","none");
         var nameShort6;
         var nameShort6txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams2Mc").$("nameShort6").css("pointer-events","none");
         var nameShort7;
         var nameShort7txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams2Mc").$("nameShort7").css("pointer-events","none");
         var nameShort8;
         var nameShort8txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams2Mc").$("nameShort8").css("pointer-events","none");
         var nameShort9;
         var nameShort9txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams2Mc").$("nameShort9").css("pointer-events","none");
         var nameShort10;
         var nameShort10txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams3Mc").$("nameShort10").css("pointer-events","none");
         var nameShort11;
         var nameShort11txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams3Mc").$("nameShort11").css("pointer-events","none");
         var nameShort12;
         var nameShort12txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams3Mc").$("nameShort12").css("pointer-events","none");
         var nameShort13;
         var nameShort13txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams3Mc").$("nameShort13").css("pointer-events","none");
         var nameShort14;
         var nameShort14txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams3Mc").$("nameShort14").css("pointer-events","none");
         var nameShort15;
         var nameShort15txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams4Mc").$("nameShort15").css("pointer-events","none");
         var nameShort16;
         var nameShort16txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams4Mc").$("nameShort16").css("pointer-events","none");
         var nameShort17;
         var nameShort17txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams4Mc").$("nameShort17").css("pointer-events","none");
         var nameShort18;
         var nameShort18txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams4Mc").$("nameShort18").css("pointer-events","none");
         var nameShort19;
         var nameShort19txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams4Mc").$("nameShort19").css("pointer-events","none");
         var nameShort20;
         var nameShort20txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams5Mc").$("nameShort20").css("pointer-events","none");
         var nameShort21;
         var nameShort21txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams5Mc").$("nameShort21").css("pointer-events","none");
         var nameShort22;
         var nameShort22txt = sym.getSymbol("teamsMc").getSymbol("teamsSlider").getSymbol("teamsSlideClip").getSymbol("teams5Mc").$("nameShort22").css("pointer-events","none");
         var name;
         var nametxt = sym.getSymbol("teamsMc").$("name").css("pointer-events","none");
         var country;
         var countrytxt = sym.getSymbol("teamsMc").$("country").css("pointer-events","none");
         var riders;
         var riderstxt = sym.getSymbol("teamsMc").$("riders").css("pointer-events","none");

         var txt1;
         var txt1txt = sym.getSymbol("routeMc").$("txt1").css("pointer-events","none");
         var txt2;
         var txt2txt = sym.getSymbol("routeMc").$("txt2").css("pointer-events","none");
         var txt3;
         var txt3txt = sym.$("txt3").css("pointer-events","none");
         var txt4;
         var txt4txt = sym.$("txt4").css("pointer-events","none");
         var txt5;
         var txt5txt = sym.$("txt5").css("pointer-events","none");
         var txt6;
         var txt6txt = sym.getSymbol("teamsMc").$("txt6").css("pointer-events","none");
			var txt7;
         var txt7txt = sym.$("txt7").css("pointer-events","none");
         var txt8;
         var txt8txt = sym.$("txt8").css("pointer-events","none");
         var txt9;
         var txt9txt = sym.$("txt9").css("pointer-events","none");
         var txt10;
         var txt10txt = sym.$("txt10").css("pointer-events","none");
         var txt11;
         var txt11txt = sym.$("txt11").css("pointer-events","none");
         var txt12;
         var txt12txt = sym.$("txt12").css("pointer-events","none");
         var txt14;
         var txt14txt = sym.$("txt14").css("pointer-events","none");
			var txt15;
         var stagetxt0 = sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageTxt0").css("pointer-events","none");
         var stagetxt1 = sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageTxt1").css("pointer-events","none");        
         var stagetxt2 = sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageTxt2").css("pointer-events","none");
         var txt16;
         var classtxt= sym.getSymbol("results").getSymbol("classificationsBtn").$("phaseTxt").css("pointer-events","none");
			var txt17;
         var txt17txt = sym.getSymbol("results").$("txt17").css("pointer-events","none");
         var txt18;
         var txt18txt = sym.getSymbol("results").$("txt18").css("pointer-events","none");         
			var txt19;
			var classtxt0=sym.getSymbol("results").getSymbol("classBtn0").$("classTxt").css("pointer-events","none");
			var classtxt1=sym.getSymbol("results").getSymbol("classBtn1").$("classTxt").css("pointer-events","none");
			var classtxt2=sym.getSymbol("results").getSymbol("classBtn2").$("classTxt").css("pointer-events","none");
			var classtxt3=sym.getSymbol("results").getSymbol("classBtn3").$("classTxt").css("pointer-events","none");
			var classtxt4=sym.getSymbol("results").getSymbol("classBtn4").$("classTxt").css("pointer-events","none");
			var txt20;
			var txt21;
			var txt21txt = sym.$("txt21").css("pointer-events","none");
			var txt22;
			var txt22txt = sym.$("txt22").css("pointer-events","none");
			var txt23;
			var txt23txt = sym.$("txt23").css("pointer-events","none");
			var txt24;
			var txt24txt = sym.$("txt24").css("pointer-events","none");
			var txt25;
			var txt25txt = sym.$("txt25").css("pointer-events","none");
			var txt26;
			var txt26txt = sym.$("txt26").css("pointer-events","none");
			var txt27;
			var txt27txt = sym.$("txt27").css("pointer-events","none");
			var txt28;
			var txt28txt = sym.$("txt28").css("pointer-events","none");
			var txt29;
			var txt29txt = sym.$("txt29").css("pointer-events","none");
			var txt30;
			var txt30txt = sym.$("txt30").css("pointer-events","none");
			var txt31;
			var txt31txt = sym.$("txt31").css("pointer-events","none");
			var txt32;
			var txt32txt = sym.$("txt32").css("pointer-events","none");
			var txt33;
			var txt33txt = sym.$("txt33").css("pointer-events","none");  
			var txt34;
			var txt34txt = sym.$("txt34").css("pointer-events","none");  
			var txt35;
			var txt35txt = sym.$("txt35").css("pointer-events","none");  
			var stagetxt3 = sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageTxt3").css("pointer-events","none");
			var string0;
			var string1;
			var string2;
			var string3;
			var string4;
			var string5;
			var stagestring;
			var datestring;
			var tablestring;
			var resultstring0;
			var resultstring1;
			var resultstring2;

			var distance;
			var distancemap;
			var mediterranean;
//Stage array (includes map and profile captions)
			var profilekey;
			var mapkey;
			var keystring;

//end
//stage0
			var stage0_distance; //for array of xml entries
			var distancestage0;
			var stage0_route; //for array of xml entries
			var routestage0;

			var stage0key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage0key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc0").$("stage0_key"+i));
			}
			var stage0arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage0arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc0").$("stage0_txt"+i));
			}
			var stage0mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage0mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc0").$("map0_key"+i));
			}
			var stage0map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 7; i++) {
				stage0map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc0").$("map0_txt"+i));
			}
//END
//stage1
			var stage1_distance; //for array of xml entries
			var distancestage1;
			var stage1_route; //for array of xml entries
			var routestage1;

			var stage1key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage1key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc1").$("stage1_key"+i));
			}
			var stage1arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 15; i++) {
				stage1arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc1").$("stage1_txt"+i));
			}
			var stage1mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage1mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc1").$("map1_key"+i));
			}
			var stage1map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 9; i++) {
				stage1map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc1").$("map1_txt"+i));
			}
//END
//stage2
			var stage2_distance; //for array of xml entries
			var distancestage2;
			var stage2_route; //for array of xml entries
			var routestage2;

			var stage2key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage2key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc2").$("stage2_key"+i));
			}
			var stage2arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 16; i++) {
				stage2arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc2").$("stage2_txt"+i));
			}
			var stage2mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage2mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc2").$("map2_key"+i));
			}
			var stage2map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 9; i++) {
				stage2map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc2").$("map2_txt"+i));
			}
//END
//stage3
 			var stage3_distance; //for array of xml entries
			var distancestage3;
			var stage3_route; //for array of xml entries
			var routestage3;

			var stage3key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage3key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc3").$("stage3_key"+i));
			}
			var stage3arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 6; i++) {
				stage3arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc3").$("stage3_txt"+i));
			}
			var stage3mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage3mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc3").$("map3_key"+i));
			}
			var stage3map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 4; i++) {
				stage3map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc3").$("map3_txt"+i));
			}
//END		
//stage4
			var stage4_distance; //for array of xml entries
			var distancestage4;
			var stage4_route; //for array of xml entries
			var routestage4;

			var stage4key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage4key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc4").$("stage4_key"+i));
			}
			var stage4arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 16; i++) {
				stage4arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc4").$("stage4_txt"+i));
			}
			var stage4mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage4mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc4").$("map4_key"+i));
			}
			var stage4map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage4map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc4").$("map4_txt"+i));
			}
//END		
//stage5
			var stage5_distance; //for array of xml entries
			var distancestage5;
			var stage5_route; //for array of xml entries
			var routestage5;

			var stage5key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage5key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc5").$("stage5_key"+i));
			}
			var stage5arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage5arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc5").$("stage5_txt"+i));
			}
			var stage5mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage5mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc5").$("map5_key"+i));
			}
			var stage5map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 7; i++) {
				stage5map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc5").$("map5_txt"+i));
			}
//END		
//stage6
			var stage6_distance; //for array of xml entries
			var distancestage6;
			var stage6_route; //for array of xml entries
			var routestage6;

			var stage6key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage6key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc6").$("stage6_key"+i));
			}
			var stage6arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 16; i++) {
				stage6arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc6").$("stage6_txt"+i));
			}
			var stage6mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage6mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc6").$("map6_key"+i));
			}
			var stage6map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage6map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc6").$("map6_txt"+i));
			}
//END			
//stage7
			var stage7_distance; //for array of xml entries
			var distancestage7;
			var stage7_route; //for array of xml entries
			var routestage7;

			var stage7key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage7key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc7").$("stage7_key"+i));
			}
			var stage7arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 14; i++) {
				stage7arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc7").$("stage7_txt"+i));
			}
			var stage7mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage7mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc7").$("map7_key"+i));
			}
			var stage7map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 7; i++) {
				stage7map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc7").$("map7_txt"+i));
			}
//END				
//stage8
			var stage8_distance; //for array of xml entries
			var distancestage8;
			var stage8_route; //for array of xml entries
			var routestage8;

			var stage8key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage8key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc8").$("stage8_key"+i));
			}
			var stage8arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 17; i++) {
				stage8arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc8").$("stage8_txt"+i));
			}
			var stage8mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage8mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc8").$("map8_key"+i));
			}
			var stage8map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 11; i++) {
				stage8map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc8").$("map8_txt"+i));
			}
//END	
//stage9
			var stage9_distance; //for array of xml entries
			var distancestage9;
			var stage9_route; //for array of xml entries
			var routestage9;

			var stage9key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage9key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc9").$("stage9_key"+i));
			}
			var stage9arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage9arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc9").$("stage9_txt"+i));
			}
			var stage9mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage9mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc9").$("map9_key"+i));
			}
			var stage9map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 6; i++) {
				stage9map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc9").$("map9_txt"+i));
			}
//END
//stage10
			var stage10_distance; //for array of xml entries
			var distancestage10;
			var stage10_route; //for array of xml entries
			var routestage10;

			var stage10key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage10key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc10").$("stage10_key"+i));
			}
			var stage10arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage10arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc10").$("stage10_txt"+i));
			}
			var stage10mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage10mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc10").$("map10_key"+i));
			}
			var stage10map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 6; i++) {
				stage10map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc10").$("map10_txt"+i));
			}
//END
//stage11
			var stage11_distance; //for array of xml entries
			var distancestage11;
			var stage11_route; //for array of xml entries
			var routestage11;

			var stage11key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage11key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc11").$("stage11_key"+i));
			}
			var stage11arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 8; i++) {
				stage11arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc11").$("stage11_txt"+i));
			}
			var stage11mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage11mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc11").$("map11_key"+i));
			}
			var stage11map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 5; i++) {
				stage11map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc11").$("map11_txt"+i));
			}
//END	
//stage12
			var stage12_distance; //for array of xml entries
			var distancestage12;
			var stage12_route; //for array of xml entries
			var routestage12;

			var stage12key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage12key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc12").$("stage12_key"+i));
			}
			var stage12arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage12arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc12").$("stage12_txt"+i));
			}
			var stage12mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage12mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc12").$("map12_key"+i));
			}
			var stage12map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 6; i++) {
				stage12map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc12").$("map12_txt"+i));
			}
//END
//stage13
			var stage13_distance; //for array of xml entries
			var distancestage13;
			var stage13_route; //for array of xml entries
			var routestage13;

			var stage13key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage13key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc13").$("stage13_key"+i));
			}
			var stage13arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 22; i++) {
				stage13arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc13").$("stage13_txt"+i));
			}
			var stage13mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage13mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc13").$("map13_key"+i));
			}
			var stage13map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 12; i++) {
				stage13map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc13").$("map13_txt"+i));
			}
//END	
//stage14
			var stage14_distance; //for array of xml entries
			var distancestage14;
			var stage14_route; //for array of xml entries
			var routestage14;

			var stage14key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage14key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc14").$("stage14_key"+i));
			}
			var stage14arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 16; i++) {
				stage14arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc14").$("stage14_txt"+i));
			}
			var stage14mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage14mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc14").$("map14_key"+i));
			}
			var stage14map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 9; i++) {
				stage14map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc14").$("map14_txt"+i));
			}
//END	
//stage15
			var stage15_distance; //for array of xml entries
			var distancestage15;
			var stage15_route; //for array of xml entries
			var routestage15;

			var stage15key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage15key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc15").$("stage15_key"+i));
			}
			var stage15arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 14; i++) {
				stage15arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc15").$("stage15_txt"+i));
			}
			var stage15mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage15mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc15").$("map15_key"+i));
			}
			var stage15map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 8; i++) {
				stage15map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc15").$("map15_txt"+i));
			}
//END	
//stage16
			var stage16_distance; //for array of xml entries
			var distancestage16;
			var stage16_route; //for array of xml entries
			var routestage16;

			var stage16key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage16key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc16").$("stage16_key"+i));
			}
			var stage16arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 8; i++) {
				stage16arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc16").$("stage16_txt"+i));
			}
			var stage16mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 2; i++) {
				stage16mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc16").$("map16_key"+i));
			}
			var stage16map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 5; i++) {
				stage16map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc16").$("map16_txt"+i));
			}
//END
//stage17
			var stage17_distance; //for array of xml entries
			var distancestage17;
			var stage17_route; //for array of xml entries
			var routestage17;

			var stage17key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage17key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc17").$("stage17_key"+i));
			}
			var stage17arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 17; i++) {
				stage17arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc17").$("stage17_txt"+i));
			}
			var stage17mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage17mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc17").$("map17_key"+i));
			}
			var stage17map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage17map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc17").$("map17_txt"+i));
			}
//END	
//stage18
			var stage18_distance; //for array of xml entries
			var distancestage18;
			var stage18_route; //for array of xml entries
			var routestage18;

			var stage18key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage18key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc18").$("stage18_key"+i));
			}
			var stage18arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 17; i++) {
				stage18arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc18").$("stage18_txt"+i));
			}
			var stage18mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage18mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc18").$("map18_key"+i));
			}
			var stage18map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 10; i++) {
				stage18map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc18").$("map18_txt"+i));
			}
//END	
//stage19
			var stage19_distance; //for array of xml entries
			var distancestage19;
			var stage19_route; //for array of xml entries
			var routestage19;

			var stage19key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage19key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc19").$("stage19_key"+i));
			}
			var stage19arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 16; i++) {
				stage19arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc19").$("stage19_txt"+i));
			}
			var stage19mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage19mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc19").$("map19_key"+i));
			}
			var stage19map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 9; i++) {
				stage19map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc19").$("map19_txt"+i));
			}
//END	
//stage20
			var stage20_distance; //for array of xml entries
			var distancestage20;
			var stage20_route; //for array of xml entries
			var routestage20;

			var stage20key=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage20key.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc20").$("stage20_key"+i));
			}
			var stage20arr=[]; //for array of Profile text boxes - just change the number of elements
			for (var i = 0; i < 12; i++) {
				stage20arr.push(sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").getSymbol("profileMc20").$("stage20_txt"+i));
			}
			var stage20mapkey=[];  //for array of Key text boxes - just change the number of elements
			for (var i = 0; i < 3; i++) {
				stage20mapkey.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc20").$("map20_key"+i));
			}
			var stage20map=[]; //for array of Map text boxes - just change the number of elements
			for (var i = 0; i < 6; i++) {
				stage20map.push(sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").getSymbol("mapMc20").$("map20_txt"+i));
			}
//END





			var mapStart;
			var mapFinish;


           //AJAX retrieves data from xml source specified in url, maps xml variable to DOM object variable
           $.ajax({	
         	type: "GET",
         	url: "GN30685.xml",
         	dataType: "xml",
         	success: function(xml) {
					headline = $(xml).find('headline').text();
         		headlinetxt.html(headline);
         		source = $(xml).find('source').text();
         		sourcetxt.html(source);
         		menuIcon0 = $(xml).find('menuIcon0').text();
         		menuIcon0txt.html(menuIcon0);
         		menuIcon1 = $(xml).find('menuIcon1').text();
         		menuIcon1txt.html(menuIcon1);  
         		menuIcon2 = $(xml).find('menuIcon2').text();
         		menuIcon2txt.html(menuIcon2);
         		menuIcon3 = $(xml).find('menuIcon3').text();
         		menuIcon3txt.html(menuIcon3);
         		menuTxt0 = $(xml).find('menuTxt0').text();
         		menuTxt0txt.html(menuTxt0);  
         		menuTxt1 = $(xml).find('menuTxt1').text();
         		menuTxt1txt.html(menuTxt1);  
         		menuTxt2 = $(xml).find('menuTxt2').text();
         		menuTxt2txt.html(menuTxt2);
         		menuTxt3 = $(xml).find('menuTxt3').text();
         		var menuTxt4=$(xml).find('txt11').text();
         		if (todayDate<startDate){
						menuTxt3txt.html(menuTxt4);
					}else{
						menuTxt3txt.html(menuTxt3);
					}
         		nameShort0 = $(xml).find('nameShort0').text();
         		nameShort0txt.html(nameShort0);
         		nameShort1 = $(xml).find('nameShort1').text();
         		nameShort1txt.html(nameShort1);
         		nameShort2 = $(xml).find('nameShort2').text();
         		nameShort2txt.html(nameShort2);
         		nameShort3 = $(xml).find('nameShort3').text();
         		nameShort3txt.html(nameShort3);
         		nameShort4 = $(xml).find('nameShort4').text();
         		nameShort4txt.html(nameShort4);
         		nameShort5 = $(xml).find('nameShort5').text();
         		nameShort5txt.html(nameShort5);
         		nameShort6 = $(xml).find('nameShort6').text();
         		nameShort6txt.html(nameShort6);
         		nameShort7 = $(xml).find('nameShort7').text();
         		nameShort7txt.html(nameShort7);
         		nameShort8 = $(xml).find('nameShort8').text();
         		nameShort8txt.html(nameShort8);
         		nameShort9 = $(xml).find('nameShort9').text();
         		nameShort9txt.html(nameShort9);
         		nameShort10 = $(xml).find('nameShort10').text();
         		nameShort10txt.html(nameShort10);
         		nameShort11 = $(xml).find('nameShort11').text();
         		nameShort11txt.html(nameShort11);
         		nameShort12 = $(xml).find('nameShort12').text();
         		nameShort12txt.html(nameShort12);
         		nameShort13 = $(xml).find('nameShort13').text();
         		nameShort13txt.html(nameShort13);
         		nameShort14 = $(xml).find('nameShort14').text();
         		nameShort14txt.html(nameShort14);
         		nameShort15 = $(xml).find('nameShort15').text();
         		nameShort15txt.html(nameShort15);
         		nameShort16 = $(xml).find('nameShort16').text();
         		nameShort16txt.html(nameShort16);
         		nameShort17 = $(xml).find('nameShort17').text();
         		nameShort17txt.html(nameShort17);
         		nameShort18 = $(xml).find('nameShort18').text();
         		nameShort18txt.html(nameShort18);
         		nameShort19 = $(xml).find('nameShort19').text();
         		nameShort19txt.html(nameShort19);
         		nameShort20 = $(xml).find('nameShort20').text();
         		nameShort20txt.html(nameShort20);
         		nameShort21 = $(xml).find('nameShort21').text();
         		nameShort21txt.html(nameShort21);
         		nameShort22 = $(xml).find('nameShort22').text();
         		nameShort22txt.html(nameShort22);
         		country = $(xml).find('country1').text();
         		countrytxt.html(country);
         		name = $(xml).find('name1').text();
         		nametxt.html(name + country);
         		riders = $(xml).find('riders1').text();
         		riderstxt.html(riders);
         		txt1 = $(xml).find('txt1').text();
         		txt1txt.html(txt1);
         		txt2 = $(xml).find('txt2').text();
         		txt2txt.html(txt2);
         		txt3 = $(xml).find('txt3').text();
         		txt3txt.html(txt3);
         		txt4 = $(xml).find('txt4').text();
         		txt4txt.html(txt4)
         		txt5 = $(xml).find('txt5').text();
         		txt5txt.html(txt5);
         		txt6 = $(xml).find('txt6').text();
         		txt6txt.html(txt6);
					txt7 = $(xml).find('txt7').text();
         		txt7txt.html(txt7);
         		txt8 = $(xml).find('txt8').text();
         		txt8txt.html(txt8);
         		txt9 = $(xml).find('txt9').text();
         		txt9txt.html(txt9);
         		string0 = $(xml).find('txt8').text(); 
         		stagestring=string0.split("<br>");
         		string1 = $(xml).find('txt9').text(); 
         		datestring=string1.split("<br>");         		
         		txt10 = $(xml).find('txt10').text();
         		txt10txt.html(txt10);
         		txt11 = $(xml).find('txt11').text();
         		txt11txt.html(txt11);
         		txt12 = $(xml).find('txt12').text();
         		txt12txt.html(txt12);
         		txt14 = $(xml).find('txt14').text();
         		txt14txt.html(txt14);       		
         		string2 = $(xml).find('txt15').text(); 
         		tablestring=string2.split(",");   		
         		stagetxt0.text(stagestring[0]+" "+stagestring[1]+" - "+datestring[0]+" "+datestring[1]);
         		stagetxt1.text(tablestring[0]);
         		stagetxt2.text(tablestring[1]);
         		//stagetxt3.text(tablestring[1]);
         		profilekey= $(xml).find('profilekey').text();
         		keystring=profilekey.split(",");

         		txt16 = $(xml).find('txt16').text();
					classtxt.html(txt16);
         		string3 = $(xml).find('txt17').text(); 
         		resultstring0=string3.split(",");
					txt17txt.text(resultstring0[0]+stagestring[1]);

         		string4 = $(xml).find('txt18').text(); 
         		resultstring1=string4.split(","); 
         		txt18txt.html(resultstring1[0]);
         		txt20 = $(xml).find('txt20').text();
         		txt21 = $(xml).find('txt21').text();
					txt21txt.html(txt21);
					txt22 = $(xml).find('txt22').text();
					txt22txt.html(txt22);
					txt23 = $(xml).find('txt23').text();
					txt23txt.html(txt23);
					txt24 = $(xml).find('txt24').text();
					txt24txt.html(txt24);
					txt25 = $(xml).find('txt25').text();
					txt25txt.html(txt25);
					txt26 = $(xml).find('txt26').text();
					txt26txt.html(txt26);
					txt27 = $(xml).find('txt27').text();
					txt27txt.html(txt27);
					txt28 = $(xml).find('txt28').text();
					txt28txt.html(txt28);
					txt29 = $(xml).find('txt29').text();
					txt29txt.html(txt29);
					txt30 = $(xml).find('txt30').text();
					txt30txt.html(txt30);   
					txt31 = $(xml).find('txt31').text();
					txt31txt.html(txt31);   
					txt32 = $(xml).find('txt32').text();
					txt32txt.html(txt32);   
					txt33 = $(xml).find('txt33').text();
					txt33txt.html(txt33);  
					txt34 = $(xml).find('txt34').text();
					txt34txt.html(txt34);  
					txt35 = $(xml).find('txt35').text();
					txt35txt.html(txt35);    
         		stagetxt3.text(txt20+" "+datestring[0]+" "+datestring[1]);
					string5 = $(xml).find('txt19').text(); 
         		resultstring1=string5.split(",");   
					classtxt0.text(resultstring1[0]);
					classtxt1.text(resultstring1[1]);
					classtxt2.text(resultstring1[2]);
					classtxt3.text(resultstring1[3]);
					classtxt4.text(resultstring1[4]);

					distance = $(xml).find('distance').text();
					distancemap = $(xml).find('distancemap').text();
					mediterranean = $(xml).find('mediterranean').text();
					//map start/finish must come before stage arrays
					mapStart = $(xml).find('mapStart').text();
					mapFinish = $(xml).find('mapFinish').text();

//Stage arrays (includes map and profile captions)
/* stage0 */	
			stage0_distance = $(xml).find('stage0_distance').text();
         distancestage0 = stage0_distance.split("*");
         stage0_route = $(xml).find('stage0_route').text();
         routestage0 = stage0_route.split("*");
         stage0key[0].html(keystring[0]);
        	stage0key[1].html(keystring[1]);
			stage0key[2].html(keystring[2]);
         stage0arr[0].html(routestage0[0]);
         stage0arr[1].html(routestage0[1]);
         stage0arr[2].html(routestage0[2]);
         stage0arr[3].html(routestage0[3]);
         stage0arr[4].html(routestage0[4]);
			stage0arr[5].html(distance);
         stage0arr[6].html(distancestage0[0]);
         stage0arr[7].html(distancestage0[1]);
         stage0arr[8].html(distancestage0[2]);
			stage0arr[9].html(distancestage0[3]);

			stage0mapkey[0].html(keystring[1]);
			stage0mapkey[1].html(keystring[2]);
			stage0mapkey[2].html(keystring[0]);
			stage0map[0].html(distancemap +" "+ distancestage0[3] + distance);
			stage0map[1].html(mapStart +" "+ routestage0[0]);
			stage0map[2].html(mapFinish +" "+ routestage0[4]);
			stage0map[3].html(mediterranean);
			stage0map[4].html(distancestage0[0]+distance);
			stage0map[5].html(distancestage0[1]+distance);
			stage0map[6].html(distancestage0[2]+distance);

/* stage1 */	
			stage1_distance = $(xml).find('stage1_distance').text();
			distancestage1 = stage1_distance.split("*");
			stage1_route = $(xml).find('stage1_route').text();
			routestage1 = stage1_route.split("*");
			stage1key[0].html(keystring[0]);
			stage1key[1].html(keystring[1]);
			stage1key[2].html(keystring[2]);
			stage1arr[0].html(routestage1[0]);
			stage1arr[1].html(routestage1[1]);
			stage1arr[2].html(routestage1[2]);
			stage1arr[3].html(routestage1[3]);
			stage1arr[4].html(routestage1[4]);
			stage1arr[5].html(routestage1[5]);
			stage1arr[6].html(routestage1[6]);
			stage1arr[7].html(distance);
			stage1arr[8].html(distancestage1[0]);
			stage1arr[9].html(distancestage1[1]);
			stage1arr[10].html(distancestage1[2]);
			stage1arr[11].html(distancestage1[3]);
			stage1arr[12].html(distancestage1[4]);
			stage1arr[13].html(distancestage1[5]);
			stage1arr[14].html(distancestage1[6]);

			stage1mapkey[0].html(keystring[1]);
			stage1mapkey[1].html(keystring[2]);
			stage1mapkey[2].html(keystring[0]);
			stage1map[0].html(distancemap +" "+ distancestage1[6] + distance);
			stage1map[1].html(mapStart +" "+ routestage1[0]);
			stage1map[2].html(mapFinish +" "+ routestage1[6]);
			stage1map[3].html(distancestage1[0]+ distance);
			stage1map[4].html(distancestage1[1]+ distance);
			stage1map[5].html(distancestage1[2]+ distance);
			stage1map[6].html(distancestage1[3]+ distance);
			stage1map[7].html(distancestage1[4]+ distance);
			stage1map[8].html(distancestage1[5]+ distance);

/* stage2 */
			stage2_distance = $(xml).find('stage2_distance').text();
			distancestage2 = stage2_distance.split("*");
			stage2_route = $(xml).find('stage2_route').text();
			routestage2 = stage2_route.split("*");
			stage2key[0].html(keystring[0]);
			stage2key[1].html(keystring[1]);
			stage2key[2].html(keystring[2]);
			stage2arr[0].html(routestage2[0]);
			stage2arr[1].html(routestage2[1]);
			stage2arr[2].html(routestage2[2]);
			stage2arr[3].html(routestage2[3]);
			stage2arr[4].html(routestage2[4]);
			stage2arr[5].html(routestage2[5]);
			stage2arr[6].html(routestage2[6]);
			stage2arr[7].html(routestage2[7]);
			stage2arr[8].html(distance);
			stage2arr[9].html(distancestage2[0]);
			stage2arr[10].html(distancestage2[1]);
			stage2arr[11].html(distancestage2[2]);
			stage2arr[12].html(distancestage2[3]);
			stage2arr[13].html(distancestage2[4]);
			stage2arr[14].html(distancestage2[5]);
			stage2arr[15].html(distancestage2[6]);

			stage2mapkey[0].html(keystring[1]);
			stage2mapkey[1].html(keystring[2]);
			stage2mapkey[2].html(keystring[0]);
			stage2map[0].html(distancemap +" "+ distancestage2[6] + distance);
			stage2map[1].html(mapStart +" "+ routestage2[0]);
			stage2map[2].html(mapFinish +" "+ routestage2[7]);
			stage2map[3].html(distancestage2[0]+ distance);
			stage2map[4].html(distancestage2[1]+ distance);
			stage2map[5].html(distancestage2[2]+ distance);
			stage2map[6].html(distancestage2[3]+ distance);
			stage2map[7].html(distancestage2[4]+ distance);
			stage2map[8].html(distancestage2[5]+ distance);

/* stage3 */
			stage3_distance = $(xml).find('stage3_distance').text();
			distancestage3 = stage3_distance.split("*");
			stage3_route = $(xml).find('stage3_route').text();
			routestage3 = stage3_route.split("*");
			stage3key[0].html(keystring[3]);
			stage3key[1].html(keystring[2]);
			stage3arr[0].html(routestage3[0]);
			stage3arr[1].html(routestage3[1]);
			stage3arr[2].html(routestage3[2]);
			stage3arr[3].html(distance);
			stage3arr[4].html(distancestage3[0]);
			stage3arr[5].html(distancestage3[1]);

			stage3mapkey[0].html(keystring[3]);
			stage3map[0].html(distancemap +" "+ distancestage3[1] + distance);
			stage3map[1].html(mapStart +"/"+ mapFinish + " " + routestage3[0]);
			stage3map[2].html(routestage3[3]);
			stage3map[3].html(distancestage3[0] + distance);

/* stage4 */
			stage4_distance = $(xml).find('stage4_distance').text();
			distancestage4 = stage4_distance.split("*");
			stage4_route = $(xml).find('stage4_route').text();
			routestage4 = stage4_route.split("*");
			stage4key[0].html(keystring[0]);
			stage4key[1].html(keystring[1]);
			stage4key[2].html(keystring[2]);
			stage4arr[0].html(routestage4[0]);
			stage4arr[1].html(routestage4[1]);
			stage4arr[2].html(routestage4[2]);
			stage4arr[3].html(routestage4[3]);
			stage4arr[4].html(routestage4[4]);
			stage4arr[5].html(routestage4[5]);
			stage4arr[6].html(routestage4[6]);
			stage4arr[7].html(routestage4[7]);
			stage4arr[8].html(distance);
			stage4arr[9].html(distancestage4[0]);
			stage4arr[10].html(distancestage4[1]);
			stage4arr[11].html(distancestage4[2]);
			stage4arr[12].html(distancestage4[3]);
			stage4arr[13].html(distancestage4[4]);
			stage4arr[14].html(distancestage4[5]);
			stage4arr[15].html(distancestage4[6]);

			stage4mapkey[0].html(keystring[1]);
			stage4mapkey[1].html(keystring[2]);
			stage4mapkey[2].html(keystring[0]);
			stage4map[0].html(distancemap +" "+ distancestage4[6] + distance);
			stage4map[1].html(mapStart +" "+ routestage4[0]);
			stage4map[2].html(mapFinish +" "+ routestage4[7]);
			stage4map[3].html(mediterranean);
			stage4map[4].html(distancestage4[0]+ distance);
			stage4map[5].html(distancestage4[1]+ distance);
			stage4map[6].html(distancestage4[2]+ distance);
			stage4map[7].html(distancestage4[3]+ distance);
			stage4map[8].html(distancestage4[4]+ distance);
			stage4map[9].html(distancestage4[5]+ distance);
/* stage4 */
/* stage5 */
			stage5_distance = $(xml).find('stage5_distance').text();
			distancestage5 = stage5_distance.split("*");
			stage5_route = $(xml).find('stage5_route').text();
			routestage5 = stage5_route.split("*");
			stage5key[0].html(keystring[0]);
			stage5key[1].html(keystring[1]);
			stage5key[2].html(keystring[2]);
			stage5arr[0].html(routestage5[0]);
			stage5arr[1].html(routestage5[1]);
			stage5arr[2].html(routestage5[2]);
			stage5arr[3].html(routestage5[3]);
			stage5arr[4].html(routestage5[4]);
			stage5arr[5].html(distance);
			stage5arr[6].html(distancestage5[0]);
			stage5arr[7].html(distancestage5[1]);
			stage5arr[8].html(distancestage5[2]);
			stage5arr[9].html(distancestage5[3]);

			stage5mapkey[0].html(keystring[1]);
			stage5mapkey[1].html(keystring[2]);
			stage5mapkey[2].html(keystring[0]);
			stage5map[0].html(distancemap +" "+ distancestage5[3] + distance);
			stage5map[1].html(mapStart +" "+ routestage5[0]);
			stage5map[2].html(mapFinish +" "+ routestage5[4]);
			stage5map[3].html(mediterranean);
			stage5map[4].html(distancestage5[0]+ distance);
			stage5map[5].html(distancestage5[1]+ distance);
			stage5map[6].html(distancestage5[2]+ distance);
/* stage5 */
/* stage6 */
			stage6_distance = $(xml).find('stage6_distance').text();
			distancestage6 = stage6_distance.split("*");
			stage6_route = $(xml).find('stage6_route').text();
			routestage6 = stage6_route.split("*");
			stage6key[0].html(keystring[0]);
			stage6key[1].html(keystring[1]);
			stage6key[2].html(keystring[2]);
			stage6arr[0].html(routestage6[0]);
			stage6arr[1].html(routestage6[1]);
			stage6arr[2].html(routestage6[2]);
			stage6arr[3].html(routestage6[3]);
			stage6arr[4].html(routestage6[4]);
			stage6arr[5].html(routestage6[5]);
			stage6arr[6].html(routestage6[6]);
			stage6arr[7].html(routestage6[7]);
			stage6arr[8].html(distance);
			stage6arr[9].html(distancestage6[0]);
			stage6arr[10].html(distancestage6[1]);
			stage6arr[11].html(distancestage6[2]);
			stage6arr[12].html(distancestage6[3]);
			stage6arr[13].html(distancestage6[4]);
			stage6arr[14].html(distancestage6[5]);
			stage6arr[15].html(distancestage6[6]);

			stage6mapkey[0].html(keystring[1]);
			stage6mapkey[1].html(keystring[2]);
			stage6mapkey[2].html(keystring[0]);
			stage6map[0].html(distancemap +" "+ distancestage6[6] + distance);
			stage6map[1].html(mapStart +" "+ routestage6[0]);
			stage6map[2].html(mapFinish +" "+ routestage6[7]);
			stage6map[3].html(mediterranean);
			stage6map[4].html(distancestage6[0]+ distance);
			stage6map[5].html(distancestage6[1]+ distance);
			stage6map[6].html(distancestage6[2]+ distance);
			stage6map[7].html(distancestage6[3]+ distance);
			stage6map[8].html(distancestage6[4]+ distance);
			stage6map[9].html(distancestage6[5]+ distance);
/* stage6 */
/* stage7 */
			stage7_distance = $(xml).find('stage7_distance').text();
			distancestage7 = stage7_distance.split("*");
			stage7_route = $(xml).find('stage7_route').text();
			routestage7 = stage7_route.split("*");
			stage7key[0].html(keystring[0]);
			stage7key[1].html(keystring[1]);
			stage7key[2].html(keystring[2]);
			stage7arr[0].html(routestage7[0]);
			stage7arr[1].html(routestage7[1]);
			stage7arr[2].html(routestage7[2]);
			stage7arr[3].html(routestage7[3]);
			stage7arr[4].html(routestage7[4]);
			stage7arr[5].html(routestage7[5]);
			stage7arr[6].html(routestage7[6]);
			stage7arr[7].html(distance);
			stage7arr[8].html(distancestage7[0]);
			stage7arr[9].html(distancestage7[1]);
			stage7arr[10].html(distancestage7[2]);
			stage7arr[11].html(distancestage7[3]);
			stage7arr[12].html(distancestage7[4]);
			stage7arr[13].html(distancestage7[5]);

			stage7mapkey[0].html(keystring[1]);
			stage7mapkey[1].html(keystring[2]);
			stage7mapkey[2].html(keystring[0]);
			stage7map[0].html(distancemap +" "+ distancestage7[5] + distance);
			stage7map[1].html(mapStart +" "+ routestage7[0]);
			stage7map[2].html(mapFinish +" "+ routestage7[6]);
			stage7map[3].html(distancestage7[0]+ distance);
			stage7map[4].html(distancestage7[1]+ distance);
			stage7map[5].html(distancestage7[2]+ distance);
			stage7map[6].html(distancestage7[3]+ distance);

/* stage7 */
/* stage8 */
			stage8_distance = $(xml).find('stage8_distance').text();
			distancestage8 = stage8_distance.split("*");
			stage8_route = $(xml).find('stage8_route').text();
			routestage8 = stage8_route.split("*");
			stage8key[0].html(keystring[0]);
			stage8key[1].html(keystring[1]);
			stage8key[2].html(keystring[2]);
			stage8arr[0].html(routestage8[0]);
			stage8arr[1].html(routestage8[1]);
			stage8arr[2].html(routestage8[2]);
			stage8arr[3].html(routestage8[3]);
			stage8arr[4].html(routestage8[4]);
			stage8arr[5].html(routestage8[5]);
			stage8arr[6].html(routestage8[6]);
			stage8arr[7].html(routestage8[7]);
			stage8arr[8].html(distance);
			stage8arr[9].html(distancestage8[0]);
			stage8arr[10].html(distancestage8[1]);
			stage8arr[11].html(distancestage8[2]);
			stage8arr[12].html(distancestage8[3]);
			stage8arr[13].html(distancestage8[4]);
			stage8arr[14].html(distancestage8[5]);
			stage8arr[15].html(distancestage8[6]);
			stage8arr[16].html(distancestage8[7]);

			stage8mapkey[0].html(keystring[1]);
			stage8mapkey[1].html(keystring[2]);
			stage8mapkey[2].html(keystring[0]);
			stage8map[0].html(distancemap +" "+ distancestage8[7] + distance);
			stage8map[1].html(mapStart +" "+ routestage8[0]);
			stage8map[2].html(mapFinish +" "+ routestage8[7]);
			stage8map[3].html(routestage8[8]);
			stage8map[4].html(distancestage8[0]+ distance);
			stage8map[5].html(distancestage8[1]+ distance);
			stage8map[6].html(distancestage8[2]+ distance);
			stage8map[7].html(distancestage8[3]+ distance);
			stage8map[8].html(distancestage8[4]+ distance);
			stage8map[9].html(distancestage8[5]+ distance);
			stage8map[10].html(distancestage8[6]+ distance);
/* stage8 */
/* stage9 */
			stage9_distance = $(xml).find('stage9_distance').text();
			distancestage9 = stage9_distance.split("*");
			stage9_route = $(xml).find('stage9_route').text();
			routestage9 = stage9_route.split("*");
			stage9key[0].html(keystring[0]);
			stage9key[1].html(keystring[1]);
			stage9key[2].html(keystring[2]);
			stage9arr[0].html(routestage9[0]);
			stage9arr[1].html(routestage9[1]);
			stage9arr[2].html(routestage9[2]);
			stage9arr[3].html(routestage9[3]);
			stage9arr[4].html(routestage9[4]);
			stage9arr[5].html(distance);
			stage9arr[6].html(distancestage9[0]);
			stage9arr[7].html(distancestage9[1]);
			stage9arr[8].html(distancestage9[2]);
			stage9arr[9].html(distancestage9[3]);

			stage9mapkey[0].html(keystring[1]);
			stage9mapkey[1].html(keystring[2]);
			stage9mapkey[2].html(keystring[0]);
			stage9map[0].html(distancemap +" "+ distancestage9[3] + distance);
			stage9map[1].html(mapStart +" "+ routestage9[0]);
			stage9map[2].html(mapFinish +" "+ routestage9[4]);
			stage9map[3].html(distancestage9[0]+ distance);
			stage9map[4].html(distancestage9[1]+ distance);
			stage9map[5].html(distancestage9[2]+ distance);

/* stage9 */
/* stage10 */
			stage10_distance = $(xml).find('stage10_distance').text();
			distancestage10 = stage10_distance.split("*");
			stage10_route = $(xml).find('stage10_route').text();
			routestage10 = stage10_route.split("*");
			stage10key[0].html(keystring[4]);
			stage10key[1].html(keystring[2]);
			stage10arr[0].html(routestage10[0]);
			stage10arr[1].html(routestage10[1]);
			stage10arr[2].html(routestage10[2]);
			stage10arr[3].html(routestage10[3]);
			stage10arr[4].html(routestage10[4]);
			stage10arr[5].html(distance);
			stage10arr[6].html(distancestage10[0]);
			stage10arr[7].html(distancestage10[1]);
			stage10arr[8].html(distancestage10[2]);
			stage10arr[9].html(distancestage10[3]);

			stage10mapkey[0].html(keystring[4]);
			stage10mapkey[1].html(keystring[0]);
			stage10map[0].html(distancemap +" "+ distancestage10[3] + distance);
			stage10map[1].html(mapStart +" "+ routestage10[0]);
			stage10map[2].html(mapFinish +" "+ routestage10[4]);
			stage10map[3].html(distancestage10[0]+ distance);
			stage10map[4].html(distancestage10[1]+ distance);
			stage10map[5].html(distancestage10[2]+ distance);
/* stage10 */
/* stage11 */
			stage11_distance = $(xml).find('stage11_distance').text();
			distancestage11 = stage11_distance.split("*");
			stage11_route = $(xml).find('stage11_route').text();
			routestage11 = stage11_route.split("*");
			stage11key[0].html(keystring[0]);
			stage11key[1].html(keystring[1]);
			stage11arr[0].html(routestage11[0]);
			stage11arr[1].html(routestage11[1]);
			stage11arr[2].html(routestage11[2]);
			stage11arr[3].html(routestage11[3]);
			stage11arr[4].html(distance);
			stage11arr[5].html(distancestage11[0]);
			stage11arr[6].html(distancestage11[1]);
			stage11arr[7].html(distancestage11[2]);

			stage11mapkey[0].html(keystring[1]);
			stage11mapkey[1].html(keystring[0]);
			stage11map[0].html(distancemap +" "+ distancestage11[2] + distance);
			stage11map[1].html(mapStart +" "+ routestage11[0]);
			stage11map[2].html(mapFinish +" "+ routestage11[3]);
			stage11map[3].html(distancestage11[0]+ distance);
			stage11map[4].html(distancestage11[1]+ distance);
/* stage11 */
/* stage12 */
			stage12_distance = $(xml).find('stage12_distance').text();
			distancestage12 = stage12_distance.split("*");
			stage12_route = $(xml).find('stage12_route').text();
			routestage12 = stage12_route.split("*");
			stage12key[0].html(keystring[0]);
			stage12key[1].html(keystring[1]);
			stage12key[2].html(keystring[2]);
			stage12arr[0].html(routestage12[0]);
			stage12arr[1].html(routestage12[1]);
			stage12arr[2].html(routestage12[2]);
			stage12arr[3].html(routestage12[3]);
			stage12arr[4].html(routestage12[4]);
			stage12arr[5].html(distance);
			stage12arr[6].html(distancestage12[0]);
			stage12arr[7].html(distancestage12[1]);
			stage12arr[8].html(distancestage12[2]);
			stage12arr[9].html(distancestage12[3]);

			stage12mapkey[0].html(keystring[1]);
			stage12mapkey[1].html(keystring[2]);
			stage12mapkey[2].html(keystring[0]);
			stage12map[0].html(distancemap +" "+ distancestage12[3] + distance);
			stage12map[1].html(mapStart +" "+ routestage12[0]);
			stage12map[2].html(mapFinish +" "+ routestage12[4]);
			stage12map[3].html(distancestage12[0]+ distance);
			stage12map[4].html(distancestage12[1]+ distance);
			stage12map[5].html(distancestage12[2]+ distance);
/* stage12 */
/* stage13 */
			stage13_distance = $(xml).find('stage13_distance').text();
			distancestage13 = stage13_distance.split("*");
			stage13_route = $(xml).find('stage13_route').text();
			routestage13 = stage13_route.split("*");
			stage13key[0].html(keystring[0]);
			stage13key[1].html(keystring[1]);
			stage13key[2].html(keystring[2]);
			stage13arr[0].html(routestage13[0]);
			stage13arr[1].html(routestage13[1]);
			stage13arr[2].html(routestage13[2]);
			stage13arr[3].html(routestage13[3]);
			stage13arr[4].html(routestage13[4]);
			stage13arr[5].html(routestage13[5]);
			stage13arr[6].html(routestage13[6]);
			stage13arr[7].html(routestage13[7]);
			stage13arr[8].html(routestage13[8]);
			stage13arr[9].html(routestage13[9]);
			stage13arr[10].html(routestage13[10]);
			stage13arr[11].html(distance);
			stage13arr[12].html(distancestage13[0]);
			stage13arr[13].html(distancestage13[1]);
			stage13arr[14].html(distancestage13[2]);
			stage13arr[15].html(distancestage13[3]);
			stage13arr[16].html(distancestage13[4]);
			stage13arr[17].html(distancestage13[5]);
			stage13arr[18].html(distancestage13[6]);
			stage13arr[19].html(distancestage13[7]);
			stage13arr[20].html(distancestage13[8]);
			stage13arr[21].html(distancestage13[9]);

			stage13mapkey[0].html(keystring[1]);
			stage13mapkey[1].html(keystring[2]);
			stage13mapkey[2].html(keystring[0]);
			stage13map[0].html(distancemap +" "+ distancestage13[9] + distance);
			stage13map[1].html(mapStart +" "+ routestage13[0]);
			stage13map[2].html(mapFinish +" "+ routestage13[10]);
			stage13map[3].html(distancestage13[0]+ distance);
			stage13map[4].html(distancestage13[1]+ distance);
			stage13map[5].html(distancestage13[2]+ distance);
			stage13map[6].html(distancestage13[3]+ distance);
			stage13map[7].html(distancestage13[4]+ distance);
			stage13map[8].html(distancestage13[5]+ distance);
			stage13map[9].html(distancestage13[6]+ distance);
			stage13map[10].html(distancestage13[7]+ distance);
			stage13map[11].html(distancestage13[8]+ distance);

/* stage13 */
/* stage14 */
			stage14_distance = $(xml).find('stage14_distance').text();
			distancestage14 = stage14_distance.split("*");
			stage14_route = $(xml).find('stage14_route').text();
			routestage14 = stage14_route.split("*");
			stage14key[0].html(keystring[0]);
			stage14key[1].html(keystring[1]);
			stage14key[2].html(keystring[2]);
			stage14arr[0].html(routestage14[0]);
			stage14arr[1].html(routestage14[1]);
			stage14arr[2].html(routestage14[2]);
			stage14arr[3].html(routestage14[3]);
			stage14arr[4].html(routestage14[4]);
			stage14arr[5].html(routestage14[5]);
			stage14arr[6].html(routestage14[6]);
			stage14arr[7].html(routestage14[7]);
			stage14arr[8].html(distance);
			stage14arr[9].html(distancestage14[0]);
			stage14arr[10].html(distancestage14[1]);
			stage14arr[11].html(distancestage14[2]);
			stage14arr[12].html(distancestage14[3]);
			stage14arr[13].html(distancestage14[4]);
			stage14arr[14].html(distancestage14[5]);
			stage14arr[15].html(distancestage14[6]);

			stage14mapkey[0].html(keystring[1]);
			stage14mapkey[1].html(keystring[2]);
			stage14mapkey[2].html(keystring[0]);
			stage14map[0].html(distancemap +" "+ distancestage14[6] + distance);
			stage14map[1].html(mapStart +" "+ routestage14[0]);
			stage14map[2].html(mapFinish +" "+ routestage14[7]);
			stage14map[3].html(distancestage14[0]+ distance);
			stage14map[4].html(distancestage14[1]+ distance);
			stage14map[5].html(distancestage14[2]+ distance);
			stage14map[6].html(distancestage14[3]+ distance);
			stage14map[7].html(distancestage14[4]+ distance);
			stage14map[8].html(distancestage14[5]+ distance);

/* stage14 */
/* stage15 */
			stage15_distance = $(xml).find('stage15_distance').text();
			distancestage15 = stage15_distance.split("*");
			stage15_route = $(xml).find('stage15_route').text();
			routestage15 = stage15_route.split("*");
			stage15key[0].html(keystring[0]);
			stage15key[1].html(keystring[1]);
			stage15key[2].html(keystring[2]);
			stage15arr[0].html(routestage15[0]);
			stage15arr[1].html(routestage15[1]);
			stage15arr[2].html(routestage15[2]);
			stage15arr[3].html(routestage15[3]);
			stage15arr[4].html(routestage15[4]);
			stage15arr[5].html(routestage15[5]);
			stage15arr[6].html(routestage15[6]);
			stage15arr[7].html(distance);
			stage15arr[8].html(distancestage15[0]);
			stage15arr[9].html(distancestage15[1]);
			stage15arr[10].html(distancestage15[2]);
			stage15arr[11].html(distancestage15[3]);
			stage15arr[12].html(distancestage15[4]);
			stage15arr[13].html(distancestage15[5]);

			stage15mapkey[0].html(keystring[1]);
			stage15mapkey[1].html(keystring[2]);
			stage15mapkey[2].html(keystring[0]);
			stage15map[0].html(distancemap +" "+ distancestage15[5] + distance);
			stage15map[1].html(mapStart +" "+ routestage15[0]);
			stage15map[2].html(mapFinish +" "+ routestage15[6]);
			stage15map[3].html(distancestage15[0]+ distance);
			stage15map[4].html(distancestage15[1]+ distance);
			stage15map[5].html(distancestage15[2]+ distance);
			stage15map[6].html(distancestage15[3]+ distance);
			stage15map[7].html(distancestage15[4]+ distance);
/* stage15 */
/* stage16 */
			stage16_distance = $(xml).find('stage16_distance').text();
			distancestage16 = stage16_distance.split("*");
			stage16_route = $(xml).find('stage16_route').text();
			routestage16 = stage16_route.split("*");
			stage16key[0].html(keystring[4]);
			stage16key[1].html(keystring[2]);
			stage16arr[0].html(routestage16[0]);
			stage16arr[1].html(routestage16[1]);
			stage16arr[2].html(routestage16[2]);
			stage16arr[3].html(routestage16[3]);
			stage16arr[4].html(distance);
			stage16arr[5].html(distancestage16[0]);
			stage16arr[6].html(distancestage16[1]);
			stage16arr[7].html(distancestage16[2]);

			stage16mapkey[0].html(keystring[4]);
			stage16mapkey[1].html(keystring[2]);
			stage16map[0].html(distancemap +" "+ distancestage16[2] + distance);
			stage16map[1].html(mapStart +" "+ routestage16[0]);
			stage16map[2].html(mapFinish +" "+ routestage16[3]);
			stage16map[3].html(distancestage16[0]+ distance);
			stage16map[4].html(distancestage16[1]+ distance);
/* stage16 */
/* stage17 */
			stage17_distance = $(xml).find('stage17_distance').text();
			distancestage17 = stage17_distance.split("*");
			stage17_route = $(xml).find('stage17_route').text();
			routestage17 = stage17_route.split("*");
			stage17key[0].html(keystring[0]);
			stage17key[1].html(keystring[1]);
			stage17key[2].html(keystring[2]);
			stage17arr[0].html(routestage17[0]);
			stage17arr[1].html(routestage17[1]);
			stage17arr[2].html(routestage17[2]);
			stage17arr[3].html(routestage17[3]);
			stage17arr[4].html(routestage17[4]);
			stage17arr[5].html(routestage17[5]);
			stage17arr[6].html(routestage17[6]);
			stage17arr[7].html(routestage17[7]);
			stage17arr[8].html(distance);
			stage17arr[9].html(distancestage17[0]);
			stage17arr[10].html(distancestage17[1]);
			stage17arr[11].html(distancestage17[2]);
			stage17arr[12].html(distancestage17[3]);
			stage17arr[13].html(distancestage17[4]);
			stage17arr[14].html(distancestage17[5]);
			stage17arr[15].html(distancestage17[6]);
			stage17arr[16].html(distancestage17[7]);

			stage17mapkey[0].html(keystring[1]);
			stage17mapkey[1].html(keystring[2]);
			stage17mapkey[2].html(keystring[0]);
			stage17map[0].html(distancemap +" "+ distancestage17[7] + distance);
			stage17map[1].html(mapStart +" "+ routestage17[0]);
			stage17map[2].html(mapFinish +" "+ routestage17[7]);
			stage17map[3].html(distancestage17[0]+ distance);
			stage17map[4].html(distancestage17[1]+ distance);
			stage17map[5].html(distancestage17[2]+ distance);
			stage17map[6].html(distancestage17[3]+ distance);
			stage17map[7].html(distancestage17[4]+ distance);
			stage17map[8].html(distancestage17[5]+ distance);
			stage17map[9].html(distancestage17[6]+ distance);
/* stage17 */
/* stage18 */
			stage18_distance = $(xml).find('stage18_distance').text();
			distancestage18 = stage18_distance.split("*");
			stage18_route = $(xml).find('stage18_route').text();
			routestage18 = stage18_route.split("*");
			stage18key[0].html(keystring[0]);
			stage18key[1].html(keystring[1]);
			stage18key[2].html(keystring[2]);
			stage18arr[0].html(routestage18[0]);
			stage18arr[1].html(routestage18[1]);
			stage18arr[2].html(routestage18[2]);
			stage18arr[3].html(routestage18[3]);
			stage18arr[4].html(routestage18[4]);
			stage18arr[5].html(routestage18[5]);
			stage18arr[6].html(routestage18[6]);
			stage18arr[7].html(routestage18[7]);
			stage18arr[8].html(distance);
			stage18arr[9].html(distancestage18[0]);
			stage18arr[10].html(distancestage18[1]);
			stage18arr[11].html(distancestage18[2]);
			stage18arr[12].html(distancestage18[3]);
			stage18arr[13].html(distancestage18[4]);
			stage18arr[14].html(distancestage18[5]);
			stage18arr[15].html(distancestage18[6]);
			stage18arr[16].html(distancestage18[7]);

			stage18mapkey[0].html(keystring[1]);
			stage18mapkey[1].html(keystring[2]);
			stage18mapkey[2].html(keystring[0]);
			stage18map[0].html(distancemap +" "+ distancestage18[7] + distance);
			stage18map[1].html(mapStart +" "+ routestage18[0]);
			stage18map[2].html(mapFinish +" "+ routestage18[7]);
			stage18map[3].html(distancestage18[0]+ distance);
			stage18map[4].html(distancestage18[1]+ distance);
			stage18map[5].html(distancestage18[2]+ distance);
			stage18map[6].html(distancestage18[3]+ distance);
			stage18map[7].html(distancestage18[4]+ distance);
			stage18map[8].html(distancestage18[5]+ distance);
			stage18map[9].html(distancestage18[6]+ distance);
/* stage18 */
/* stage19 */
			stage19_distance = $(xml).find('stage19_distance').text();
			distancestage19 = stage19_distance.split("*");
			stage19_route = $(xml).find('stage19_route').text();
			routestage19 = stage19_route.split("*");
			stage19key[0].html(keystring[0]);
			stage19key[1].html(keystring[1]);
			stage19key[2].html(keystring[2]);
			stage19arr[0].html(routestage19[0]);
			stage19arr[1].html(routestage19[1]);
			stage19arr[2].html(routestage19[2]);
			stage19arr[3].html(routestage19[3]);
			stage19arr[4].html(routestage19[4]);
			stage19arr[5].html(routestage19[5]);
			stage19arr[6].html(routestage19[6]);
			stage19arr[7].html(routestage19[7]);
			stage19arr[8].html(distance);
			stage19arr[9].html(distancestage19[0]);
			stage19arr[10].html(distancestage19[1]);
			stage19arr[11].html(distancestage19[2]);
			stage19arr[12].html(distancestage19[3]);
			stage19arr[13].html(distancestage19[4]);
			stage19arr[14].html(distancestage19[5]);
			stage19arr[15].html(distancestage19[6]);

			stage19mapkey[0].html(keystring[1]);
			stage19mapkey[1].html(keystring[2]);
			stage19mapkey[2].html(keystring[0]);
			stage19map[0].html(distancemap +" "+ distancestage19[6] + distance);
			stage19map[1].html(mapStart +" "+ routestage19[0]);
			stage19map[2].html(mapFinish +" "+ routestage19[7]);
			stage19map[3].html(distancestage19[0]+ distance);
			stage19map[4].html(distancestage19[1]+ distance);
			stage19map[5].html(distancestage19[2]+ distance);
			stage19map[6].html(distancestage19[3]+ distance);
			stage19map[7].html(distancestage19[4]+ distance);
			stage19map[8].html(distancestage19[5]+ distance);
/* stage19 */
/* stage20 */
			stage20_distance = $(xml).find('stage20_distance').text();
			distancestage20 = stage20_distance.split("*");
			stage20_route = $(xml).find('stage20_route').text();
			routestage20 = stage20_route.split("*");
			stage20key[0].html(keystring[0]);
			stage20key[1].html(keystring[1]);
			stage20key[2].html(keystring[2]);
			stage20arr[0].html(routestage20[0]);
			stage20arr[1].html(routestage20[1]);
			stage20arr[2].html(routestage20[2]);
			stage20arr[3].html(routestage20[3]);
			stage20arr[4].html(routestage20[4]);
			stage20arr[5].html(routestage20[5]);
			stage20arr[6].html(distance);
			stage20arr[7].html(distancestage20[0]);
			stage20arr[8].html(distancestage20[1]);
			stage20arr[9].html(distancestage20[2]);
			stage20arr[10].html(distancestage20[3]);
			stage20arr[11].html(distancestage20[4]);

			stage20mapkey[0].html(keystring[1]);
			stage20mapkey[1].html(keystring[2]);
			stage20mapkey[2].html(keystring[0]);
			stage20map[0].html(distancemap +" "+ distancestage20[4] + distance);
			stage20map[1].html(mapStart +" "+ routestage20[0]);
			stage20map[2].html(mapFinish +" "+ routestage20[5]);
			stage20map[3].html(distancestage20[0]+ distance);
			stage20map[4].html(distancestage20[1]+ distance);
			stage20map[5].html(distancestage20[3]+ distance);
/* stage20 */


					$(".hrule hr").css({'color':'#CCCCCC','background-color':'#CCCCCC'});
         		}
         	}); // END XML

// MENU BUTTONS --------------------------------------------	
var clicked =0;
menuArray = []; //the array that will hold references to the buttons.

	for (var h = 0; h < 4; h++){
	var menuBtnSymbols = sym.getSymbol("styleMc").getSymbol("menuBtn" +h); // Create an instance element of a symbol as a child of the given parent element
	menuBtnSymbols.setVariable("menuId", h); //set the value of a Symbol variable
	menuArray.push(menuBtnSymbols); //push it into the array
}

$.each(menuArray, function( count, menuInTheArray ){ //a 'for each' loop through the newly populated array
	var menuBtnItem = $(menuInTheArray); //create jQuery reference to the item
	var menuBtnElement = menuInTheArray.getSymbolElement(); //create a jQuery reference to the DIV element inside the symbol
	//now you can bind interactivity to the menu items' DIVs
	menuBtnElement.bind ("click", {menuId:count}, menuBtnClick);
	menuBtnElement.bind ("mouseover", {menuId:count}, menuShow);
	menuBtnElement.bind ("mouseout", {menuId:count}, menuHide);
})
sym.getSymbol("styleMc").$("menuBtn3").unbind("click");

function resetmenu(){
	for (var h=0; h<4; h++){
		var resetmenu_arr = ["menuTxt0","menuTxt1","menuTxt2","menuTxt3"];
		$.each(resetmenu_arr, function(index, value) {
			sym.getSymbol("styleMc").$(value).fadeOut(0);
		});
		menuArray[h].$("btnClick").fadeOut(0);
		menuArray[h].$("btnOver").fadeOut(0);
	}
}
resetmenu();

function menuBtnClick (e){
		var menuMenu_id = (e.data.menuId); //get the id of the clicked item
		resetmenu(); //set them all back to normal state	
		sym.getSymbol("styleMc").getSymbol("menuBtn" + menuMenu_id).$("btnClick").fadeIn(0);
		sym.getSymbol("styleMc").$("menuTxt" + menuMenu_id).fadeIn(0);
		if (clicked!=menuMenu_id){
		sym.$("teamsMc").animate ({left:820}, {duration:400, complete:  function() { resetTeams(); }});
		sym.$("stageMc").animate ({left:510}, 400, 'easeOutCubic');
		sym.$("upBtn").animate ({top:610}, 0, 'easeOutCubic');
		sym.$("downBtn").animate ({top:610}, 0, 'easeOutCubic');
		sym.$("results").animate ({top:-610}, 400, 'easeOutCubic');
		}
		if (menuMenu_id==0) {
		clicked=0;
			sym.$("stageMc").animate ({left:0}, 550, 'easeOutCubic');
		}else if (menuMenu_id==1) {
			sym.$("teamsMc").animate ({left:500}, 400, 'easeOutCubic');
			sym.$("upBtn").delay(700).animate ({top:575}, 0, 'easeOutCubic');
			sym.$("downBtn").delay(700).animate ({top:575}, 0, 'easeOutCubic');
			sym.getSymbol("downBtn").$("btnOver").fadeOut(0);
			clicked=1;
		}else if (menuMenu_id==2) {
			clicked=2;
		}else if (menuMenu_id==3) {
			sym.$("results").animate ({top:50}, 400, 'easeOutCubic');
			clicked=3;
		}
	}
	function menuShow (e){
         	var menuMenu_id = (e.data.menuId); //get the id of the over button
         	sym.$('handMc').hide();
				sym.getSymbol("styleMc").getSymbol("menuBtn" + menuMenu_id).$("btnOver").fadeIn(0);
				sym.getSymbol("styleMc").$("menuTxt" + menuMenu_id).fadeIn(0);
	}
	function menuHide (e){
         	var menuMenu_id = (e.data.menuId); //get the id of the out button
				sym.getSymbol("styleMc").getSymbol("menuBtn" + menuMenu_id).$("btnOver").fadeOut(0);
				sym.getSymbol("styleMc").$("menuTxt" + menuMenu_id).fadeOut(0);
	}
	if (todayDate<startDate){
		sym.getSymbol("styleMc").getSymbol("menuBtn2").$("btnOver").fadeIn(0);
	}else{
		sym.getSymbol("styleMc").getSymbol("menuBtn0").$("btnOver").fadeIn(0);
	}
// STAGE BUTTONS --------------------------------------------	
// MAP BUTTON START
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("mapBtn").$("btnOver").fadeOut(0);
	sym.getSymbol("stageMc").$("profileSliderMc").animate ({top:-300}, 0);
	sym.getSymbol("stageMc").$("profileBgMc").animate ({top:-300}, 0);
	sym.getSymbol("stageMc").$("stagesHead").animate ({top:320}, 0, 'easeOutCubic');
	sym.getSymbol("stageMc").$("graph").animate ({top:373, height:192}, 0, 'easeOutCubic');

	sym.getSymbol("stageMc").getSymbol("stagesHead").$("mapBtn").click(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("mapBtn").$("btnClick").fadeIn(0);
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnClick").fadeOut(0);
	sym.getSymbol("stageMc").$("stagesHead").animate ({top:320}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("graph").animate ({top:373, height:192}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("profileSliderMc").animate ({top:-270}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("profileBgMc").animate ({top:-270}, 600, 'easeOutCubic');
	});
	sym.getSymbol("stageMc").getSymbol("stagesHead").$("mapBtn").mouseover(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("mapBtn").$("btnOver").fadeIn(0);
	});
	sym.getSymbol("stageMc").getSymbol("stagesHead").$("mapBtn").mouseout(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("mapBtn").$("btnOver").fadeOut(0);
	});

// PROFILE BUTTON START
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnClick").fadeOut(0);
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnOver").fadeOut(0);

	sym.getSymbol("stageMc").getSymbol("stagesHead").$("profBtn").click(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnClick").fadeIn(0);
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("mapBtn").$("btnClick").fadeOut(0);
	sym.getSymbol("stageMc").$("stagesHead").animate ({top:202}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("graph").animate ({top:255, height:310}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("profileSliderMc").animate ({top:-3}, 600, 'easeOutCubic');
	sym.getSymbol("stageMc").$("profileBgMc").animate ({top:-5}, 600, 'easeOutCubic');
	});
	sym.getSymbol("stageMc").getSymbol("stagesHead").$("profBtn").mouseover(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnOver").fadeIn(0);
	});
	sym.getSymbol("stageMc").getSymbol("stagesHead").$("profBtn").mouseout(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("profBtn").$("btnOver").fadeOut(0);
	});
// PROFILE BUTTON END

// ADD NUMBERS
	for (var x=0; x<21; x++){
		sym.getSymbol("routeMc").getSymbol("stageBtn"+x).$("txt").html(x+1)
	}
// SET STAGE PROFILE POSITIONS
	for (var p=0; p<21; p++){
		sym.getSymbol("stageMc").getSymbol("profileSliderMc").getSymbol("stageProfileMc").$("profileMc"+p).css({left:p*495});
	}

// SET STAGE MAP POSITIONS
	for (var m=0; m<21; m++){
		sym.getSymbol("stageMc").getSymbol("mapsSliderMc").getSymbol("stageMapMc").$("mapMc"+m).css({left:m*300});
	}

var resultChanger = function(stage){ //to handle lexical scope
							return function (e) {
							getClassification(stage);
						};
};

stageBtnArray = []; //the array that will hold references to the buttons.
         for (var s = 0; s < 21; s++){
         	 var stageBtnSymbols = sym.getSymbol("routeMc").getSymbol("stageBtn" +s); // Create an instance element of a symbol as a child of the given parent element
         	 stageBtnSymbols.setVariable("stageBtnId", s); //set the value of a Symbol variable
         	 stageBtnArray.push(stageBtnSymbols); //push it into the array
         }

         $.each(stageBtnArray, function( count, stageBtnInTheArray ){ //a 'for each' loop through the newly populated array
         	 var stageBtnItem = $(stageBtnInTheArray); //create jQuery reference to the item
         	 var stageBtnElement = stageBtnInTheArray.getSymbolElement(); //create a jQuery reference to the DIV element inside the symbol
         	 //now you can bind interactivity to the stageBtn items' DIVs
         	 stageBtnElement.bind ("click", {stageBtnId:count}, stageBtnClick);
         	 stageBtnElement.bind ("mouseover", {stageBtnId:count}, stageBtnShow);
         	 stageBtnElement.bind ("mouseout", {stageBtnId:count}, stageBtnHide);
         	})

	function resetstageBtn(){
		for (var s=0; s<21; s++){
         stageBtnArray[s].$("btnClick").fadeOut(0);
         stageBtnArray[s].$("btnOver").fadeOut(0);
         stageBtnArray[s].$("btnStart").fadeOut(0);
		}
	}
	resetstageBtn();

	function stageBtnClick (e){
		resetstageBtn(); //set them all back to normal state
		var stageBtn_id = (e.data.stageBtnId); //get the id of the clicked item
		sym.getSymbol("routeMc").getSymbol("stageBtn" + stageBtn_id).$("btnClick").fadeIn(0);
		sym.getSymbol("routeMc").$("stageBtnTxt" + stageBtn_id).fadeIn(0);

		resetmenu(); //set menu back to normal state	
		sym.getSymbol("styleMc").getSymbol("menuBtn0").$("btnClick").fadeIn(0);
		if (clicked!=0){
		sym.$("txt13").fadeIn(500);
		sym.$("teamsMc").animate ({left:820}, {duration:600, complete:  function() { resetTeams(); }});
		sym.$("stageMc").animate ({left:455}, 600, 'easeOutCubic');
		sym.$("upBtn").animate ({top:610}, 0, 'easeOutCubic');
		sym.$("downBtn").animate ({top:610}, 0, 'easeOutCubic');
		sym.$("results").animate ({top:-650}, 600, 'easeOutCubic');
		}
		sym.$("stageMc").animate ({left:0}, 600, 'easeOutCubic');
		clicked=0;
		for (var i=0; i<21; i++){
			if(i==stageBtn_id){
				if (i <2) {
					stagetxt0.text(stagestring[0]+" "+stagestring[i+1]+" - "+datestring[0]+" "+datestring[i+1]);
					stagetxt3.text(txt20+" "+datestring[0]+" "+datestring[i+1]);
				}else{
					stagetxt0.text(stagestring[0]+" "+stagestring[i+1]+" - "+datestring[22]+" "+datestring[i+1]);
					stagetxt3.text(txt20+" "+datestring[22]+" "+datestring[i+1]);
				}
         	stagetxt1.text(tablestring[2]);
         	sym.getSymbol("stageMc").getSymbol("mapsSliderMc").$("stageMapMc").stop().animate ({left:i*-300}, 900, 'easeOutCubic');
				sym.getSymbol("stageMc").getSymbol("profileSliderMc").$("stageProfileMc").stop().animate ({left:i*-495}, 900, 'easeOutCubic');
				todayStage=i;	
         	getClassification(stages[i]);
				}
		}
	}
	function stageBtnShow (e){
         	var stageBtn_id = (e.data.stageBtnId); //get the id of the over button
         	sym.$('handMc').hide();
				sym.getSymbol("routeMc").getSymbol("stageBtn" + stageBtn_id).$("btnOver").fadeIn(0);
	}
	function stageBtnHide (e){
         	var stageBtn_id = (e.data.stageBtnId); //get the id of the out button
				sym.getSymbol("routeMc").getSymbol("stageBtn" + stageBtn_id).$("btnOver").fadeOut(0);
	}

//----------------- TEAM BUTTONS ------------------------
teamBtnArray = []; //the array that will hold references to the buttons.
for (var h = 0; h < 5; h++){
         	 var teamBtnSymbols = sym.getSymbol("teamsMc").getSymbol("teamBtn" +h); // Create an instance element of a symbol as a child of the given parent element
         	 teamBtnSymbols.setVariable("teamBtnId", h); //set the value of a Symbol variable
         	 teamBtnArray.push(teamBtnSymbols); //push it into the array
         }

$.each(teamBtnArray, function( count, teamBtnInTheArray ){ //a 'for each' loop through the newly populated array
         	 var teamBtnItem = $(teamBtnInTheArray); //create jQuery reference to the item
         	 var teamBtnElement = teamBtnInTheArray.getSymbolElement(); //create a jQuery reference to the DIV element inside the symbol
         	 //now you can bind interactivity to the teamBtn items' DIVs
         	 teamBtnElement.bind ("click", {teamBtnId:count}, teamBtnClick);
         	 teamBtnElement.bind ("mouseover", {teamBtnId:count}, teamBtnShow);
         	 teamBtnElement.bind ("mouseout", {teamBtnId:count}, teamBtnHide);
         	})

	function resetteamBtn(){
		for (var h=0; h<5; h++){
      		teamBtnArray[h].$("btnClick").fadeOut(0);
		teamBtnArray[h].$("btnOver").fadeOut(0);
		}
	}
	resetteamBtn();

	function teamBtnClick (e){
		resetteamBtn(); //set them all back to normal state
		var teamBtn_id = (e.data.teamBtnId); //get the id of the clicked item
		sym.getSymbol("teamsMc").getSymbol("teamBtn" + teamBtn_id).$("btnClick").fadeIn(0);
		teamCount = teamBtn_id; // 
		teamClick();
		}
	function teamBtnShow (e){
         	var teamBtn_id = (e.data.teamBtnId); //get the id of the over button
         	sym.$('handMc').hide();
				sym.getSymbol("teamsMc").getSymbol("teamBtn" + teamBtn_id).$("btnOver").fadeIn(0);
	}
	function teamBtnHide (e){
         	var teamBtn_id = (e.data.teamBtnId); //get the id of the out button
				sym.getSymbol("teamsMc").getSymbol("teamBtn" + teamBtn_id).$("btnOver").fadeOut(0);
	}

// SET COUNTER	
	var panelCal = 0;
	var teamCount = 0;
	var teamPanel = 0;
	var boxCount = 17;
	var teamSlide = -510;

// TEAM UP/DOWN BTNS
	Symbol.bindElementAction(compId, symbolName, "${_downBtn}", "click", function(sym, e) {
	sym.$("handMc").fadeOut(0);
	teamPanel++;
	slideClick();
	sym.getSymbol("upBtn").$("btnOver").fadeOut(0);
	});
	Symbol.bindElementAction(compId, symbolName, "${_downBtn}", "mouseover", function(sym, e) {
	sym.getSymbol("downBtn").$("btnOver").fadeIn(200);
	});
	Symbol.bindElementAction(compId, symbolName, "${_downBtn}", "mouseout", function(sym, e) {
	sym.getSymbol("downBtn").$("btnOver").fadeOut(200);
	});

	Symbol.bindElementAction(compId, symbolName, "${_upBtn}", "click", function(sym, e) {
	sym.$("handMc").fadeOut(0);
	teamPanel--;
	slideClick();
	sym.getSymbol("downBtn").$("btnOver").fadeOut(0);
	});
	Symbol.bindElementAction(compId, symbolName, "${_upBtn}", "mouseover", function(sym, e) {
	sym.getSymbol("upBtn").$("btnOver").fadeIn(200);
	});
	Symbol.bindElementAction(compId, symbolName, "${_upBtn}", "mouseout", function(sym, e) {
	sym.getSymbol("upBtn").$("btnOver").fadeOut(200);
	});

	function slideClick(){
	resetteamBtn();
	sym.getSymbol("teamsMc").getSymbol("teamsSlider").$("teamsSlideClip").stop().animate ({top:teamPanel*teamSlide}, 600, 'easeOutCubic');
	sym.getSymbol("teamsMc").$("numbersBox").stop().animate ({left:teamPanel*boxCount}, 500, 'easeOutCubic');
	if (teamPanel == 0) {
			panelCal=0;
			sym.$("upBtn").fadeOut(0);
			sym.$("downBtn").fadeIn(0);
	}
	if (teamPanel == 1) {
			panelCal = 5;
			sym.$("upBtn").fadeIn(0);
			sym.$("downBtn").fadeIn(0);
	}
	if (teamPanel == 2) {
			panelCal = 10;
			sym.$("upBtn").fadeIn(0);
			sym.$("downBtn").fadeIn(0);
	}
	if (teamPanel == 3) {
			panelCal = 15;
			sym.$("upBtn").fadeIn(0);
			sym.$("downBtn").fadeIn(0);
	}
	if (teamPanel == 4) {
			panelCal = 20;
			sym.$("upBtn").fadeIn(0);
			sym.$("downBtn").fadeOut(0);
			sym.getSymbol("teamsMc").$("teamBtn2").fadeOut(0);
			sym.getSymbol("teamsMc").$("teamBtn3").fadeOut(0);
			sym.getSymbol("teamsMc").$("teamBtn4").fadeOut(0);
	}else{
			sym.getSymbol("teamsMc").$("teamBtn3").fadeIn(0);
			sym.getSymbol("teamsMc").$("teamBtn4").fadeIn(0);
	}
	}
	slideClick();

// ACTIONS FOR BUTTON CLICKS
	function teamClick(){
		$.ajax({	
         	type: "GET",
         	url: "GN30685.xml",
         	dataType: "xml",
         	success: function(xml) {
				country = $(xml).find('country' + (teamCount+panelCal)).text();
				countrytxt.html(country);
				name = $(xml).find('name' + (teamCount+panelCal)).text();
				nametxt.html(name + country);
				riders = $(xml).find('riders' + (teamCount+panelCal)).text();
				riderstxt.html(riders);
				}
		});
		var team_arr = ["SKY","CAN","LTB","BMC","RLT","EUC","AST","FDJ","ALM","TST","KAT","EUS","MOV","COF","LAM","OPQ","BEL","GRS","OGE","ARG","VCD","SOJ"];// HIDE/SHOW TEAM IMAGES + TEXT		
		sym.getSymbol("teamsMc").$("teamJersey").fadeOut(0);
		sym.getSymbol("teamsMc").$("teamJersey").attr('src','teams/'+team_arr[teamCount+panelCal]+'.jpg');
		sym.getSymbol("teamsMc").$("teamJersey").fadeIn(500);
	}
	teamClick();

	// RESET TEAMS
		function resetTeams(){
		panelCal = 0;
		teamCount = 0;
		teamPanel = 0;
		slideClick();
		teamClick();
		sym.getSymbol("teamsMc").getSymbol("teamBtn0").$("btnClick").fadeIn(0);
		sym.getSymbol("downBtn").$("btnOver").fadeOut(0);
		}

//LIVE DATA
function resetPhases(){
	for (var i=0;i<21;i++){
		sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").fadeOut(0);
	}
	sym.getSymbol("results").getSymbol("classificationsBtn").$("tab").css({'background-color':'rgb(206,206,206)'});
	sym.getSymbol("results").getSymbol("classificationsBtn").$("phaseTxt").css({'color':'rgb(100,100,100)'});
}
resetPhases();
var phaseClicker = function(stage,number){ //to handle lexical scope
							return function (e) {
							getPhase(stage);
							for (var i=0;i<21;i++){
								if (i==number){
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("tab").css({'background-color':'rgb(255,255,255)'});
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").css({'color':'rgb(0,0,0)'});
									txt17txt.text(resultstring0[0]+" "+stagestring[i+1]);
								}else{
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("tab").css({'background-color':'rgb(206,206,206)'});
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").css({'color':'rgb(100,100,100)'});
								}
							}
							sym.getSymbol("results").$("leadTeam").fadeIn(0);
							sym.getSymbol("results").getSymbol("classificationsBtn").$("tab").css({'background-color':'rgb(206,206,206)'});
							sym.getSymbol("results").getSymbol("classificationsBtn").$("phaseTxt").css({'color':'rgb(100,100,100)'});
						};
};
var classClicker = function(stage,id){ //to handle lexical scope
							return function (e) {
							getPhase(stage,id);
							sym.getSymbol("results").$("leadTeam").fadeOut(0);
							for (var i=0;i<21;i++){
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("tab").css({'background-color':'rgb(206,206,206)'});
									sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").css({'color':'rgb(100,100,100)'});								
							}
							for (i=0;i<5;i++){
									if (i==id){
										sym.getSymbol("results").getSymbol("classBtn"+i).$("classTxt").css({'font-weight':700,'color':'rgb(0,0,0)'});
										sym.getSymbol("results").$("classBtn"+i).css({'border':'solid 1px rgb(255,0,0)'});
										txt17txt.text(resultstring0[i+1]);

									}else{
										sym.getSymbol("results").getSymbol("classBtn"+i).$("classTxt").css({'font-weight':400,'color':'rgb(100,100,100)'});
										sym.getSymbol("results").$("classBtn"+i).css({'border':'solid 1px rgb(255,255,255)'});
									}								
							}
							sym.getSymbol("results").getSymbol("classificationsBtn").$("tab").css({'background-color':'rgb(255,255,255)'});
							sym.getSymbol("results").getSymbol("classificationsBtn").$("phaseTxt").css({'color':'rgb(0,0,0)'});
						};
};
//var thisStage;
var classifications=[800973,871686,871687,871688,871690];
var dataURL = ('http:'==document.location.protocol?"http://www2.graphicnews.com/":"https://www.graphicnews.org/")+ "infostradasports/api.php";
//GET race stage list data
function getRace(){
	$.ajax({ type: "GET", 
					url: dataURL,
               data: "gn=30685&type=cycling&yr=2013&q=stages",
               contentType: "text/plain", dataType: "jsonp", jsonp: "callback",
               async: true,
               crossDomain: true,
               success: function (data) {
               sym.getSymbol("styleMc").$("menuBtn3").unbind('click');
					sym.getSymbol("results").$("classificationsBtn").unbind();
					for (var c=0;c<5;c++){
					sym.getSymbol("results").$("classBtn"+c).unbind();
					}
for (var i=0; i<21; i++){
	sym.getSymbol("results").$("phaseBtn"+i).unbind();											
	var thisStage=data[i].n_PhaseID;
	if(data[i].b_Finished==true){
		if(data[i].b_Current==true){
			todayStage=i;
		}
		if (data[i].b_Started==true){
			todayStage=i;
			sym.getSymbol("results").$("phaseBtn"+i).click(phaseClicker(thisStage,i)); //bind to stage button
			sym.getSymbol("results").$("phaseBtn"+i).css({'cursor':'pointer'});
			sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").fadeIn(0);
			sym.getSymbol("results").getSymbol("phaseBtn"+i).$("phaseTxt").css({'color':'rgb(100,100,100)'});
		}	
		sym.getSymbol("styleMc").$("menuBtn3").bind ("click", {menuId:3}, menuBtnClick);
		}	
	}
	var latestStage=data[todayStage].n_PhaseID;
	sym.getSymbol("styleMc").$("menuBtn3").bind ("click", getPhase(latestStage));
	if(data[todayStage].n_PointsClassificationID>0){ //if any points have been awarded									
		sym.getSymbol("results").$("classBtn1").click(classClicker(classifications[1],1));							  
	}
	if(data[todayStage].n_MountainClassificationID>0){ //if any mountain points have been awarded
		sym.getSymbol("results").$("classBtn2").click(classClicker(classifications[2],2));	
	}
	sym.getSymbol("results").getSymbol("phaseBtn"+todayStage).$("tab").css({'background-color':'rgb(255,255,255)'});
	sym.getSymbol("results").getSymbol("phaseBtn"+todayStage).$("phaseTxt").css({'color':'rgb(0,0,0)'});
	txt17txt.text(resultstring0[0]+" "+stagestring[todayStage+1]);
	sym.getSymbol("routeMc").getSymbol("stageBtn" + todayStage).$("btnClick").fadeIn(0);
	sym.getSymbol("stageMc").getSymbol("mapsSliderMc").$("stageMapMc").css({'left':todayStage*-300});
	sym.getSymbol("stageMc").getSymbol("profileSliderMc").$("stageProfileMc").css({'left':todayStage*-495});
	if (todayStage <2) {
		stagetxt0.text(stagestring[0]+" "+stagestring[todayStage+1]+" - "+datestring[0]+" "+datestring[todayStage+1]);
		stagetxt3.text(txt20+" "+datestring[0]+" "+datestring[todayStage+1]);
	}else{
		stagetxt0.text(stagestring[0]+" "+stagestring[todayStage+1]+" - "+datestring[22]+" "+datestring[todayStage+1]);
		stagetxt3.text(txt20+" "+datestring[22]+" "+datestring[todayStage+1]);
	}
	sym.getSymbol("results").$("classificationsBtn").click(classClicker(classifications[0],0));//bind classification buttons
	sym.getSymbol("results").$("classificationsBtn").css({'cursor':'pointer'});
	sym.getSymbol("results").$("classBtn0").click(classClicker(classifications[0],0));
	sym.getSymbol("results").$("classBtn3").click(classClicker(classifications[3],3));
	sym.getSymbol("results").$("classBtn4").click(classClicker(classifications[4],4));
	getClassification(800973);									
					}
       });
}
getRace();
intervalId = setInterval(getRace,300000);

function getClassification(stageID){
$.ajax({ type: "GET", 
					url: dataURL,
               data: "gn=30685&yr=2013&stage="+stageID,
               contentType: "text/plain", dataType: "jsonp", jsonp: "callback",
               async: true,
               crossDomain: true,
               success: function (data) {
						var classData = data;
						sym.getSymbol("stageMc").$("graph").empty();					
						for (var i = 0; i < classData.length; i++) {
							//create graph for each rider and for final results
							var tableText ="<div class='race'><div id='riderdata"+i+"'><table style='width:100%; border:none; border-collapse:collapse; padding:0; margin:0'><tr><td id='rank"+i+"' width='30px'></td><td id='rider"+i+"'width='110px'></td><td id='team"+i+"' style='font-style:italic' width='50px'></td><td id='time"+i+"'></td></tr></table></div></div>";
							sym.getSymbol("stageMc").$("graph").append(tableText);
							$('#rank' + i).text(classData[i].c_Rank);
							$('#rider' + i).text(classData[i].c_ParticipantShort);
							$('#team' + i).text(classData[i].c_TeamShort);
							if(classData[i].c_Result!=null){
							$('#time' + i).text(classData[i].c_Result);
							}else{
							$('#time' + i).text("");
							}
						$(".race").css({'font-size':'13px', 'font-family':'pragmatica-web, sans-serif', 'width':'98%'});
						if (i==0){
						$('#rider' + i).css({'font-weight':'bold'});
						}
						if (i%2==0){
								$("#riderdata" + i).css({'background-color':'rgb(213,218,224)','padding-left':'3px', 'border-top':'solid 1px rgb(255,255,255)','border-bottom':'solid 1px rgb(150,150,150)'});
						}else{
								$("#riderdata" + i).css({'background-color':'rgb(239,239,239)','padding-left':'3px', 'border-top':'solid 1px rgb(255,255,255)','border-bottom':'solid 1px rgb(150,150,150)'});							
						}
						$("#team" + i).css({'text-align':'center','background-color':'rgb(255,255,255)'});
						$("#time" + i).css({'text-align':'right', 'padding-right':'5px'});
						}
						},
						error: function(){
						sym.getSymbol("stageMc").$("graph").empty();					
						}
	});
}
function getPhase(stageID,classID){
$.ajax({ type: "GET", 
					url: dataURL,
               data: "gn=30685&yr=2013&stage="+stageID,
               contentType: "text/plain", dataType: "jsonp", jsonp: "callback",
               async: true,
               crossDomain: true,
               success: function (data) {                
						var raceStage = data;
						var scale;
						if (classID==1||classID==2){
							var max = raceStage[0].n_Points;
							var minTime = (max!=null) ? max : 0;
								for (var n=0; n<raceStage.length; n++) {
									if (raceStage[n].n_Points!=null && raceStage[n].n_Points<minTime) {
									minTime = raceStage[n].n_Points;
									}
									if (raceStage[n].n_Points!=null && raceStage[n].n_Points>max) {
									max = raceStage[n].n_Points;									
									}
								}								
						}else{
							var minTime = raceStage[0].n_TimeAbs;
							var max = (minTime!=null) ? minTime : 0;
								for (var n=0; n<raceStage.length; n++) {
									if (raceStage[n].n_TimeAbs!=null && raceStage[n].n_TimeAbs>max) {
									max = raceStage[n].n_TimeAbs;
									}
									if (raceStage[n].n_TimeAbs!=null && raceStage[n].n_TimeAbs<minTime) {
									minTime = raceStage[n].n_TimeAbs;									
									}
								}						
						}
						sym.getSymbol("results").$("table").empty();
							for (var i = 0; i < raceStage.length; i++) {
								var stageText ="<div class='stg'><div id='stgdata"+i+"'><table style='width:100%; border:none; border-collapse:collapse; padding:0; margin:0'><tr><td id='stgrank"+i+"' width='35px'></td><td id='stgrider"+i+"' width='180px'></td><td id='stgflag"+i+"' width='30px'></td><td id='stgteam"+i+"' style='font-style:italic' width='50px'></td><td id='stgtime"+i+"'></td></tr></table></div></div>";
								if (classID==1||classID==2){								
									if (max==minTime && raceStage[i].n_Points==max) {
										scale=100;
									}else if(raceStage[i].n_Points==null){
										scale=59;
									}else{
										scale = 59+((raceStage[i].n_Points-minTime)*41/(max-minTime));
									}
								}else{
								if (minTime==max && raceStage[i].n_TimeAbs==max) {	//if minTime=mxm=item Time that means that there is just 1 item with valid time. show this graph as max
										scale=100;
									}else if(raceStage[i].n_TimeAbs==null){
										scale=59;
									}else{
										scale = 100-((raceStage[i].n_TimeAbs-minTime)*41/(max-minTime));
									}
								}
								sym.getSymbol("results").$("table").append(stageText);
								$('#stgrank' + i).text(raceStage[i].c_Rank);
								$('#stgrider' + i).text(raceStage[i].c_Participant);
								$('#stgteam' + i).text(raceStage[i].c_TeamShort);
								$('#stgflag' + i).text(raceStage[i].c_NOCShort);
								if(raceStage[i].c_Result!=null){
									$('#stgtime' + i).text(raceStage[i].c_Result);
								}else{
									$('#stgtime' + i).text("");
								}
								$(".stg").css({'font-size':'13px', 'font-family':'pragmatica-web, sans-serif', 'width':'99%'});
								if (i==0){
									$('#stgrider' + i).css({'font-weight':'bold'});
								}
								if (i%2==0){
									$("#stgdata" + i).css({'width':scale+'%','background-color':'rgb(213,218,224)','padding-left':'3px', 'border-top':'solid 1px rgb(255,255,255)','border-bottom':'solid 1px rgb(150,150,150)'});
								}else{
									$("#stgdata" + i).css({'width':scale+'%','background-color':'rgb(239,239,239)','padding-left':'3px', 'border-top':'solid 1px rgb(255,255,255)','border-bottom':'solid 1px rgb(150,150,150)'});							
								}
								$("#stgteam" + i).css({'text-align':'center','background-color':'rgb(255,255,255)'});
								$("#stgtime" + i).css({'text-align':'right', 'padding-right':'5px'});

						}
						var leadTeamShort=raceStage[0].c_TeamShort;
						var leadTeam=raceStage[0].c_Team;
						sym.getSymbol("results").getSymbol("leadTeam").$("leadJersey").attr('src','teams/'+leadTeamShort+'.jpg');
						sym.getSymbol("results").getSymbol("leadTeam").$("leadTeamTxt").text(leadTeam);
               }
			});
}

//LEFT RIGHT STAGE BUTTONS
function changeStage(){
		//stagetxt0.text(stagestring[0]+" "+stagestring[todayStage+1]+" - "+datestring[0]+" "+datestring[todayStage+1]);
		if (todayStage <2) {
			stagetxt0.text(stagestring[0]+" "+stagestring[todayStage+1]+" - "+datestring[0]+" "+datestring[todayStage+1]);
			stagetxt3.text(txt20+" "+datestring[0]+" "+datestring[todayStage+1]);
		}else{
			stagetxt0.text(stagestring[0]+" "+stagestring[todayStage+1]+" - "+datestring[22]+" "+datestring[todayStage+1]);
			stagetxt3.text(txt20+" "+datestring[22]+" "+datestring[todayStage+1]);
		}
      stagetxt1.text(tablestring[2]);
      resetstageBtn();
		sym.getSymbol("routeMc").getSymbol("stageBtn" + (todayStage)).$("btnClick").fadeIn(0);
      sym.getSymbol("stageMc").getSymbol("mapsSliderMc").$("stageMapMc").stop().animate ({left:todayStage*-300}, 900, 'easeOutCubic');
		sym.getSymbol("stageMc").getSymbol("profileSliderMc").$("stageProfileMc").stop().animate ({left:todayStage*-495}, 900, 'easeOutCubic');
		setTimeout(function() { getClassification(stages[todayStage]); }, 2000);

}
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageRight").click(function(){
		if (todayStage<20){
		todayStage++;
		changeStage();
      }
	});
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageRight").mouseover(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageRight").$("btnOver").fadeIn(0);
	});
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageRight").mouseout(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageRight").$("btnOver").fadeOut(0);
	});	
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageLeft").click(function(){
		if (todayStage>0){		
			todayStage--;
			changeStage();
			}
		});
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageLeft").mouseover(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageLeft").$("btnOver").fadeIn(0);
	});
sym.getSymbol("stageMc").getSymbol("stagesHead").$("stageLeft").mouseout(function(){
	sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageLeft").$("btnOver").fadeOut(0);
	});
sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageLeft").$("btnOver").fadeOut(0);
sym.getSymbol("stageMc").getSymbol("stagesHead").getSymbol("stageRight").$("btnOver").fadeOut(0);


         	});//Edge binding end	
		
		// VIDEO BTN 1 =========================================================
         	
			
         	
         		
         	
			
			
         	// VIDEO BTN 2 =========================================================
         	
         	
         	
         		
         	
         	


   })("stage");
   //Edge symbol end:'stage'

//=========================================================
   //Edge symbol: 'handMc'
   (function(symbolName) {

   })("handMc");
   //Edge symbol end:'handMc'

   //=========================================================
   
   //Edge symbol: 'menuBtn'
   (function(symbolName) {   
   
   })("menuBtn");
   //Edge symbol end:'menuBtn'

   //=========================================================
   
   //Edge symbol: 'rollBtn'
   (function(symbolName) {   
   
   })("rollBtn");
   //Edge symbol end:'rollBtn'

   //=========================================================
   
   //Edge symbol: 'rollBtn_1'
   (function(symbolName) {   
   
   })("rollBtn_1");
   //Edge symbol end:'rollBtn_1'

   //=========================================================
   
   //Edge symbol: 'baseBar'
   (function(symbolName) {   
   
   })("baseBar");
   //Edge symbol end:'baseBar'

   //=========================================================
   
   //Edge symbol: 'teamsMc'
   (function(symbolName) {   
   
   })("teamsMc");
   //Edge symbol end:'teamsMc'

   //=========================================================
   
   //Edge symbol: 'numbersTop'
   (function(symbolName) {   
   
   })("numbersTop");
   //Edge symbol end:'numbersTop'

   //=========================================================
   
   //Edge symbol: 'teams5Mc'
   (function(symbolName) {   
   
   })("teams5Mc");
   //Edge symbol end:'teams5Mc'

   //=========================================================
   
   //Edge symbol: 'team4Mc'
   (function(symbolName) {   
   
   })("team4Mc");
   //Edge symbol end:'team4Mc'

   //=========================================================
   
   //Edge symbol: 'teams3Mc'
   (function(symbolName) {   
   
   })("teams3Mc");
   //Edge symbol end:'teams3Mc'

   //=========================================================
   
   //Edge symbol: 'teams2Mc'
   (function(symbolName) {   
   
   })("teams2Mc");
   //Edge symbol end:'teams2Mc'

   //=========================================================
   
   //Edge symbol: 'teams1Mc'
   (function(symbolName) {   
   
   })("teams1Mc");
   //Edge symbol end:'teams1Mc'

   //=========================================================
   
   //Edge symbol: 'menuBtn_1'
   (function(symbolName) {   
   
      })("teamBtn");
   //Edge symbol end:'teamBtn'

   //=========================================================
   
   //Edge symbol: 'teamsSlider'
   (function(symbolName) {   
   
   })("teamsSlider");
   //Edge symbol end:'teamsSlider'

   //=========================================================
   
   //Edge symbol: 'teamSlideBtn'
   (function(symbolName) {   
   
   })("teamSlideBtn");
   //Edge symbol end:'teamSlideBtn'

   //=========================================================
   
   //Edge symbol: 'teamsSlideClip'
   (function(symbolName) {   
   
   })("teamsSlideClip");
   //Edge symbol end:'teamsSlideClip'

   //=========================================================
   
   //Edge symbol: 'ResultsMc'
   (function(symbolName) {   
   
   })("ResultsMc");
   //Edge symbol end:'ResultsMc'

   //=========================================================
   
   //Edge symbol: 'phaseBtn1'
   (function(symbolName) {   
   
   })("phaseBtn1");
   //Edge symbol end:'phaseBtn1'

   //=========================================================
   
   //Edge symbol: 'phaseBtn2'
   (function(symbolName) {   
   
   })("phaseBtn2");
   //Edge symbol end:'phaseBtn2'

   //=========================================================
   
   //Edge symbol: 'phaseBtn3'
   (function(symbolName) {   
   
   })("phaseBtn3");
   //Edge symbol end:'phaseBtn3'

   //=========================================================
   
   //Edge symbol: 'phaseBtn4'
   (function(symbolName) {   
   
   })("phaseBtn4");
   //Edge symbol end:'phaseBtn4'

   //=========================================================
   
   //Edge symbol: 'phaseBtn5'
   (function(symbolName) {   
   
   })("phaseBtn5");
   //Edge symbol end:'phaseBtn5'

   //=========================================================
   
   //Edge symbol: 'phaseBtn6'
   (function(symbolName) {   
   
   })("phaseBtn6");
   //Edge symbol end:'phaseBtn6'

   //=========================================================
   
   //Edge symbol: 'phaseBtn7'
   (function(symbolName) {   
   
   })("phaseBtn7");
   //Edge symbol end:'phaseBtn7'

   //=========================================================
   
   //Edge symbol: 'phaseBtn8'
   (function(symbolName) {   
   
   })("phaseBtn8");
   //Edge symbol end:'phaseBtn8'

   //=========================================================
   
   //Edge symbol: 'phaseBtn9'
   (function(symbolName) {   
   
   })("phaseBtn9");
   //Edge symbol end:'phaseBtn9'

   //=========================================================
   
   //Edge symbol: 'phaseBtn10'
   (function(symbolName) {   
   
   })("phaseBtn10");
   //Edge symbol end:'phaseBtn10'

   //=========================================================
   
   //Edge symbol: 'phaseBtn11'
   (function(symbolName) {   
   
   })("phaseBtn11");
   //Edge symbol end:'phaseBtn11'

   //=========================================================
   
   //Edge symbol: 'phaseBtn12'
   (function(symbolName) {   
   
   })("phaseBtn12");
   //Edge symbol end:'phaseBtn12'

   //=========================================================
   
   //Edge symbol: 'phaseBtn13'
   (function(symbolName) {   
   
   })("phaseBtn13");
   //Edge symbol end:'phaseBtn13'

   //=========================================================
   
   //Edge symbol: 'phaseBtn14'
   (function(symbolName) {   
   
   })("phaseBtn14");
   //Edge symbol end:'phaseBtn14'

   //=========================================================
   
   //Edge symbol: 'phaseBtn15'
   (function(symbolName) {   
   
   })("phaseBtn15");
   //Edge symbol end:'phaseBtn15'

   //=========================================================
   
   //Edge symbol: 'phaseBtn16'
   (function(symbolName) {   
   
   })("phaseBtn16");
   //Edge symbol end:'phaseBtn16'

   //=========================================================
   
   //Edge symbol: 'phaseBtn17'
   (function(symbolName) {   
   
   })("phaseBtn17");
   //Edge symbol end:'phaseBtn17'

   //=========================================================
   
   //Edge symbol: 'phaseBtn18'
   (function(symbolName) {   
   
   })("phaseBtn18");
   //Edge symbol end:'phaseBtn18'

   //=========================================================
   
   //Edge symbol: 'phaseBtn19'
   (function(symbolName) {   
   
   })("phaseBtn19");
   //Edge symbol end:'phaseBtn19'

   //=========================================================
   
   //Edge symbol: 'phaseBtn20'
   (function(symbolName) {   
   
   })("phaseBtn20");
   //Edge symbol end:'phaseBtn20'

   //=========================================================
   
   //Edge symbol: 'phaseBtn21'
   (function(symbolName) {   
   
   })("phaseBtn21");
   //Edge symbol end:'phaseBtn21'

   //=========================================================
   
   //Edge symbol: 'ClassificationsBtn'
   (function(symbolName) {   
   
   })("ClassificationsBtn");
   //Edge symbol end:'ClassificationsBtn'

   //=========================================================
   
   //Edge symbol: 'GeneralBtn'
   (function(symbolName) {   
   
   })("GeneralBtn");
   //Edge symbol end:'GeneralBtn'

   //=========================================================
   
   //Edge symbol: 'PointsBtn'
   (function(symbolName) {   
   
   })("PointsBtn");
   //Edge symbol end:'PointsBtn'

   //=========================================================
   
   //Edge symbol: 'MountainBtn'
   (function(symbolName) {   
   
   })("MountainBtn");
   //Edge symbol end:'MountainBtn'

   //=========================================================
   
   //Edge symbol: 'YouthBtn'
   (function(symbolName) {   
   
   })("YouthBtn");
   //Edge symbol end:'YouthBtn'

   //=========================================================
   
   //Edge symbol: 'TeamBtn'
   (function(symbolName) {   
   
   })("TeamBtn");
   //Edge symbol end:'TeamBtn'

   //=========================================================
   
   //Edge symbol: 'Preloader'
   (function(symbolName) {   
   
   })("Preloader");
   //Edge symbol end:'Preloader'

   //=========================================================
   
   //Edge symbol: 'leadTeam'
   (function(symbolName) {   
   
   })("LeadTeam");
   //Edge symbol end:'LeadTeam'

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'profBtn'
   (function(symbolName) {   
   
   })("profBtn");
   //Edge symbol end:'profBtn'

   //=========================================================
   
   //Edge symbol: 'stagesHead'
   (function(symbolName) {   
   
   })("stagesHead");
   //Edge symbol end:'stagesHead'

   //=========================================================
   
   //Edge symbol: 'mapBtn'
   (function(symbolName) {   
   
   })("mapBtn");
   //Edge symbol end:'mapBtn'

   //=========================================================
   
   //Edge symbol: 'StageMc'
   (function(symbolName) {   
   
   })("StageMc");
   //Edge symbol end:'StageMc'

   //=========================================================
   
   //Edge symbol: 'profileMc'
   (function(symbolName) {   
   
   })("profileMc");
   //Edge symbol end:'profileMc'

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'teamSlideBtn'
   (function(symbolName) {   
   
   })("teamSlideBtn1");
   //Edge symbol end:'teamSlideBtn1'

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'teamSlideBtn_2'
   (function(symbolName) {   
   
      })("teamSlideBtn2");
   //Edge symbol end:'teamSlideBtn2'

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'mapMc9_8'
   (function(symbolName) {   
   
      })("mapMc18");
   //Edge symbol end:'mapMc18'

   //=========================================================
   
   //Edge symbol: 'mapMc2_1'
   (function(symbolName) {   
   
      })("mapMc3");
   //Edge symbol end:'mapMc3'

   //=========================================================
   
   //Edge symbol: 'mapMc8_1'
   (function(symbolName) {   
   
      })("mapMc9");
   //Edge symbol end:'mapMc9'

   //=========================================================
   
   //Edge symbol: 'mapMc4_1'
   (function(symbolName) {   
   
      })("mapMc5");
   //Edge symbol end:'mapMc5'

   //=========================================================
   
   //Edge symbol: 'mapMc9_6'
   (function(symbolName) {   
   
      })("mapMc16");
   //Edge symbol end:'mapMc16'

   //=========================================================
   
   //Edge symbol: 'mapMc9_4'
   (function(symbolName) {   
   
      })("mapMc14");
   //Edge symbol end:'mapMc14'

   //=========================================================
   
   //Edge symbol: 'mapMc5_1'
   (function(symbolName) {   
   
      })("mapMc6");
   //Edge symbol end:'mapMc6'

   //=========================================================
   
   //Edge symbol: 'stageMapMc'
   (function(symbolName) {   
   
   })("stageMapMc");
   //Edge symbol end:'stageMapMc'

   //=========================================================
   
   //Edge symbol: 'mapMc3_1'
   (function(symbolName) {   
   
      })("mapMc4");
   //Edge symbol end:'mapMc4'

   //=========================================================
   
   //Edge symbol: 'mapMc1_1'
   (function(symbolName) {   
   
      })("mapMc1");
   //Edge symbol end:'mapMc1'

   //=========================================================
   
   //Edge symbol: 'mapsSliderMc'
   (function(symbolName) {   
   
   })("mapsSliderMc");
   //Edge symbol end:'mapsSliderMc'

   //=========================================================
   
   //Edge symbol: 'mapMc9_5'
   (function(symbolName) {   
   
      })("mapMc15");
   //Edge symbol end:'mapMc15'

   //=========================================================
   
   //Edge symbol: 'mapMc6_1'
   (function(symbolName) {   
   
      })("mapMc7");
   //Edge symbol end:'mapMc7'

   //=========================================================
   
   //Edge symbol: 'mapMc1_1'
   (function(symbolName) {   
   
      })("mapMc2");
   //Edge symbol end:'mapMc2'

   //=========================================================
   
   //Edge symbol: 'mapMc7_1'
   (function(symbolName) {   
   
      })("mapMc8");
   //Edge symbol end:'mapMc8'

   //=========================================================
   
   //Edge symbol: 'mapMc9_2'
   (function(symbolName) {   
   
      })("mapMc12");
   //Edge symbol end:'mapMc12'

   //=========================================================
   
   //Edge symbol: 'mapMc19_1'
   (function(symbolName) {   
   
      })("mapMc20");
   //Edge symbol end:'mapMc20'

   //=========================================================
   
   //Edge symbol: 'mapMc9_7'
   (function(symbolName) {   
   
      })("mapMc17");
   //Edge symbol end:'mapMc17'

   //=========================================================
   
   //Edge symbol: 'mapMc9_10'
   (function(symbolName) {   
   
      })("mapMc11");
   //Edge symbol end:'mapMc11'

   //=========================================================
   
   //Edge symbol: 'mapMc9_3'
   (function(symbolName) {   
   
      })("mapMc13");
   //Edge symbol end:'mapMc13'

   //=========================================================
   
   //Edge symbol: 'map1Mc'
   (function(symbolName) {   
   
   })("mapMc0");
   //Edge symbol end:'mapMc0'

   //=========================================================
   
   //Edge symbol: 'mapMc9_9'
   (function(symbolName) {   
   
      })("mapMc19");
   //Edge symbol end:'mapMc19'

   //=========================================================
   
   //Edge symbol: 'mapMc9_1'
   (function(symbolName) {   
   
      })("mapMc10");
   //Edge symbol end:'mapMc10'

   //=========================================================

   //=========================================================
   
   //Edge symbol: 'profileMc2_1'
   (function(symbolName) {   
   
      })("profileMc3");
   //Edge symbol end:'profileMc3'

   //=========================================================
   
   //Edge symbol: 'profileMc3_1'
   (function(symbolName) {   
   
      })("profileMc4");
   //Edge symbol end:'profileMc4'

   //=========================================================
   
   //Edge symbol: 'profileMc4_1'
   (function(symbolName) {   
   
      })("profileMc5");
   //Edge symbol end:'profileMc5'

   //=========================================================
   
   //Edge symbol: 'profileMc5_9'
   (function(symbolName) {   
   
      })("profileMc8");
   //Edge symbol end:'profileMc8'

   //=========================================================
   
   //Edge symbol: 'profileMc1'
   (function(symbolName) {   
   
   })("profileMc0");
   //Edge symbol end:'profileMc0'

   //=========================================================
   
   //Edge symbol: 'profileMc15_3'
   (function(symbolName) {   
   
      })("profileMc18");
   //Edge symbol end:'profileMc18'

   //=========================================================
   
   //Edge symbol: 'profileMc'
   (function(symbolName) {   
   
   })("profileAllMc");
   //Edge symbol end:'profileAllMc'

   //=========================================================
   
   //Edge symbol: 'profileMc5_10'
   (function(symbolName) {   
   
      })("profileMc7");
   //Edge symbol end:'profileMc7'

   //=========================================================
   
   //Edge symbol: 'profileMc5_6'
   (function(symbolName) {   
   
      })("profileMc13");
   //Edge symbol end:'profileMc13'

   //=========================================================
   
   //Edge symbol: 'profileMc5_5'
   (function(symbolName) {   
   
      })("profileMc12");
   //Edge symbol end:'profileMc12'

   //=========================================================
   
   //Edge symbol: 'profileMc1_1'
   (function(symbolName) {   
   
   })("profileMc1");
   //Edge symbol end:'profileMc1'

   //=========================================================
   
   //Edge symbol: 'profileMc5_8'
   (function(symbolName) {   
   
      })("profileMc15");
   //Edge symbol end:'profileMc15'

   //=========================================================
   
   //Edge symbol: 'profileMc15_4'
   (function(symbolName) {   
   
      })("profileMc20");
   //Edge symbol end:'profileMc20'

   //=========================================================
   
   //Edge symbol: 'profileMc5_1'
   (function(symbolName) {   
   
      })("profileMc6");
   //Edge symbol end:'profileMc6'

   //=========================================================
   
   //Edge symbol: 'profileMc5_4'
   (function(symbolName) {   
   
      })("profileMc10");
   //Edge symbol end:'profileMc10'

   //=========================================================
   
   //Edge symbol: 'profileSliderMc'
   (function(symbolName) {   
   
   })("profileSliderMc");
   //Edge symbol end:'profileSliderMc'

   //=========================================================
   
   //Edge symbol: 'profileMc5_2'
   (function(symbolName) {   
   
      })("profileMc9");
   //Edge symbol end:'profileMc9'

   //=========================================================
   
   //Edge symbol: 'profileMc15_5'
   (function(symbolName) {   
   
      })("profileMc19");
   //Edge symbol end:'profileMc19'

   //=========================================================
   
   //Edge symbol: 'profileMc1_1'
   (function(symbolName) {   
   
   })("profileMc2");
   //Edge symbol end:'profileMc2'

   //=========================================================
   
   //Edge symbol: 'profileMc5_7'
   (function(symbolName) {   
   
      })("profileMc14");
   //Edge symbol end:'profileMc14'

   //=========================================================
   
   //Edge symbol: 'profileMc15_2'
   (function(symbolName) {   
   
      })("profileMc17");
   //Edge symbol end:'profileMc17'

   //=========================================================
   
   //Edge symbol: 'profileMc5_3'
   (function(symbolName) {   
   
      })("profileMc11");
   //Edge symbol end:'profileMc11'

   //=========================================================
   
   //Edge symbol: 'profileMc15_1'
   (function(symbolName) {   
   
      })("profileMc16");
   //Edge symbol end:'profileMc16'

   //=========================================================
   
   //Edge symbol: 'styleMc_1'
   (function(symbolName) {   
   
   })("styleMc");
   //Edge symbol end:'styleMc'

   //=========================================================
   
   //Edge symbol: 'menuBtn_1'
   (function(symbolName) {   
   
   })("menuBtn_1");
   //Edge symbol end:'menuBtn_1'

   //=========================================================
   
   //Edge symbol: 'courseMc'
   (function(symbolName) {   
   
   })("courseMc");
   //Edge symbol end:'courseMc'

   //=========================================================
   
   //Edge symbol: 'stageBtn_1'
   (function(symbolName) {   
   
   })("stageBtn");
   //Edge symbol end:'stageBtn'

})(jQuery, AdobeEdge, "GraphicNews30685");