

    var duration=5 // Specify duration of progress bar in seconds
    var _progressWidth = 100;	// Display width of progress bar
    var _progressBar = new String("ℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵℵ");
    var _progressEnd = 30;
    var _progressAt = 0;

function DisableValidators(validationGroup,flag)
{
    for (i = 0; i < Page_Validators.length; i++) 
    { 
    Page_Validators[i].enabled =false;
    if(Page_Validators[i].validationGroup == validationGroup)
    {

    Page_Validators[i].enabled = flag;              
    }
    }
}
  
function EnableVal(validationGroup)
{
    DisableValidators(validationGroup,true);
    Page_ClientValidate();   

    if(!Page_IsValid)
    {
    DisableValidators(validationGroup,false);
    }
    return Page_IsValid;
}


    // Create and display the progress dialog.
    // end: The number of steps to completion
    function ProgressCreate(end) {
	    // Initialize state variables
	   
	    _progressEnd = end;
	    _progressAt = 0;

	    // Move layer to center of window to show
	    if (document.all) {
	 
	    	// Internet Explorer
	    	
		    progress.className = 'show';		   
		    progress.style.left = (document.body.clientWidth/2) - (progress.offsetWidth/2);
		  
		    //progress.style.left="200px"
		    progress.style.top = document.documentElement.scrollTop + 20;//+(document.body.clientHeight/2) - (progress.offsetHeight);		    
		       //alert(document.documentElement.scrollTop);
		      //progress.style.top ="800px"
	    } else if (document.layers) {	// Netscape
	      
		    document.progress.visibility = true;
		    document.progress.left = (window.innerWidth/2) - 100;
		    document.progress.top = pageYOffset+(window.innerHeight/2) - 40;
	    } else if (document.getElementById) {	// Netscape 6+
	    
	        document.getElementById("progress").className = 'show';
		    var l = (window.innerWidth/2) - 100;
		    var t = pageYOffset + (window.innerHeight/2) - 40;
		    document.getElementById("progress").style.left = l + "px";
		    document.getElementById("progress").style.top = t + "px";

	    }

	    ProgressUpdate();	// Initialize bar
    }

    // Hide the progress layer
    function ProgressDestroy() {
	    // Move off screen to hide
	    if (document.all) {	// Internet Explorer
		    progress.className = 'hide';
	    } else if (document.layers) {	// Netscape
		    document.progress.visibility = false;
	    } else if (document.getElementById) {	// Netscape 6+
		    document.getElementById("progress").className = 'hide';
	    }
    }

    // Increment the progress dialog one step
    function ProgressStepIt() {
	    _progressAt++;
	    if(_progressAt > _progressEnd) 
	    _progressAt=1
	    //_progressAt = _progressAt % _progressEnd;
	    ProgressUpdate();
    }

    // Update the progress dialog with the current state
    function ProgressUpdate() {
	   // var n = (_progressWidth / _progressEnd) * _progressAt;
	    var n=_progressAt
	    if (document.all) {	// Internet Explorer
	      //  var bar = document.all["dialog"].document.getElementById("bar");
	      var bar =document.getElementById("bar");
	    
	        //var bar = dialog.bar;
		   
 	    } else if (document.layers) {	// Netscape 	    
//		    var bar = document.layers["progress"].document.forms["dialog"].bar;
            var bar = document.layers["progress"].document.getElementById("bar");
		    n = n * 0.55;	// characters are larger
	    } else if (document.getElementById){	    
                    //var bar=document.dialog.bar
                    var bar=document.getElementById("bar");
            }
	    var temp = _progressBar.substring(0, n);
	    bar.value = temp;
    }

    // Demonstrate a use of the progress dialog.
    function Demo() {
      
	    ProgressCreate(30);
	    window.setTimeout("Click()", 100);
    }

    function Click() {
    
	    if(_progressAt >= _progressEnd) {
	    _progressAt=0
	    if (document.all) {	// Internet Explorer
	      //  var bar = document.all["dialog"].document.getElementById("bar");
	      var bar =document.getElementById("bar");
	    
	        //var bar = dialog.bar;
		    
 	    } else if (document.layers) {	// Netscape 	    
//		    var bar = document.layers["progress"].document.forms["dialog"].bar;
            var bar = document.layers["progress"].document.getElementById("bar");
		    n = n * 0.55;	// characters are larger
	    } else if (document.getElementById){	    
                    var bar=document.dialog.bar
            }
	    bar.value="" 
	  Demo();
		   // ProgressDestroy();
		    return;
	    }
	    ProgressStepIt();
	    window.setTimeout("Click()", (duration-1)*1000/10);
    }

    function CallJS(jsStr) { 
  
      return eval(jsStr);
      //return true;
    }
        
    // Create layer for progress dialog
    document.write("<span id=\"progress\" class=\"hide\">");
//	document.write("<FORM name=\"dialog\" id=\"dialog\">");
	document.write("<TABLE border=2 style=\"background-color:Navy;\" >");
	document.write("<TR><TD ALIGN=\"center\" style=\"FONT-FAMILY:trebuchet ms; PADDING:0px; FONT-WEIGHT:bold; COLOR:white;\">");
	document.write("Please wait<BR>");
	document.write("<input type=label name=\"bar\" id=\"bar\" value=\"Please Wait.........\" size=\"" + _progressWidth/2 + "\"");
	
	if(document.all || document.getElementById) 	// Microsoft, NS6
		document.write(" bar.style=\"color:navy;\">");
	else	// Netscape
		document.write(">");
		
	document.write("</TD></TR>");
	document.write("</TABLE>");
	//document.write("</FORM>");
    document.write("</span>");
   // ProgressDestroy();	// Hides

     