//Begin Toolltip Timer
var tipTimer;
//End Toolltip Timer

function locateObject(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=locateObject(n,d.layers[i].document); return x;
}

function hideTooltip(object)
{
if (document.all)
{
locateObject(object).style.visibility="hidden"
locateObject(object).style.left = 1;
locateObject(object).style.top = 1;
return false
}
else if (document.layers)
{
locateObject(object).visibility="hide"
locateObject(object).left = 1;
locateObject(object).top = 1;
return false
}
else
return true
}

function showTooltip(object,e, tipContent, backcolor, bordercolor, textcolor, displaytime)
{
window.clearTimeout(tipTimer)

if (document.all)
{
locateObject(object).style.top=document.body.scrollTop+event.clientY+20

locateObject(object).innerHTML='<table style="font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 10px; border: '+bordercolor+'; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; background-color: '+backcolor+'" width="10" border="0" cellspacing="1" cellpadding="1"><tr><td nowrap><font style="font-family: Verdana; font-size: 10px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table> '

if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
{ 
locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-10;
}
else
{
locateObject(object).style.left=document.body.scrollLeft+event.clientX
}
locateObject(object).style.visibility="visible"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
}
else if (document.layers)
{
locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><table width="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td nowrap><font style="font-family: Verdana; font-size: 10px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table></td></tr></table>')
locateObject(object).document.close()
locateObject(object).top=e.y+20

if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth))
{
locateObject(object).left = window.innerWidth - locateObject(object).clip.width-10;
}
else
{
locateObject(object).left=e.x;
}
locateObject(object).visibility="show"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
}
else
{
return true;
}
}
isDOM=document.getElementById //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
isMSIE=document.all && document.all.item //Microsoft Internet Explorer 4+
isNetscape4=document.layers //Netscape 4.*
isOpera=window.opera //Opera
isOpera5=isOpera && isDOM //Opera 5+
isMSIE5=isDOM && isMSIE && !isOpera //MSIE 5+
isMozilla=isNetscape6=isDOM && !isMSIE && !isOpera

var obj;

function getLayer(layerName, parentLayerName){
  if(isDOM){ return document.getElementById(layerName); }
  if(isMSIE){ return document.all[layerName]; }
  if(isNetscape4){ return eval('document.layers[layerName]'); }
  return false;
}

function ts(e,what){
  mousex = e.clientX;
  mousey = e.clientY;
  pagexoff = 0;
  pageyoff = 0;
  if(isMSIE5){
    pagexoff = document.body.scrollLeft;
    pageyoff = document.body.scrollTop;
  }
  else{
    pagexoff = window.pageXOffset;
     pageyoff = window.pageYOffset;
  }
  if(getLayer(what)){
    if(isNetscape4)
      obj = getLayer(what);
    else
      obj = getLayer(what).style;
 	
  	if(obj){
	    leftoff = mousex-pagexoff;
    	obj.left = (mousex+pagexoff);
  
	    topoff = mousey-pageyoff;
    	if(isOpera && topoff <= 30)
    	  obj.top = mousey + 20;
	    else 
		if( mousey <= 30) 
	        obj.top = (mousey+pageyoff) + 20;
		else 
	      if (isOpera) 
    	    obj.top = mousey + 20;
	    else
    	  obj.top = (mousey+pageyoff) + 20;
   		
		
	    if(isNetscape4)
    	  obj.visibility = 'show';
	    else
    	  obj.visibility = 'visible';
	  }
   }
  return true;
}

function tc(){
  if(obj){
    if(isNetscape4)
      obj.visibility = 'hide';
    else
      obj.visibility='hidden';
  }
  return true
}

function p(x, y, z) {
	for (a = 0; a < arguments.length; a++) {
		arguments[a] = arguments[a].split('');
		arguments[a] = arguments[a].reverse();
		arguments[a] = arguments[a].join('');
	}
	document.location.href = "mailto:" + x + "@" + y + "." + z;
}
function p_u(x, y, z) {
	c = arguments;
	for (b = 0; b < c.length; b++) {
        if (b == 3) continue;
		c[b] = c[b].split(',');
		c[b] = c[b].reverse();
		for (a = 0; a < c[b].length; a++)
			c[b][a] = String.fromCharCode(c[b][a] - 10);
		c[b] = c[b].join('');
	}
	document.location.href = "mailto:" + c[0] + "@" + c[1] + "." + c[2] + "?subject=\"" + c[3] + "\"";
	
}
