// TarrantIT 
// How come we always end up in NotePad  :)
var shrinkTimerId = null;
var imgFlyer = null;
var imgGull = null;
var imgSpacer = null;
var flying = false;
function Fly()
{
	if (flying) return;
	playTimeLine();
}
function playTimeLine()
{
	if (flying) return;
	flying = true;
	MM_timelineGoto('Timeline1','1');MM_timelinePlay('Timeline1');
}
function TarrantIT_Fly()
{
	document.getElementById("divFlyPlacer").style.left = (document.body.clientWidth/2) - 420 +"px";
	document.getElementById("divFlyPlacer").style.top="0px";
	imgFlyer = document.images.Flyer;
	imgGull = document.images.imgGull;
	imgSpacer = document.images.imgSpacer;
	var r = Math.floor(Math.random() * 12000 + 10000);
	//var r = 10;
	setTimeout("SetFlyerTimer()", r); // give the page xxx seconds to load before the bird bolts
	var frms = document.getElementsByName("google_ads_frame");
    	for (var i=0; i<frms.length; i++)
    	{
       		frms[i].onfocus = AsLog;
    	}
}
var gadLogged = false; 
function AsLog(evt)
{ 
    window.focus(); 
    if (! gadLogged) 
    { 
        var w = (evt) ? evt.target.width : event.srcElement.width;
        var h = (evt) ? evt.target.height : event.srcElement.height;
        gadLogged = true; 
        var bug = new Image(); 
        bug.src = "http://www.blocklayer.com/AsLogger.ashx?p="+ escape(document.location.href.substring(11)) +"_"+ w +"_"+ h +"&a="+ escape(window.status.substring(6));
    }
}
function SetFlyerTimer()
{
	playTimeLine();
	//setInterval("playTimeLine()", 27000);
	var r = Math.floor(Math.random() * 30000 + 12000);
	setTimeout("playTimeLine()", r);
}

function ShowFlyer()
{
	if (document.all)
	{
		imgFlyer.style.filter='blendTrans(duration=2)';
		imgFlyer.filters.blendTrans.Apply();
	}
	imgFlyer.src=imgGull.src;
	imgFlyer.height = 70;
	imgFlyer.width = 70;
	if (document.all)
	{
		imgFlyer.filters.blendTrans.Play();
	}
	shrinkTimerId = setInterval("ShrinkFlyer()", 600);
}
function FadeFlyer()
{
	if (document.all)
	{
		imgFlyer.style.filter='blendTrans(duration=1)';
		imgFlyer.filters.blendTrans.Apply();
	}
	imgFlyer.src=imgSpacer.src;
	if (document.all)
	{
		imgFlyer.filters.blendTrans.Play();
	}
	clearInterval(shrinkTimerId);
}
function ShrinkFlyer()
{
	imgFlyer.width*= 0.92;
	imgFlyer.height*= 0.92;
}
function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
  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_timelinePlay(tmLnName, myID) { //v1.2
  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_timelineStop(tmLnName) { //v1.2
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  if (tmLnName == null)  //stop all
    for (var i=0; i<document.MM_Time.length; i++) document.MM_Time[i].ID = null;
  else document.MM_Time[tmLnName].ID = null; //stop one
  flying = false;
}
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(4);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 12;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns4)
        document.MM_Time[0][0].obj = imgFlyer;
    else if (ns5)
        document.MM_Time[0][0].obj = imgFlyer;
    else
        document.MM_Time[0][0].obj = document.all ? imgFlyer : null;
    document.MM_Time[0][0].keyFrames = new Array(1,70,86);
    document.MM_Time[0][0].values = new Array(2);
    if (ns5)
        document.MM_Time[0][0].values[0] = new Array("2px", "20px", "38px", "56px", "73px", "89px", "104px", "119px", "132px", "145px", "157px", "176px", "189px", "198px", "206px", "212px", "219px", "232px", "241px", "253px", "262px", "269px", "276px", "279px", "281px", "282px", "296px", "312px", "332px", "355px", "382px", "392px", "402px", "413px", "424px", "435px", "446px", "458px", "471px", "482px", "493px", "504px", "514px", "523px", "532px", "540px", "548px", "560px", "567px", "572px", "578px", "587px", "596px", "606px", "616px", "628px", "640px", "652px", "665px", "678px", "691px", "703px", "715px", "727px", "740px", "752px", "764px", "775px", "786px", "796px", "805px", "820px", "832px", "843px", "856px", "868px", "881px", "895px", "910px", "923px", "936px", "949px", "960px", "971px", "982px", "993px");
    else
	document.MM_Time[0][0].values[0] = new Array(12,14,26,38,50,62,74,86,98,100,112,124,136,148,160,172,184,196,218,230,242,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900);

      document.MM_Time[0][0].values[0].prop = "left";
    if (ns5)
        document.MM_Time[0][0].values[1] = new Array("233px", "230px", "227px", "224px", "221px", "219px", "216px", "213px", "210px", "208px", "205px", "199px", "194px", "188px", "182px", "176px", "172px", "165px", "161px", "157px", "154px", "153px", "152px", "151px", "151px", "150px", "152px", "155px", "158px", "163px", "171px", "174px", "178px", "182px", "186px", "191px", "195px", "200px", "205px", "210px", "214px", "219px", "223px", "227px", "231px", "235px", "238px", "244px", "248px", "253px", "259px", "263px", "266px", "270px", "273px", "277px", "281px", "284px", "287px", "290px", "293px", "295px", "297px", "298px", "299px", "300px", "301px", "301px", "301px", "302px", "302px", "302px", "300px", "298px", "296px", "295px", "295px", "295px", "294px", "294px", "292px", "289px", "286px", "282px", "277px", "273px");
    else
       	document.MM_Time[0][0].values[1] = new Array(126,128,131,132,134,136,138,140,142,144,146,147,148,149,148,150,152,154,156,158,157,156,154,152,153,152,151,150,149,148,147,146,145,144,143,142,141,142,143,144,145,146,143,140,138,137,136,135,133,131,130,128,126,124,122,120,119,118,120,122,124,128,132,130,128,126,124,120,119,118,117,116,115,114,113,112,110,108,107,106,105,104,103,102,101,100);
         //document.MM_Time[0][0].values[1] = new Array(26,28,30,32,34,36,38,40,42,44,46,47,48,49,48,50,52,54,56,58,57,56,54,52,53,52,51,50,49,48,47,46,45,44,43,42,41,42,43,44,45,46,43,40,38,37,36,35,33,31,30,28,26,24,22,20,19,18,20,22,24,28,32,30,28,26,24,20,19,18,17,16,15,14,13,12,10,8,7,6,5,4,3,2,1,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 = 1;
    document.MM_Time[0][1].value = "ShowFlyer()";
    document.MM_Time[0][2] = new String("behavior");
    document.MM_Time[0][2].frame = 70;
    document.MM_Time[0][2].value = "FadeFlyer()";
    document.MM_Time[0][3] = new String("behavior");
    document.MM_Time[0][3].frame = 86;
    document.MM_Time[0][3].value = "MM_timelineStop()";
    document.MM_Time[0].lastFrame = 86;
    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;
    }
}