var NS4 = (document.layers)? true:false
var IE4 = (document.all)? true:false
var VER4 = (IE4 || NS4) ? 1 : 0;
var tvPosX=0;
var tvPosY=0;
var tvXoffset=10;
var tvYoffset=10;






function fShowTips(pTitle,pText,pWidth, pPaththu, pBorderColor1, pBorderColor2) 
{
	var lvThumbnail='';
	var lvWinWidth=0;
	var lvFinalPosX=tvPosX-tvXoffset;
	
	if (fShowTips.arguments.length>=4)
	{
		if (pPaththu.length>0)
		{
			lvThumbnail='      <td >\n' +
			'<img src="'+pPaththu+'" border="0" align="middle">\n' +
			'      </td>\n';
		}
	}
	
	if (pText.length>0)
	{
		lvTextDisplay = '      <td class="ref_legend" valign="top" width="100%">\n' + pText+'\n' +	' </td>\n';
	}
	else
		lvTextDisplay = '      <td  valign="top" width="100%">\n&nbsp;\n' +	' </td>\n';

	if (lvThumbnail.length>0)
	{
		lvTextDisplay = '';
	}
		
	if (pBorderColor1==null)
		pBorderColor1 = "#808080";
	if (pBorderColor2==null)
		pBorderColor2 = "#808080";
		
	var lvText = '  <table border="1" bgcolor="#ffffff" bordercolor="'+pBorderColor1+'" bordercolorlight="'+pBorderColor1+'" bordercolordark="'+pBorderColor1+'" cellpadding="4" cellspacing="0" width="'+pWidth+'">' +
	'    <tr>\n' +
	'      <td colspan="2" class="infotech">\n' +
	pTitle+'\n' +
	'      </td>\n' +
	'    </tr>\n' +
	'  </table>\n';

	if (lvFinalPosX<0) 
		lvFinalPosX=0;
		
	if (document.layers) 
	{
		lvWinWidth = window.innerWidth;
		
		if (lvWinWidth<lvFinalPosX+pWidth)
			lvFinalPosX = lvWinWidth - pWidth - 20;
		document.layers["lyPhoto"].document.write(lvText);
		document.layers["lyPhoto"].document.close();
		document.layers["lyPhoto"].top=tvPosY+tvYoffset;
		document.layers["lyPhoto"].left=lvFinalPosX;
		document.layers["lyPhoto"].visibility="show";
	}

	if (document.all) 
	{
		lvWinWidth = document.body.offsetWidth;

		if (lvWinWidth<lvFinalPosX+pWidth)
			lvFinalPosX = lvWinWidth - pWidth - 20;

		lyPhoto.innerHTML=lvText;
		document.all["lyPhoto"].style.top=tvPosY+tvYoffset;
		document.all["lyPhoto"].style.left=lvFinalPosX;
		document.all["lyPhoto"].style.visibility="visible";
	}
	else if (document.getElementById) 
	{
		lvWinWidth = window.innerWidth;
		
		if (lvWinWidth<lvFinalPosX+pWidth)
			lvFinalPosX = lvWinWidth - pWidth - 20;
					
		document.getElementById("lyPhoto").innerHTML=lvText;
		document.getElementById("lyPhoto").style.top=tvPosY+tvYoffset;
		document.getElementById("lyPhoto").style.left=lvFinalPosX;
		document.getElementById("lyPhoto").style.visibility="visible";
	}

}

function getMousePos(e) 
{
	if (document.all) 
	{
		tvPosX=event.clientX+document.body.scrollLeft; 
		tvPosY=event.clientY+document.body.scrollTop;
	}
	else 
	{
		tvPosX=e.pageX; 
		tvPosY=e.pageY; 
	}
}


function fHideTips() 
{
	if (document.layers) 
	{
		document.layers["lyPhoto"].visibility="hide";
	}

	if (document.all) 
	{
		document.all["lyPhoto"].style.visibility="hidden";
	}
	else if (document.getElementById)
	{
		document.getElementById("lyPhoto").style.visibility="hidden";
	}
}

function InitBulle() 
{
	if (document.layers) 
	{
		window.captureEvents(Event.MOUSEMOVE);
		window.onmousemove=getMousePos;
		document.write("<LAYER name='lyPhoto' top=0 left=0 visibility='hide'></LAYER>");
	}
	else 
	{
		document.onmousemove=getMousePos;
		document.write("<DIV id='lyPhoto' style='position:absolute;top:0;left:0;visibility:hidden;z-index:9999' class='ref_legend'></DIV>");
	}
}


  

