function MM_timelinePlay(tmLnName, myID) { //v1.2
  //Copyright 1997 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
  //Copyright 1997 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (numGotos != null)
    if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
    else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
  jmpFwd = (fNew > tmLn.curFrame);
  for (i = 0; i < tmLn.length; i++) {
    sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back
    if (sprite.charAt(0) == "s") {
      numKeyFr = sprite.keyFrames.length;
      firstKeyFr = sprite.keyFrames[0];
      lastKeyFr = sprite.keyFrames[numKeyFr - 1];
      if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
      for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
      for (j=0; j<sprite.values.length; j++) {
        props = sprite.values[j];
        if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
        else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
        if (sprite.obj != null) {
          if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
          else        sprite.obj[props.prop2][props.prop] = props[propNum];
      } }
    } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
  }
  tmLn.curFrame = fNew;
  if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}

function MM_initTimelines() { //v4.0
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    var ns4 = (ns && parseInt(navigator.appVersion) == 4);
    var ns5 = (ns && parseInt(navigator.appVersion) > 4);
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(3);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
        document.MM_Time[0][0].obj = document["Layer1"];
    else if (ns5)
        document.MM_Time[0][0].obj = document.getElementById("Layer1");
    else
        document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;
    document.MM_Time[0][0].keyFrames = new Array(1, 280);
    document.MM_Time[0][0].values = new Array(2);
    if (ns5)
        document.MM_Time[0][0].values[0] = new Array("0px", "-4px", "-9px", "-13px", "-17px", "-22px", "-26px", "-30px", "-34px", "-39px", "-43px", "-47px", "-52px", "-56px", "-60px", "-65px", "-69px", "-73px", "-77px", "-82px", "-86px", "-90px", "-95px", "-99px", "-103px", "-108px", "-112px", "-116px", "-120px", "-125px", "-129px", "-133px", "-138px", "-142px", "-146px", "-151px", "-155px", "-159px", "-163px", "-168px", "-172px", "-176px", "-181px", "-185px", "-189px", "-194px", "-198px", "-202px", "-206px", "-211px", "-215px", "-219px", "-224px", "-228px", "-232px", "-237px", "-241px", "-245px", "-249px", "-254px", "-258px", "-262px", "-267px", "-271px", "-275px", "-280px", "-284px", "-288px", "-292px", "-297px", "-301px", "-305px", "-310px", "-314px", "-318px", "-323px", "-327px", "-331px", "-335px", "-340px", "-344px", "-348px", "-353px", "-357px", "-361px", "-366px", "-370px", "-374px", "-378px", "-383px", "-387px", "-391px", "-396px", "-400px", "-404px", "-409px", "-413px", "-417px", "-422px", "-426px", "-430px", "-434px", "-439px", "-443px", "-447px", "-452px", "-456px", "-460px", "-465px", "-469px", "-473px", "-477px", "-482px", "-486px", "-490px", "-495px", "-499px", "-503px", "-508px", "-512px", "-516px", "-520px", "-525px", "-529px", "-533px", "-538px", "-542px", "-546px", "-551px", "-555px", "-559px", "-563px", "-568px", "-572px", "-576px", "-581px", "-585px", "-589px", "-594px", "-598px", "-602px", "-606px", "-611px", "-615px", "-619px", "-624px", "-628px", "-632px", "-637px", "-641px", "-645px", "-649px", "-654px", "-658px", "-662px", "-667px", "-671px", "-675px", "-680px", "-684px", "-688px", "-692px", "-697px", "-701px", "-705px", "-710px", "-714px", "-718px", "-723px", "-727px", "-731px", "-735px", "-740px", "-744px", "-748px", "-753px", "-757px", "-761px", "-766px", "-770px", "-774px", "-778px", "-783px", "-787px", "-791px", "-796px", "-800px", "-804px", "-809px", "-813px", "-817px", "-822px", "-826px", "-830px", "-834px", "-839px", "-843px", "-847px", "-852px", "-856px", "-860px", "-865px", "-869px", "-873px", "-877px", "-882px", "-886px", "-890px", "-895px", "-899px", "-903px", "-908px", "-912px", "-916px", "-920px", "-925px", "-929px", "-933px", "-938px", "-942px", "-946px", "-951px", "-955px", "-959px", "-963px", "-968px", "-972px", "-976px", "-981px", "-985px", "-989px", "-994px", "-998px", "-1002px", "-1006px", "-1011px", "-1015px", "-1019px", "-1024px", "-1028px", "-1032px", "-1037px", "-1041px", "-1045px", "-1049px", "-1054px", "-1058px", "-1062px", "-1067px", "-1071px", "-1075px", "-1080px", "-1084px", "-1088px", "-1092px", "-1097px", "-1101px", "-1105px", "-1110px", "-1114px", "-1118px", "-1123px", "-1127px", "-1131px", "-1135px", "-1140px", "-1144px", "-1148px", "-1153px", "-1157px", "-1161px", "-1166px", "-1170px", "-1174px", "-1178px", "-1183px", "-1187px", "-1191px", "-1196px", "-1200px");
    else
        document.MM_Time[0][0].values[0] = new Array(0,-4,-9,-13,-17,-22,-26,-30,-34,-39,-43,-47,-52,-56,-60,-65,-69,-73,-77,-82,-86,-90,-95,-99,-103,-108,-112,-116,-120,-125,-129,-133,-138,-142,-146,-151,-155,-159,-163,-168,-172,-176,-181,-185,-189,-194,-198,-202,-206,-211,-215,-219,-224,-228,-232,-237,-241,-245,-249,-254,-258,-262,-267,-271,-275,-280,-284,-288,-292,-297,-301,-305,-310,-314,-318,-323,-327,-331,-335,-340,-344,-348,-353,-357,-361,-366,-370,-374,-378,-383,-387,-391,-396,-400,-404,-409,-413,-417,-422,-426,-430,-434,-439,-443,-447,-452,-456,-460,-465,-469,-473,-477,-482,-486,-490,-495,-499,-503,-508,-512,-516,-520,-525,-529,-533,-538,-542,-546,-551,-555,-559,-563,-568,-572,-576,-581,-585,-589,-594,-598,-602,-606,-611,-615,-619,-624,-628,-632,-637,-641,-645,-649,-654,-658,-662,-667,-671,-675,-680,-684,-688,-692,-697,-701,-705,-710,-714,-718,-723,-727,-731,-735,-740,-744,-748,-753,-757,-761,-766,-770,-774,-778,-783,-787,-791,-796,-800,-804,-809,-813,-817,-822,-826,-830,-834,-839,-843,-847,-852,-856,-860,-865,-869,-873,-877,-882,-886,-890,-895,-899,-903,-908,-912,-916,-920,-925,-929,-933,-938,-942,-946,-951,-955,-959,-963,-968,-972,-976,-981,-985,-989,-994,-998,-1002,-1006,-1011,-1015,-1019,-1024,-1028,-1032,-1037,-1041,-1045,-1049,-1054,-1058,-1062,-1067,-1071,-1075,-1080,-1084,-1088,-1092,-1097,-1101,-1105,-1110,-1114,-1118,-1123,-1127,-1131,-1135,-1140,-1144,-1148,-1153,-1157,-1161,-1166,-1170,-1174,-1178,-1183,-1187,-1191,-1196,-1200);
    document.MM_Time[0][0].values[0].prop = "left";
    if (ns5)
        document.MM_Time[0][0].values[1] = new Array("0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px");
    else
        document.MM_Time[0][0].values[1] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
    document.MM_Time[0][0].values[1].prop = "top";
    if (!ns4) {
        document.MM_Time[0][0].values[0].prop2 = "style";
        document.MM_Time[0][0].values[1].prop2 = "style";
    }
    document.MM_Time[0][1] = new String("behavior");
    document.MM_Time[0][1].frame = 280;
    document.MM_Time[0][1].value = "MM_timelineGoto('Timeline1','1')";
    document.MM_Time[0][2] = new String("sprite");
    document.MM_Time[0][2].slot = 2;
    if (ns4)
        document.MM_Time[0][2].obj = document["Layer2"];
    else if (ns5)
        document.MM_Time[0][2].obj = document.getElementById("Layer2");
    else
        document.MM_Time[0][2].obj = document.all ? document.all["Layer2"] : null;
    document.MM_Time[0][2].keyFrames = new Array(1, 280);
    document.MM_Time[0][2].values = new Array(3);
    if (ns5)
        document.MM_Time[0][2].values[0] = new Array("1198px", "1194px", "1189px", "1185px", "1181px", "1177px", "1172px", "1168px", "1164px", "1159px", "1155px", "1151px", "1146px", "1142px", "1138px", "1134px", "1129px", "1125px", "1121px", "1116px", "1112px", "1108px", "1104px", "1099px", "1095px", "1091px", "1086px", "1082px", "1078px", "1073px", "1069px", "1065px", "1061px", "1056px", "1052px", "1048px", "1043px", "1039px", "1035px", "1031px", "1026px", "1022px", "1018px", "1013px", "1009px", "1005px", "1000px", "996px", "992px", "988px", "983px", "979px", "975px", "970px", "966px", "962px", "958px", "953px", "949px", "945px", "940px", "936px", "932px", "927px", "923px", "919px", "915px", "910px", "906px", "902px", "897px", "893px", "889px", "885px", "880px", "876px", "872px", "867px", "863px", "859px", "854px", "850px", "846px", "842px", "837px", "833px", "829px", "824px", "820px", "816px", "812px", "807px", "803px", "799px", "794px", "790px", "786px", "781px", "777px", "773px", "769px", "764px", "760px", "756px", "751px", "747px", "743px", "739px", "734px", "730px", "726px", "721px", "717px", "713px", "708px", "704px", "700px", "696px", "691px", "687px", "683px", "678px", "674px", "670px", "666px", "661px", "657px", "653px", "648px", "644px", "640px", "635px", "631px", "627px", "623px", "618px", "614px", "610px", "605px", "601px", "597px", "593px", "588px", "584px", "580px", "575px", "571px", "567px", "563px", "558px", "554px", "550px", "545px", "541px", "537px", "532px", "528px", "524px", "520px", "515px", "511px", "507px", "502px", "498px", "494px", "490px", "485px", "481px", "477px", "472px", "468px", "464px", "459px", "455px", "451px", "447px", "442px", "438px", "434px", "429px", "425px", "421px", "417px", "412px", "408px", "404px", "399px", "395px", "391px", "386px", "382px", "378px", "374px", "369px", "365px", "361px", "356px", "352px", "348px", "344px", "339px", "335px", "331px", "326px", "322px", "318px", "313px", "309px", "305px", "301px", "296px", "292px", "288px", "283px", "279px", "275px", "271px", "266px", "262px", "258px", "253px", "249px", "245px", "240px", "236px", "232px", "228px", "223px", "219px", "215px", "210px", "206px", "202px", "198px", "193px", "189px", "185px", "180px", "176px", "172px", "167px", "163px", "159px", "155px", "150px", "146px", "142px", "137px", "133px", "129px", "125px", "120px", "116px", "112px", "107px", "103px", "99px", "94px", "90px", "86px", "82px", "77px", "73px", "69px", "64px", "60px", "56px", "52px", "47px", "43px", "39px", "34px", "30px", "26px", "21px", "17px", "13px", "9px", "4px", "0px");
    else
        document.MM_Time[0][2].values[0] = new Array(1198,1194,1189,1185,1181,1177,1172,1168,1164,1159,1155,1151,1146,1142,1138,1134,1129,1125,1121,1116,1112,1108,1104,1099,1095,1091,1086,1082,1078,1073,1069,1065,1061,1056,1052,1048,1043,1039,1035,1031,1026,1022,1018,1013,1009,1005,1000,996,992,988,983,979,975,970,966,962,958,953,949,945,940,936,932,927,923,919,915,910,906,902,897,893,889,885,880,876,872,867,863,859,854,850,846,842,837,833,829,824,820,816,812,807,803,799,794,790,786,781,777,773,769,764,760,756,751,747,743,739,734,730,726,721,717,713,708,704,700,696,691,687,683,678,674,670,666,661,657,653,648,644,640,635,631,627,623,618,614,610,605,601,597,593,588,584,580,575,571,567,563,558,554,550,545,541,537,532,528,524,520,515,511,507,502,498,494,490,485,481,477,472,468,464,459,455,451,447,442,438,434,429,425,421,417,412,408,404,399,395,391,386,382,378,374,369,365,361,356,352,348,344,339,335,331,326,322,318,313,309,305,301,296,292,288,283,279,275,271,266,262,258,253,249,245,240,236,232,228,223,219,215,210,206,202,198,193,189,185,180,176,172,167,163,159,155,150,146,142,137,133,129,125,120,116,112,107,103,99,94,90,86,82,77,73,69,64,60,56,52,47,43,39,34,30,26,21,17,13,9,4,0);
    document.MM_Time[0][2].values[0].prop = "left";
    if (ns5)
        document.MM_Time[0][2].values[1] = new Array("0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px", "0px");
    else
        document.MM_Time[0][2].values[1] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
    document.MM_Time[0][2].values[1].prop = "top";
    if (!ns4) {
        document.MM_Time[0][2].values[0].prop2 = "style";
        document.MM_Time[0][2].values[1].prop2 = "style";
    }
    if (ns5)
        document.MM_Time[0][2].values[2] = new Array("1px", "1px", "1px", "2px", "2px", "3px", "3px", "3px", "4px", "4px", "5px", "5px", "5px", "6px", "6px", "7px", "7px", "7px", "8px", "8px", "9px", "9px", "9px", "10px", "10px", "11px", "11px", "12px", "12px", "12px", "13px", "13px", "14px", "14px", "14px", "15px", "15px", "16px", "16px", "16px", "17px", "17px", "18px", "18px", "18px", "19px", "19px", "20px", "20px", "21px", "21px", "21px", "22px", "22px", "23px", "23px", "23px", "24px", "24px", "25px", "25px", "25px", "26px", "26px", "27px", "27px", "27px", "28px", "28px", "29px", "29px", "30px", "30px", "30px", "31px", "31px", "32px", "32px", "32px", "33px", "33px", "34px", "34px", "34px", "35px", "35px", "36px", "36px", "36px", "37px", "37px", "38px", "38px", "39px", "39px", "39px", "40px", "40px", "41px", "41px", "41px", "42px", "42px", "43px", "43px", "43px", "44px", "44px", "45px", "45px", "45px", "46px", "46px", "47px", "47px", "47px", "48px", "48px", "49px", "49px", "50px", "50px", "50px", "51px", "51px", "52px", "52px", "52px", "53px", "53px", "54px", "54px", "54px", "55px", "55px", "56px", "56px", "56px", "57px", "57px", "58px", "58px", "59px", "59px", "59px", "60px", "60px", "61px", "61px", "61px", "62px", "62px", "63px", "63px", "63px", "64px", "64px", "65px", "65px", "65px", "66px", "66px", "67px", "67px", "68px", "68px", "68px", "69px", "69px", "70px", "70px", "70px", "71px", "71px", "72px", "72px", "72px", "73px", "73px", "74px", "74px", "74px", "75px", "75px", "76px", "76px", "77px", "77px", "77px", "78px", "78px", "79px", "79px", "79px", "80px", "80px", "81px", "81px", "81px", "82px", "82px", "83px", "83px", "83px", "84px", "84px", "85px", "85px", "85px", "86px", "86px", "87px", "87px", "88px", "88px", "88px", "89px", "89px", "90px", "90px", "90px", "91px", "91px", "92px", "92px", "92px", "93px", "93px", "94px", "94px", "94px", "95px", "95px", "96px", "96px", "97px", "97px", "97px", "98px", "98px", "99px", "99px", "99px", "100px", "100px", "101px", "101px", "101px", "102px", "102px", "103px", "103px", "103px", "104px", "104px", "105px", "105px", "106px", "106px", "106px", "107px", "107px", "108px", "108px", "108px", "109px", "109px", "110px", "110px", "110px", "111px", "111px", "112px", "112px", "112px", "113px", "113px", "114px", "114px", "115px");
    else
        document.MM_Time[0][2].values[2] = new Array(1,1,1,2,2,3,3,3,4,4,5,5,5,6,6,7,7,7,8,8,9,9,9,10,10,11,11,12,12,12,13,13,14,14,14,15,15,16,16,16,17,17,18,18,18,19,19,20,20,21,21,21,22,22,23,23,23,24,24,25,25,25,26,26,27,27,27,28,28,29,29,30,30,30,31,31,32,32,32,33,33,34,34,34,35,35,36,36,36,37,37,38,38,39,39,39,40,40,41,41,41,42,42,43,43,43,44,44,45,45,45,46,46,47,47,47,48,48,49,49,50,50,50,51,51,52,52,52,53,53,54,54,54,55,55,56,56,56,57,57,58,58,59,59,59,60,60,61,61,61,62,62,63,63,63,64,64,65,65,65,66,66,67,67,68,68,68,69,69,70,70,70,71,71,72,72,72,73,73,74,74,74,75,75,76,76,77,77,77,78,78,79,79,79,80,80,81,81,81,82,82,83,83,83,84,84,85,85,85,86,86,87,87,88,88,88,89,89,90,90,90,91,91,92,92,92,93,93,94,94,94,95,95,96,96,97,97,97,98,98,99,99,99,100,100,101,101,101,102,102,103,103,103,104,104,105,105,106,106,106,107,107,108,108,108,109,109,110,110,110,111,111,112,112,112,113,113,114,114,115);
    document.MM_Time[0][2].values[2].prop = "height";
    if (!ns4)
        document.MM_Time[0][2].values[2].prop2 = "style";
    document.MM_Time[0].lastFrame = 280;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}

