




var offsetfromcursorX=12
var offsetfromcursorY=16

var offsetdivfrompointerX=10
var offsetdivfrompointerY=14

document.write('<div id="classifieds_tip"></div>') 
document.write('<img id="classifieds_pointer" src="images/pointer.gif">')

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["classifieds_tip"] : document.getElementById? document.getElementById("classifieds_tip") : ""
var pointerobj=document.all? document.all["classifieds_pointer"] : document.getElementById? document.getElementById("classifieds_pointer") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function moclassifieds(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000


if (rightedge<tipobj.offsetWidth){
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function mohideclassifieds(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip




/*var toolTips = 
{	
	offsetfromcursorX: 12,
	offsetfromcursorY: 16,

	offsetdivfrompointerX: 10,
	offsetdivfrompointerY: 14,
	
	pointers: [],
	tips: [],
	enabled: -1,
	ie: document.all,
	ns6: document.getElementById && !document.all,
	
	add: function(pointerId,tipId)
	{
		if(toolTips.ns6 || toolTips.ie)
		{
			toolTips.pointers[toolTips.pointers.length] = document.all? document.all[pointerId] : document.getElementById? document.getElementById(pointerId) : "";
			toolTips.tips[toolTips.tips.length] = document.all? document.all[tipId] : document.getElementById? document.getElementById(tipId) : "";
			
			return toolTips.tips.length - 1;
		}
	}
};

function ToolTip(pointerId,tipId)
{
	document.write('<div id="'+tipId+'"></div>') 
	document.write('<img id="'+pointerId+'" src="images/pointer.gif">')
	
	

	this.toolTipID = toolTips.add(pointerId,tipId);

	this.show = function(thetext, thewidth, thecolor)
	{
		if (toolTips.ns6||toolTips.ie)
		{
			if (typeof thewidth!="undefined") 
				toolTips.tips[this.toolTipID].style.width=thewidth+"px";
			if (typeof thecolor!="undefined" && thecolor!="")
				toolTips.tips[this.toolTipID].style.backgroundColor=thecolor;
			
			toolTips.tips[this.toolTipID].innerHTML=thetext;
			toolTips.enabled=this.toolTipID;
			
			return false;
		}
	};

	this.hide = function()
	{	
		if (toolTips.ns6||toolTips.ie)
		{
			toolTips.enabled=-1;
			toolTips.tips[this.toolTipID].style.visibility="hidden";
			toolTips.pointers[this.toolTipID].style.visibility="hidden";
			toolTips.tips[this.toolTipID].style.left="-1000px";
			toolTips.tips[this.toolTipID].style.backgroundColor='';
			toolTips.tips[this.toolTipID].style.width='';
		}
	};

	document.onmousemove=positiontip
	
	return this;
}
function ietruebody()
{
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function positiontip(e)
{
	if (toolTips.enabled != -1)
	{
		var tipObj = toolTips.tips[toolTips.enabled];
		var pointerObj = toolTips.pointers[toolTips.enabled];
		
		var nondefaultpos=false
		var curX=(toolTips.ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
		var curY=(toolTips.ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
		var winwidth=toolTips.ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20;
		var winheight=toolTips.ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20;
		
		var rightedge=toolTips.ie&&!window.opera? winwidth-event.clientX-toolTips.offsetfromcursorX : winwidth-e.clientX-toolTips.offsetfromcursorX;
		var bottomedge=toolTips.ie&&!window.opera? winheight-event.clientY-toolTips.offsetfromcursorY : winheight-e.clientY-toolTips.offsetfromcursorY;
			
		var leftedge=(toolTips.offsetfromcursorX<0)? toolTips.offsetfromcursorX*(-1) : -1000;
		
			
		if (rightedge<tipObj.offsetWidth)
		{
			tipObj.style.left=curX-tipObj.offsetWidth+"px";
			nondefaultpos=true;
		}
		else if (curX<leftedge)
			tipObj.style.left="5px";
		else
		{
			tipObj.style.left=curX+toolTips.offsetfromcursorX-toolTips.offsetdivfrompointerX+"px";
			pointerObj.style.left=curX+toolTips.offsetfromcursorX+"px";
		}
		
		if (bottomedge<tipObj.offsetHeight)
		{
			tipObj.style.top=curY-tipObj.offsetHeight-toolTips.offsetfromcursorY+"px";
			nondefaultpos=true;
		}
		else
		{
			tipObj.style.top=curY+toolTips.offsetfromcursorY+toolTips.offsetdivfrompointerY+"px";
			pointerObj.style.top=curY+toolTips.offsetfromcursorY+"px";
		}
			
		tipObj.style.visibility="visible";
			
		if (!nondefaultpos)
			pointerObj.style.visibility="visible";
		else
			pointerObj.style.visibility="hidden";
		
	}
}
*/