﻿function hideRow(tableName) 
{
    var tbl = document.getElementById(tableName);
    var len = tbl.rows.length;
    var next = false;
    if (tbl.rows[len-1].style.display != "none") {tbl.rows[0].style.display = "block"; tbl.rows[len-1].style.display = "none";}
    else
    {
        for(i=0 ; i< len; i++)
        {
            if (tbl.rows[i].style.display != "none" && i<len-1) {tbl.rows[i].style.display = "none"; tbl.rows[i+1].style.display = "block"; i++;}
        }
    }
} 

function StartTimer(tableName) 
{
    var tbl = document.getElementById(tableName);
    var len = tbl.rows.length;  
    tbl.rows[0].style.display = "block";
	  if (len == 1)
		return;
    for(i=1 ; i< len; i++)
    {
        tbl.rows[i].style.display = "none";
    }
    window.setInterval("hideRow('"+tableName+"')", 10000);
}  

function changebox(input)
 {
    document.getElementById('logindiv1').style.display='none';
    document.getElementById('logindiv2').style.display='';
    document.getElementById(input).focus();
 };
 function restorebox(input)
 {
    if(document.getElementById(input).value=='')
    {
      document.getElementById('logindiv1').style.display='';
      document.getElementById('logindiv2').style.display='none';
    }
 };
 
 function deleteinput(input)
 {
    input.setAttribute("value",'');
 }