function clearQuotes(theForm) {
	for (i=0;i<theForm.elements.length;i++) {
		if (theForm.elements[i].value) {
			theForm.elements[i].value = theForm.elements[i].value.replace(/'/gi,"`");
		}
	}
}

function checkEmail(theEmail) {
	if (theEmail.indexOf('.')==-1) return false;
	if (theEmail.indexOf('@')==-1) return false;
	if (theEmail.length<6) return false;
	return true;
}


function popup(imagesource,thewidth,theheight,thealt) {

						// figures out the width and height of the window
						var WindowAttributes = "scrollbars,resizable,width=";
						var windowheight = theheight + 150;
						if (navigator.appName != 'Netscape') {windowheight = windowheight + 25};
						var windowwidth  = thewidth + 80;
						WindowAttributes += windowwidth.toString();
						WindowAttributes += ",height="
						WindowAttributes += windowheight.toString();

                        // Open the window
                        ResultsWindow = window.open("","ImageWindow",WindowAttributes);
                        
                        // Output stuff to it
                        ResultsWindow.document.open("text/html");
                        ResultsWindow.document.writeln("<html>");
                        ResultsWindow.document.writeln("<title>Stirling Ranges Retreat</title>");
                        ResultsWindow.document.writeln("<head>");
                        ResultsWindow.document.writeln("<style><!-- a {text-decoration: none} //--></style>");
                        ResultsWindow.document.writeln("</head>");
                        ResultsWindow.document.writeln("<BODY TEXT='#000000' BGCOLOR='#FFFFFF' LINK='#0088FF' VLINK='#0088FF' ALINK='#FF0000' onload='self.focus()'>");
                        ResultsWindow.document.writeln("<center>")
                        ResultsWindow.document.writeln("<table width=100% height=100% border=0 cellpadding=0 cellspacing=4><tr><td align='center' valign='middle'>");

						var TheImageLine = "<img src='" + imagesource +"' height='" + theheight + "' width='" + thewidth + "' alt='" + thealt + "'><br>";
						ResultsWindow.document.writeln(TheImageLine)

                        ResultsWindow.document.writeln("<font face='verdana,arial,helvetica' size=2 color='#000000'>");
                        ResultsWindow.document.writeln(thealt);
                        ResultsWindow.document.writeln("</font>");
                        ResultsWindow.document.writeln("<br><font face='verdana,arial,helvetica' size=1 color='#000000'><a href='javascript:self.close()'>Close Window</a></font>");
                        ResultsWindow.document.writeln("</td></tr></table>");

                        ResultsWindow.document.writeln("</body>");
                        ResultsWindow.document.writeln("</html>");
                        ResultsWindow.document.close();
						
						ResultsWindow.resizeTo(windowwidth,windowheight);
}


function CheckContact() {
		var theForm = document.booking;
		clearQuotes(theForm);

		if (theForm.fname.value.length==0) {alert("Please enter your first name"); return false;}
		if (theForm.lname.value.length==0) {alert("Please enter your last name"); return false;}

 		if (theForm.email.value.length>0) {
			if (checkEmail(theForm.email.value)==false) {
				alert("The email address you have entered does not seem to be valid. Please check it.");
				return false;
			}
		} else {
			if (theForm.phone1.value.length==0) {
				alert("Please enter either an email address or phone number");
				return false;
			}
		}

		if (theForm.sendnews.checked == false && theForm.data02.value == "") {alert("Please either tick the 'send me information'\ncheckbox or enter some comments"); return false;};

		if (theForm.sendnews.checked && theForm.email.value.length==0) {
			if (theForm.street.value.length==0) 		{alert("Please enter your street and number address\n(so we can send you the information you've requested)"); return false;}
			if (theForm.suburb.value.length==0) 		{alert("Please enter your suburb/town\n(so we can send you the information you've requested)"); return false;}
			if (theForm.state.value.length==0) 			{alert("Please enter your state or region\n(so we can send you the information you've requested)"); return false;}
			if (theForm.country.value.length==0) 		{alert("Please enter your country\n(so we can send you the information you've requested)"); return false;}
			if (theForm.postcode.value.length==0) 		{alert("Please enter your post or zip code\n(so we can send you the information you've requested)"); return false;}
		}

		if (theForm.sendnews.checked == true) {theForm.data00.value = "PLEASE SEND INFO ON LATEST NEWS AND OFFERS"};

		var TodayDate = new Date();
		TodayDay = TodayDate.getDate();
		TodayMonth = TodayDate.getMonth() + 1;
		TodayYear = TodayDate.getFullYear();

		var FromDay   = theForm.from_day[theForm.from_day.selectedIndex].value;
		var FromMonth = theForm.from_month[theForm.from_month.selectedIndex].value;
		var FromYear  = theForm.from_year[theForm.from_year.selectedIndex].value;

		FromDay 	= FromDay-0;
		FromMonth 	= FromMonth-0;
		FromYear 	= FromYear-0;

		var ToDay   = theForm.to_day[theForm.to_day.selectedIndex].value;
		var ToMonth = theForm.to_month[theForm.to_month.selectedIndex].value;
		var ToYear  = theForm.to_year[theForm.to_year.selectedIndex].value;

		ToDay 	= ToDay-0;
		ToMonth = ToMonth-0;
		ToYear 	= ToYear-0;

		if (FromDay == 0 || FromMonth == 0 || FromYear == 0 || ToDay == 0 || ToMonth == 0 || ToYear == 0) { 

				theForm.data01.value = "ARRIVAL/DEPARTURE - No Dates Selected";

		} else {

				if (ToYear < FromYear) {alert("To Date must be greater than From Date");return false;};
				if (ToYear == FromYear)	{
										if (ToMonth < FromMonth) {alert("To Date must be greater than From Date");return false;};
                        				if (ToMonth == FromMonth)	{
                        											if ((ToDay - FromDay) < 1) {alert("To Date must be greater than From Date \n" + (ToDay - FromDay));return false;};
																	};
										};

				if (FromYear < TodayYear) {alert(FromDay +"-"+ FromMonth +"-"+ FromYear +" has already passed");return false;};
				if (FromYear == TodayYear)	{
											if (FromMonth < TodayMonth) {alert(FromDay +"-"+ FromMonth +"-"+ FromYear +" has already passed");return false;};
											if (FromMonth == TodayMonth) {
																		if (FromDay < TodayDay) {alert(FromDay +"-"+ FromMonth +"-"+ FromYear +" has already passed");return false;};
																		};
											};

				if (ToYear < TodayYear) {alert(ToDay +"-"+ ToMonth +"-"+ ToYear +" has already passed");return false;};
				if (ToYear == TodayYear)	{
											if (ToMonth < TodayMonth) {alert(ToDay +"-"+ ToMonth +"-"+ ToYear +" has already passed");return false;};
											if (ToMonth == TodayMonth) {
																		if (ToDay < TodayDay) {alert(ToDay +"-"+ ToMonth +"-"+ ToYear +" has already passed");return false;};
																		};
											};

				if (FromMonth == 02 && FromDay > 29) {alert(FromDay +"-"+ FromMonth +"-"+ FromYear +" does not exist!");return false;};
				if (ToMonth == 02   &&   ToDay > 29) {alert(ToDay +"-"+ ToMonth +"-"+ ToYear +" does not exist!");return false;};

				if ((FromMonth == 9 || FromMonth == 4 || FromMonth == 6 || FromMonth == 11)&& (FromDay > 30)) {alert(FromDay +"-"+ FromMonth +"-"+ FromYear +" does not exist!");return false;};
				if ((ToMonth == 9 || ToMonth == 4 || ToMonth == 6 || ToMonth == 11)&& (ToDay > 30)) {alert(ToDay +"-"+ ToMonth +"-"+ ToYear +" does not exist!");return false;};

				if (ToYear < FromYear) {alert("To date must be greater than from date!");return false;};
				if (ToYear == FromYear && ToMonth < FromMonth) {alert("To date must be greater than from date!");return false;};
				if (ToYear == FromYear && ToMonth == FromMonth && ToDay < FromDay) {alert("To date must be greater than from date!");return false;};

				theForm.data01.value = "ARRIVAL: " + FromDay +"-"+ FromMonth +"-"+ FromYear +" - DEPARTURE: "+ ToDay +"-"+ ToMonth +"-"+ ToYear;
		}

		return true;
	}	
