﻿var TipMessage={  // begin tipMessage Object
// -------------------------------------------------------------------------
//  Tip message box object for the contact page error messages
// -------------------------------------------------------------------------
sOpenTipID : "",                  
eTip : null,
    
iTipTop : "174px",
iTipLeft : "331px",
iChunk :  0,
iChunkStep :  6,
iChunkDelay : 15,
/* -----------------------------------------------------------------------------------
   show box with info message
-------------------	---------------------------------------------------------------- */
Constructor : function(aTop, aLeft) 
{
    if (aTop != "") this.iTipTop = aTop;
    if (aLeft != "") this.iTipLeft = aLeft;
}, 
/* -----------------------------------------------------------------------------------
   show box with info message
-------------------	---------------------------------------------------------------- */
Display : function(aTipID) 
{ 
	if ("" == aTipID) return false; 
    this.sOpenTipID = aTipID;
   	this.eTip = document.getElementById(this.sOpenTipID);
	if ("object" == typeof(this.eTip))
    {   
        this.iChunk = this.iChunkStep;
		with (this.eTip)
		{
		    style.left = this.iTipLeft; 
		    style.top = this.iTipTop;
		    style.clip = "rect(0 0 0 0)";
            style.visibility = "visible";
        }    
		var t = setTimeout("TipMessage.Unfold()", this.iChunkDelay);
	}	
}, // end Display function
// --------------------------------------------------------------------------
// Function Kill the tip box
// --------------------------------------------------------------------------
Remove :	function(aTipID)
{
    if ("" == aTipID) return false; 
	this.sOpenTipID = aTipID;
	if ("object" == typeof(document.getElementById(this.sOpenTipID))) 
	{
		document.getElementById(this.sOpenTipID).style.visibility = "hidden";
		this.sOpenTipID = "";
	}
},
// ----------------------------------------------------------------------------
// Function which incrementally displays Desc in appropriate style
// ----------------------------------------------------------------------------
Unfold :	function()
{
    this.eTip = document.getElementById(this.sOpenTipID);
    if (this.eTip != null)
    {
        var xWidth = this.eTip.clientWidth;   // ff fix?
	    var xHeight = this.eTip.clientHeight; // ff fix? 
	    var iPctWidth = xWidth * (this.iChunk / 100);
	    var iPctHeight = xHeight * (this.iChunk / 100);   
	    this.eTip.style.clip =  "rect(0pt " + iPctWidth + "pt " + iPctHeight + "pt 0pt)";
	    if (100 >= this.iChunk)
	    	var t = setTimeout("TipMessage.Unfold()", this.iChunkDelay);
        this.iChunk += this.iChunkStep;
    }
}

} // End TipMessage Object

TipMessage.Constructor("174px", "331px");
