///***********************************************************************///
///***<!-- Contains Copyrighted Materials by (c) ISPRODUCTIONS 2006 -->***///
///***********************************************************************///
var floattext=new Array()
floattext[0]='ImageArchive is a trademark of ISProductions' 
floattext[1]='Some other floatie text' //<a href="" onmouseover="ClearTO();" onmouseout=""></a>

var floatiewidth="250px" //default width of floatie in px
var floatieheight="" //default height of floatie in px. Set to "" to let floatie content dictate height.
var floatiebgcolor="#E5E5E5" //default bgcolor of floatie
var fadespeed=70 //speed of fade (5 or above). Smaller=faster.

var offsetxpointFlotie=25 //Customize x offset of floatie tooltip
var offsetypointFlotie=20 //Customize y offset of floatie tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enableflotie=false
if (ie||ns6)
//var floatobj=document.all? document.all["dhtmlfloatie"] : document.getElementById? document.getElementById("dhtmlfloatie") : ""

var idObjFloatie = "dhtmlfloatie";
var floatobj=document.getElementById(idObjFloatie);
var leave = false;
var nice = true;

var baseopacity=0
function slowhigh(which2){
	imgobj=which2
	browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(imgobj)",fadespeed)
}

function instantset(degree){
	cleartimer()
	if (browserdetect=="mozilla")
	imgobj.style.MozOpacity=degree/100
	else if (browserdetect=="ie")
	imgobj.filters.alpha.opacity=degree
}

function cleartimer(){
if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function paramexists(what){
	
	return(typeof what!="undefined" && what!="")
}

function showfloatie(thetext, e, optbgColor, optWidth, optHeight){
	var dsocx=(window.pageXOffset)? pageXOffset: ietruebody().scrollLeft;
	var dsocy=(window.pageYOffset)? pageYOffset : ietruebody().scrollTop;
	
	floatobj.style.display="block"
	
	if( paramexists(optbgColor) )
	    floatobj.className = optbgColor;
	else
	    floatobj.style.backgroundColor = floatiebgcolor;
	
	floatobj.style.width=paramexists(optWidth)? optWidth+"px" : floatiewidth
	floatobj.style.height=paramexists(optHeight)? optHeight+"px" : floatieheight!=""? floatieheight : ""
	floatobj.innerHTML=thetext
	
	var floatWidth=floatobj.offsetWidth>0? floatobj.offsetWidth : floatobj.style.width
	var floatHeight=floatobj.offsetHeight>0? floatobj.offsetHeight : floatobj.style.width
	var winWidth=document.all&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
	var winHeight=document.all&&!window.opera? ietruebody().clientHeight : window.innerHeight
	e=window.event? window.event : e
	floatobj.style.left=dsocx+winWidth-floatWidth-5+"px"
	if (e.clientX>winWidth-floatWidth && e.clientY+20>winHeight-floatHeight){
		floatobj.style.top=dsocy+5+"px";
		 }
	else {
		floatobj.style.top=dsocy+winHeight-floatHeight-5+"px";
		
		}
	slowhigh(floatobj)
	enableflotie = true;
	positionflotie(e);
}

function hidefloatie(){
	var floatobj=document.getElementById(idObjFloatie)
	floatobj.style.display="none"
	enableflotie = false;

}
function getPos(e) {
    var posx = 0; var posy = 0; 
    if (!e) var e = window.event; 
    if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } 
    else if (e.clientX || e.clientY) { 
        posx = e.clientX + document.body.scrollLeft; posy = e.clientY + document.body.scrollTop; } // posx and posy contain the mouse position relative to the document // Do something with this information 

}


function positionflotie(e){
	if (enableflotie){
	var curX=(ns6)?e.pageX : event.x+ietruebody().scrollLeft;
	var curY=(ns6)?e.pageY : event.y+ietruebody().scrollTop;
	
	
	//Find out how close the mouse is to the corner of the window
	var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpointFlotie : window.innerWidth-e.clientX-offsetxpointFlotie-20
	//var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypointFlotie : window.innerHeight-e.clientY-offsetypointFlotie-20
    if (ie&&!window.opera)	{
        var bottomedge = ietruebody().clientHeight-event.clientY-offsetypointFlotie ;

	}
   else	
       //	var bottomedge = window.innerHeight-e.clientY-offsetypointFlotie-20;
		var bottomedge = document.body.offsetHeight-e.clientY-offsetypointFlotie-20;

    
  
	var leftedge=(offsetxpointFlotie<0)? offsetxpointFlotie*(-1) : -1000;
//	if the horizontal distance isn't enough to accomodate the width of the context menu
	if (rightedge<floatobj.offsetWidth)
		  //move the horizontal position of the menu to the left by it's width
		floatobj.style.left=ie? ietruebody().scrollLeft+event.clientX-floatobj.offsetWidth+"px" : window.pageXOffset+e.clientX-floatobj.offsetWidth+"px"
	else if (curX<leftedge)
		  floatobj.style.left="5px"
	      else
		  //position the horizontal position of the menu where the mouse is positioned
		  floatobj.style.left=curX+offsetxpointFlotie+"px"

	//same concept with the vertical position
//	if (bottomedge<floatobj.offsetHeight)
//		floatobj.style.top=ie? ietruebody().scrollTop+event.clientY-floatobj.offsetHeight-offsetypointFlotie+"px" : window.pageYOffset+e.clientY-floatobj.offsetHeight-offsetypointFlotie+"px"
		floatobj.style.top=ie? ietruebody().scrollTop+event.clientY-floatobj.offsetHeight-offsetypointFlotie+"px" : e.pageY-floatobj.offsetHeight-offsetypointFlotie+"px"	
//	else
//		floatobj.style.top=curY+offsetypointFlotie+"px";

	floatobj.style.visibility="visible"
	}
	
}

var toid=0;

function ClearTO() {
	if (toid!=0) {
		clearTimeout(toid);
		toid = 0;
	}
}
function SetTO() {
	toid = setTimeout('hidefloatie()',300);
}
function QuitTO() {
	if (toid!=0)
		ClearTO();
	toid = setTimeout('hidefloatie()',300); 

}