var height,tool=document.getElementById('tooltype'), x=0;
function getMouseXY(e){
	if(tool!=null){
		if(tool.style.display=="block"){
			if(navigator.appName.substring(0,4) == "Micr"){ 
				// ;
				//mx=(navigator.appName=="Netscape")
				mx=event.clientX;
				my=event.clientY+Math.round(document.documentElement.scrollTop);
			}else if(navigator.appName.substring(0,4) == "Nets"){
				mx=e.pageX;
				my=e.pageY;
			}else{
				mx=event.pageX;
				my=event.pageY;
			}
			if(tool.clientWidth+mx>document.body.clientWidth-20){
				mx=document.body.clientWidth-tool.clientWidth-20;
			}
			tool.style.left=(mx-100)+"px";
			tool.style.top=(my-height-15)+"px";
		}
	}
}
function tooltype(str){ 
	clearTool();
	tool =document.createElement('div');
	tool.id='tooltype';
	tool.style.display="none";
	tool.style.position='absolute';
	tool.style.zIndex='150';
	tool.style.margin='70px 0px 0px 0px';
	tool.style.width='300px';
	tool.style.border='1px solid #a00000';
	tool.style.background='#400000';
	tool.style.fontSize='12px';
	tool1 =document.createElement('div');
	//tool1.style.margin='10px';
	//tool = document.getElementById('tooltype');
	tool1.innerHTML=str;
	tool.style.display="block";
	document.body.appendChild(tool);
	tool.appendChild(tool1);
	height=tool.clientHeight;
	tool=document.getElementById('tooltype');
	document.body.onmousemove=getMouseXY;
	//alert(height);
}

function clearTool(){
	tool=document.getElementById('tooltype');
	if(tool!=null){
		//tool.style.display="none";
		document.body.onmousemove='';
		document.body.removeChild(tool);
	}
}

