function showhide(what)
{
        if (document.getElementById(what).style.display=='none')
        {
                //what.style.display='';
                document.getElementById(what).style.display = '';
        }
        else
        {
                //what.style.display='none';
                document.getElementById(what).style.display = 'none';
        }
}

function Validate_view()
{
        document.reg.first.value="";
        document.reg.last.value="";
        document.reg.email.value="";
        document.reg.submit();
}
function Validate_export()
{
        document.exp.submit();
}


function jumpScroll() {
       window.scroll(0,1600); // horizontal and vertical scroll targets
}
function getdata(){             
        document.reg.submit();  
}
function startExport(chartid){
    //Get reference to chart.
    var chart = getChartFromId(chartid);
    //Now, we proceed with exporting only if chart has finished rendering.
    if (chart.hasRendered()==true){
       chart.exportChart();
    } else {
       alert("Please wait for the chart to finish rendering, before you can invoke exporting");
    }
}
function DeleteStats(id_del,name_del)
{
        document.reg_stats.id_del.value = id_del;
        document.reg_stats.mode.value = "delete";

        var answer = confirm("Are you sure you want to Delete : " + name_del + " ?");
        if(answer)
        {
                document.reg_stats.submit();
        }
        else
        {
                return;
        }
}
function DeleteStats2()
{
        document.reg_stats.mode.value = "delete_all";

        var answer = confirm("Are you sure you want to Delete all selected checkboxes?");
        if(answer)
        {
                document.reg_stats.submit();
        }
        else
        {
                return;
        }
}
function selectall()
{
 for (var i=0;i<document.reg_stats.elements.length;i++)
 {
  var e=document.reg_stats.elements[i];
  if ((e.name != 'all') && (e.type == 'checkbox'))
   e.checked = document.reg_stats.all.checked;
 }
}
function windowPopUp(newurl)
{
        apopup = window.open(newurl,'ContactUsers','left=30,top=40,width=700,height=1000,scrollbars=1,resizable=1');
}
function showhidestats(what,whatimg)
{
        if (document.getElementById(what).style.display=='none')
        {
                document.getElementById(what).style.display = '';
                document.getElementById(whatimg).src = 'images/stats_up.gif';
        }
        else
        {
                document.getElementById(what).style.display = 'none';
                document.getElementById(whatimg).src = 'images/stats_down.gif';
        }
}


function hidestats(what,whatimg)
{
        document.getElementById(what).style.display = 'none';
        document.getElementById(whatimg).src = 'images/stats_down.gif';
}

