
/***********************************************
* Image Thumbnail viewer- © Dynamic Drive (www.dynamicdrive.com)
* Last updated Sept 26th, 03'. This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var urlText=""
var tauto="auto"
var tpointer="pointer"
var ie=document.all
var imgwidth=200
var imgheight=200
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var sidetipobj=document.all? document.all["sidetip"] : document.getElementById? document.getElementById("sidetip") : ""

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}

function sidetip(thetext){
if (ns6||ie){
	urlText=thetext.toLowerCase()
	enabletip=true
	sidetipobj.innerHTML="<table style='width:100%'><tr><td><span id=titletext>"+thetext+"</span></td><td><span id=closetext onClick='hsidetip()'>x</span></td></tr>"
	sidetipobj.innerHTML+="<tr><td colspan=2><iframe FRAMEBORDER=0 SCROLLING=NO height=200 width=200 marginwidth=0 marginheight=0 src=clips/"+urlText+".htm></iframe></td></tr></table>"
	positionsidetip()
	sidetipobj.style.visibility="visible"
	return false
	}
}

function showsidetip(){
	if (ie||ns6)
		sidetipobj.innerHTML="<div align=right id=dragbar><span id=closetext onClick='hsidetip()'>Close</span></div><br><iframe FRAMEBORDER=0 SCROLLING=NO height=200 width=200 marginwidth=0 marginheight=0 src="+urlText+"></iframe>"
		sidetipobj.style.visibility="visible"
	}

function clearshowsidetip(){
	if (window.delayshowst)
		clearTimeout(delayshowst)
}



function positionsidetip(e){
if (enabletip){
	if (ie||ns6){
		pgyoffset=ns6? parseInt(pageYOffset) : parseInt(ietruebody().scrollTop)
		horzpos=ns6? pageXOffset+20 : ietruebody().scrollLeft+20
		vertpos=ns6? pgyoffset+window.innerHeight/2-imgheight/2 : pgyoffset+ietruebody().clientHeight/2-imgheight/2
		if (window.opera && window.innerHeight) //compensate for Opera toolbar
			vertpos=pgyoffset+window.innerHeight/2-imgheight/2
		vertpos=Math.max(pgyoffset, vertpos)
		sidetipobj.style.left=horzpos+"px"
		sidetipobj.style.top=vertpos+"px"
		}		
	}
}


function hsidetip(){
if (ns6||ie){
	enabletip=false
	sidetipobj.style.visibility="hidden"
	sidetipobj.style.left="-1000px"
	sidetipobj.style.backgroundColor=''
	sidetipobj.style.width=200
	}
}

function hidesidetip(){
	if (ie||ns6){
		clearshowsidetip()
		delayhidest=setTimeout("hsidetip()",500)
		}
	}

function clearhidesidetip(){
	if (window.delayhidest)
		clearTimeout(delayhidest)
}

document.onmousemove=positionsidetip
