// SoulTip v1.1, http://ferruh.mavituna.com/ ( //Yusuf Ušur Soysal/hayalet )
var divname="soultip";
var divInnername="soultipinner";
var fixed=false;
var soultip="
"
var CoordLeft=10;
var CoordRight=-15;
var hiddenTags = new Array();
function fm_MXY(XorY){ // Mouse Coords
var coord = 0;
XorY=="x"?coord = event.clientX + document.body.scrollLeft:coord = event.clientY + document.body.scrollTop;
if(coord<0)coord=0;
return coord;
}
function fm_help(){ // Show-Hide
var NewCoordLeft=0,NewCoordRight=0;
var d=document;
var thisObj = d.getElementById(divname); // findObj
var browserwidth=document.body.clientWidth; // Browser sizes - Positions
var browserheight=document.body.clientHeight+document.body.scrollTop+25;
var soulwidth=thisObj.offsetWidth+10, soulheight=thisObj.offsetHeight+10; // Soultip sizes
var activeObj=window.event.srcElement; // Active Object
var desc=activeObj.help; //help tag
if(desc!=null){ //If object help tag exist
var x = fm_MXY("x")+3, y = fm_MXY("y")+15;
if(document.alldesc==desc){ //If fixed
NewCoordLeft=activeObj.offsetLeft+activeObj.offsetWidth-x;
NewCoordRight=activeObj.offsetTop-y;
}
NewCoordLeft+=(x+soulwidth>browserwidth)?-soulwidth:CoordLeft; //idea by Yusuf Ušur Soysal - hayalet
NewCoordRight+=(y+soulheight>browserheight)?-soulheight:CoordRight;
thisObj.style.left=x+NewCoordLeft+"px"; //Move X
thisObj.style.top=y+NewCoordRight+"px"; //Move Y
fm_writehelp(desc); //print output
hy_collusion(thisObj); //Hide SelectBoxes by hayalet
if(fixed)document.alldesc=desc; //cache for fixed
}else{
hy_collusionRecover(); //Recover Selects by hayalet
thisObj.style.display="none";
}
}
function fm_writehelp(val){ // Write Tip
var d=document;
var thisObj = d.getElementById(divname);
var innerObj = d.getElementById(divInnername);
innerObj.innerHTML=val;
thisObj.style.display="block";
}
function hy_collusion(obj){ // Hide Selectboxes by Yusuf Ušur Soysal - hayalet
var offsetLeft = obj.offsetLeft;
var offsetTop = obj.offsetTop;
var offsetWidth = obj.offsetWidth;
var offsetHeight = obj.offsetHeight;
var topLeftX = offsetLeft;
var topLeftY = offsetTop;
var bottomRightX = offsetLeft + offsetWidth;
var bottomRightY = offsetTop + offsetHeight;
var hyl = 0;
if(document.getElementsByTagName){
var selectTags = document.getElementsByTagName("select");
for( ; hyl < selectTags.length; hyl++){
var tag = selectTags[hyl];
var x1 = tag.offsetLeft;
var y1 = tag.offsetTop;
var x2 = x1 + tag.offsetWidth;
var y2 = y1 + tag.offsetHeight;
if( ((topLeftX < x1 && x1 < bottomRightX) || (topLeftX < x2 && x2 < bottomRightX)) &&
((topLeftY < y1 && y1 < bottomRightY) || (topLeftY < y2 && y2 < bottomRightY)) ) {
tag.style.visibility = "hidden";
hiddenTags[ hiddenTags.length ] = tag;
}
else
tag.style.visibility = "visible";
}
}
}
function hy_collusionRecover(){// Hide Selectboxes by Yusuf Ušur Soysal - hayalet
var hyl = 0;
for( ; hyl