//setTimeout("changeText(thisTextBox, nextTextBox)",100)
//document.getElementById(thisTextBox).style.color = "green"
//begOpacity = document.getElementById(thisTextBox).filters[0].opacity
 //document.getElementById(futureTextBox).style.filter = "alpha(opacity=' + 1.00 + ')"
	
var currentTextBox
var futureTextBox

/* NOTE  if text in next text box is flickering at beginning, increase timeout time with ChangeText
	or change the timeout base with ChangeOpac.  This ratio seems to work 25, 2000 or 35, 3000 
	setTimeout("function to call", milliseconds to wait before calling) */

function moveText(thisTextBox, nextTextBox)
{
	currentTextBox = thisTextBox
	futureTextBox = nextTextBox
  // fade the current text out
	j = 0
	for (i=90; i>0; i--)
	{
		setTimeout("changeOpac(" + i + ")", j * 25)
		j = j + 1
	}
	setTimeout("changeText()",2000)
}

//change the opacity for different browsers 
function changeOpac(opacityValue) 
{ 
    var itemToDim = document.getElementById(currentTextBox).style
    //alert(currentTextBox)
    //alert(opacityValue)
    itemToDim.opacity = (opacityValue / 100)
    itemToDim.MozOpacity = (opacityValue / 100)
    itemToDim.KhtmlOpacity = (opacityValue / 100)
    itemToDim.filter = "alpha(opacity=" + opacityValue + ")"
} 

function changeText()
{
	document.getElementById(currentTextBox).style.display = "none"
 	document.getElementById(futureTextBox).style.display = "inline"

 	//alert(futureTextBox)

// fade the new text in, j is used to determine speed of fading, i is used to change opacity from 0% to 100%

	currentTextBox = futureTextBox
	//alert(currentTextBox)
	j = 0
	for (i=0; i<100; i++)
	{
		setTimeout("changeOpac(" + i + ")", j * 25)
		j = j + 1
	}
	 	//alert("done")
}


// Posible new options in future - not being used
function XfadeIn(obj)
 {
 	
 		if (!document.getElementById || !document.getElementsByTagName)
   {
      return
   }
   
        var opacity = obj.style.opacity * 100;
        if (opacity < 100)
        {
                opacity += 10;
                setOpacity(obj, opacity);
                //setTimeout("fadeIn('" + obj + "')", 100);
								setTimeout("fadeIn(document.getElementById(obj))", 100);

        }

 }
 
 function xfadeOut()
 {
 	  
        var opacity = obj.style.opacity * 100;
        if (opacity > 50)
        {
                opacity -= 10;
                setOpacity(obj, opacity);
                setTimeout("fadeOut('" + obj + "')", 100);
setTimeout("fadeIn(document.getElementById('" + obj.id + "'))", 100);

        }
        
       
 }
