// Usage:
// <div id="hotText" style="POSITION: absolute">&nbsp;</div>
// <script language="JavaScript" type="text/javascript" src="contributors_hot_v007.js"></script>
// <p><a href="" onMouseOver="showHotText();" onMouseOut="hideHotText();">test</a></p>


/************ Browser Type and Version Detection ************/
var agt=navigator.userAgent.toLowerCase();
var ns6=document.getElementById && !document.all;
var opera=window.opera;
var major = parseInt(navigator.appVersion);
var ie = (agt.indexOf("msie") != -1);
var ie3  = (ie && (major < 4));
var ie4  = (ie && (major == 4) && (agt.indexOf("msie 4.0")!=-1) && (agt.indexOf("msie 5.0")==-1) && (agt.indexOf("msie 6.0")==-1) );
var ie5    = (ie && (major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var ie5_5  = (ie && (major == 4) && (agt.indexOf("msie 5.5") !=-1));
var ie5up  = (ie && !ie3 && !ie4);
var ie5_5up =(ie && !ie3 && !ie4 && !ie5);

var offsetxpoint=-60;
var offsetypoint=20;
var enableHotText=false;
var hotTextObj=document.getElementById("hotText");

function ietruebody() {
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function showHotText() {
  var myCell = (document.all) ? window.event.srcElement : this;
  if (myCell.id == "contributor_1") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Scott Taylor</td></tr><tr><td class="hotText"><img src="images/contributors/photo_scott_taylor.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Scott Taylor</strong> is the sports director at 92-CITI-FM radio in Winnipeg; a sports columnist with the National Post; a sports columnist with Grassroots News, Manitoba\'s largest Aboriginal newspaper; is the television voice of Winnipeg Goldeyes baseball on Shaw TV; and appears regularly on The FAN 960 in Calgary, The TEAM 1260 in Edmonton, on WCCO radio in Minneapolis and on TSN\'s Off the Record.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_2") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Amanda Lefley</td></tr><tr><td class="hotText"><img src="images/contributors/photo_amanda_lefley.jpg" width="89" height="48" class="hotPhoto" align="left"><strong>Amanda Lefley</strong> recently graduated from the Creative Communications program at Red River College as a journalism major. Amanda is a Winnipeg-based freelance writer having written for small circulation newspapers, magazines, and online publications. She is currently finishing her Bachelor of Arts Degree at the University of Winnipeg part-time.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_3") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Mike Warkentin</td></tr><tr><td class="hotText"><img src="images/contributors/photo_mike_warkentin.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Mike Warkentin</strong> is a freelance writer/editor and fitness leader. A former university athlete, he has served as sports editor of the University of Winnipeg Uniter and deputy editor of Uptown Magazine. He\'s currently the staff writer for the CrossFit Journal. Mike is involved in volleyball, yoga and weight training, and he lives for football season. He\'s a certified CrossFit instructor and is working toward certifications with the Manitoba Fitness Council and the National Strength and Conditioning Association.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_4") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Neil MacKinnon</td></tr><tr><td class="hotText"><img src="images/contributors/photo_neil_mackinnon.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Neil MacKinnon</strong> is a sports journalist with Sun Media and avid sports enthusiast with a life-long amateur playing career in football, hockey and baseball.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_5") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Marty Goldstein</td></tr><tr><td class="hotText"><img src="images/contributors/photo_marty_goldstein.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Marty Goldstein</strong> has produced and handled TV play-by-play duties for pro wrestling offices in Winnipeg, Kansas City, Los Angeles and British Columbia since 1980.  A product of Winnipeg\'s North End, Marty currently hosts The Great Canadian Talk Show from 4-5 PM daily on 92.9 KICK-FM, and is the voice of Power Pro Wrestling on KVOS-TV across the Pacific Northwest.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_6") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Paul Edmonds</td></tr><tr><td class="hotText"><img src="images/contributors/photo_paul_edmonds.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Paul Edmonds</strong> is a writer and broadcaster based in Winnipeg, serving as the radio voice of the Winnipeg Goldeyes since 1995.  Recently celebrating his 1,000<sup>th</sup> game as the club\'s announcer, Paul also has extensive broadcasting experience in hockey and basketball.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_7") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Don Marks</td></tr><tr><td class="hotText"><img src="images/contributors/photo_don_marks.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Don Marks</strong> is a Winnipeg-based writer and film-maker whose credits include the Gemini-award-winning production, "The Red Road", and CanPro/MMPIA award winning television series such as "Indian Time" and "First Nations Magazine". Don was a sportscaster on CKND-TV for 11 years and is currently writing a book about hockey players from North American First Nations who starred in the NHL.</td></tr></table></td></tr></table>';
    enableHotText=true;
  } else if (myCell.id == "contributor_8") {
    hotTextObj.innerHTML='<table cellspacing="0" cellpadding="0" width="400" border="0"><tr><td><table cellspacing="0"><tr><td class="hotHeader">Judy Owen</td></tr><tr><td class="hotText"><img src="images/contributors/photo_judy_owen.gif" width="89" height="48" class="hotPhoto" align="left"><strong>Judy Owen</strong> joined the Winnipeg Sun as a news reporter in 1988 and switched to sports four years later. She covered amateur and professional sports for the paper until 2000, including the Winnipeg Blue Bombers and Manitoba Moose. Currently a freelance writer and editor, she covers the Blue Bombers and local sporting events for the Canadian Press.</td></tr></table></td></tr></table>';
    enableHotText=true;
  }
}

function positionHotText(e) {
  if (enableHotText) {
    var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;

    var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20;
    var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20;

    var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000;

    if (rightedge<hotTextObj.offsetWidth) {
      hotTextObj.style.left=ie? ietruebody().scrollLeft+event.clientX-hotTextObj.offsetWidth+"px" : window.pageXOffset+e.clientX-hotTextObj.offsetWidth+"px";
    } else if (curX<leftedge) {
      hotTextObj.style.left="5px";
    } else {
      hotTextObj.style.left=curX+offsetxpoint+"px";
    }

    if (bottomedge<hotTextObj.offsetHeight) {
      hotTextObj.style.top=ie? ietruebody().scrollTop+event.clientY-hotTextObj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-hotTextObj.offsetHeight-offsetypoint+"px";
    } else {
      hotTextObj.style.top=curY+offsetypoint+"px";
    }
    hotTextObj.style.visibility="visible";
  }
}

function hideHotText() {
  enableHotText=false;
  hotTextObj.style.visibility="hidden";
  hotTextObj.style.left="-1000px";
  hotTextObj.style.backgroundColor='';
  hotTextObj.style.width='';
}

function doPositioning(e) {
  positionHotText(e);
}

document.onmousemove=doPositioning;

