function MakeFieldsNull(xyz)
{
	window.setTimeout('MakeFieldsNullNow()',400);
}

function MakeFieldsNullNow(xyz)
{
	//alert("hi");
	document.forms['KINDUZNetworkLogin'].elements['emailAddress'].value="";
	document.forms['KINDUZNetworkLogin'].elements['password'].value="";
}

function unhide(divID) 
{
  var item = document.getElementById(divID);
  //alert(item);
  if (item) 
  {
    item.className=(item.className=='hidden')?'unhidden':'hidden';
  }
}

function onlyunhide(divID) 
{
  var item = document.getElementById(divID);
  if (item) 
  {
    if(item.className=='hidden')
	{
		item.className='unhidden';
	  	//alert("hi");
	}
  }
}

function TextBold(id) 
{
  if (document.getElementById) 
  {
    document.getElementById(id).style.fontWeight = 'bold';
  }
  else if (document.all) 
  {
    document.all[id].style.fontWeight = 'bold';
  }
}

function TextNormal(id) 
{
  if (document.getElementById) 
  {
    document.getElementById(id).style.fontWeight = 'normal';
  }
  else if (document.all) 
  {
    document.all[id].style.fontWeight = 'normal';
  }
}

//Time Code
var secs
var timerID = null
var timerRunning = false
var delay = 100
var layerNo = 1
var MaxLayerNo = 13
var TimeInterval = 3
var SpecificSelectionMade = false

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = TimeInterval
    StopTheClock()
    StartTheTimer()
	TextBold('StayAwayLink1')
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function SpecificSection(id)
{
	SpecificSelectionMade=true
	id=parseInt(id)-1
	//alert(layerNo);
	unhide('StayAway'+layerNo)
	TextNormal('StayAwayLink'+layerNo)
	StopTheClock()
	secs=0;
	layerNo=id
	StartTheTimer()
}

function StartTheTimer()
{
	//alert(secs)
    if (secs==0)
    {
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:
        //alert(layerNo+" "+MaxLayerNo + " "+(layerNo<MaxLayerNo))
		if(layerNo<MaxLayerNo)
		{
			if(SpecificSelectionMade!=true)
			{
				unhide('StayAway'+layerNo)
				TextNormal('StayAwayLink'+layerNo)
			}
			layerNo = layerNo + 1
			unhide('StayAway'+layerNo)
			TextBold('StayAwayLink'+layerNo)
			TimeInterval = 3
		}
		else if (layerNo==MaxLayerNo)
		{
			if(SpecificSelectionMade!=true)
			{
				unhide('StayAway'+layerNo)
				TextNormal('StayAwayLink'+layerNo)
			}
			layerNo = 1
			TimeInterval = 3
			unhide('StayAway'+layerNo)
			TextBold('StayAwayLink'+layerNo)
		}
		SpecificSelectionMade=false
		secs = TimeInterval
        self.status = secs
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}