
function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
//		curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
	//	curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
var tempX = 0
var tempY = 0

document.onLoad = mouseCheck()
function mouseCheck()
{
	document.onmousemove=getMouseXY;
}


function getMouseXY(e) {

  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + ietruebody().scrollLeft
    tempY = event.clientY + ietruebody().scrollTop
  } else {  // grab the x-y pos.s if browser is NS
//alert(5)
    tempX = e.pageX
    tempY = e.pageY
//alert(6)
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  // document.Show.MouseX.value = tempX
  // document.Show.MouseY.value = tempY
  return true
}
//var time;
function openVideo(codVideo)
{

	if (IE) getMouseXY(event);

	divHTML = '	<div style="color:#000;font:bold 15px \'Trebuchet MS\';background:#EEEEF8 url(imagens/bg_janela.gif) repeat-x;height:28px;margin:0;padding:0;padding-left:45px;padding-top:5px"><div style="float:left">Video Clip</div><div style="float:right;margin-right:4px"><img src="imagens/bt_fecha.gif" onclick="closeVideo()" style="cursor:pointer" /></div></div>'
	divHTML += '<object width="255" height="210"><param name="movie" value="http://www.youtube.com/v/' + codVideo + '&autoplay=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' + codVideo + '&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="255" height="210"></embed></object>';
	obj = document.getElementById("video")
	obj.style.display = "block"
	obj.style.top = (tempY) + 'px'
	obj.style.left = (tempX + 80) + 'px'

	obj.innerHTML = divHTML

}
function closeVideo()
{
	obj = document.getElementById("video")
	obj.innerHTML = ""
	obj.style.display = "none"
}