﻿<!-- Begin Program Interface Script -->
/*
    Submits targetValue via targetAgent to the server.
    This method is meant to be used with various
    dynamically created controls (such as paging).
*/
function submitScreenValue(targetAgentId, targetValue)
{
    // Only process if the browser supports getElementById
    if(document.getElementById)
    {
        var waitobject = document.getElementById('divwait');
        var agent = document.getElementById(targetAgentId);

        if(waitobject != null)
        {
            waitobject.style.display = "block";
        }

        // If the target agent was found, assign targetValue 
        // to its value property
        if(agent != null)
        {
            agent.value = targetValue;
            
            executePostBack();
        }
    }
}

/*
    Submits the form so that edits and values can be 
    passed back to the server.
*/
function executePostBack()
{
	var form1;
	
	if(document.Form1)
	{
		form1 = document.aspnetForm;
	}
	else if(document.forms)
	{
		form1 = document.forms["aspnetForm"]; 
	}
	else if(dcoument.getElementById)
	{
		form1 = document.getElementById("aspnetForm");
	}
	
	if(form1 != null)
	{
        var waitobject = document.getElementById('divwait');
        var dataTransfer = document.getElementById('ctl00_dataTransfer');
       
        if(dataTransfer != null)
        {
            dataTransfer.value = '';
        }
        
	    if(waitobject != null)
        {
            waitobject.style.display = "block";
        }

		form1.submit();
	}	
}
<!-- End Program Interface Script -->
