 /*
 * Form Ajax Misc with Jquery - 
 *
 * Copyright (c) 2007 Christopher Natan (www.zonica.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 * $Rev: 1 $
 */
 
 
 
   function action_blockUI_standard()
   {    
	   str  = "<div style='height:28px;background-image:url(http://www.sandwellpga.co.uk/audit/img/spinner-big.gif);";
	   str1 = "background-repeat:no-repeat; margin-left:5px;margin-top:10px;'><strong>Loading...</strong></div>";
	   $.blockUI(str + str1 );   			   
   }
   function action_unblockUI_standard()
   {    
	   $.unblockUI();return false; 			   
   }
 
   function defaultNone()
   {}
   function setSteps(vhide,vshow)
   {
	     
		   $(vhide).hide();
		   $(vshow ).show("slow");   
   }

   function comboSubmit()
	      {  
		       var options = 
			  {  
				 target:  '.provision_target'
				 //success:  action_unblockUI_standard
			  }; 
			 
			    // action_blockUI_standard();
				 $("#formFilter").ajaxSubmit(options);
				 comboSubmitReport();
				 //return false; 
			 
 	     }
	function showLayer()
	{
	   $("#overlayer").show(); 	
	}
	function hideLayer()
	{
	   $("#overlayer").hide(); 	
	}
	
	
	function comboSubmitReport()
    {     options_y = {target: '.table_outer',success:hideLayer}; 
	      showLayer();
	      $("#formFilter_1").ajaxSubmit(options_y); 
		  //return false; 
    }    
  
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    } 

/* ajax config */
/* --------------------------------------------------------------------------------------------- */

$.ajaxSetup({
   timeout: 5000
 });

$().ajaxError(function(request, settings){
  msg = "\n Sorry for the interruption.An error occurred while processing you request."
  msg = msg + "\n ";
  msg = msg + "\n Please try again";
  
  $.unblockUI();
});     