

    function sendClearRequst(){
//      toggleWindowHTML("loadingGif");
        params = "updateQuery=updateQuery&action=clear&form=form&sbumit=submit";
         $.post("/abmi/ajax", params, refreshPage, "xml");
//     var xh = EsriUtils.sendAjaxRequest("/abmi/index.jsp", params, false, function() { refreshPage(xh); });
     
    }
    
      function sendRotationRequst(){
        var select =  document.getElementById("selectOneRotation");
        var ind = select.selectedIndex;
        var rotationName = select.options[ind].value;
        var loadinggif = document.getElementById("loadingGif");      
        params = "updateQuery=updateQuery&action=setRotation&rotation=" + rotationName;
         $.post("/abmi/ajax", params, refreshPage, "xml");
        /*var xh = EsriUtils.sendAjaxRequest("/abmi/index.jsp", params, false, function() { refreshPage(xh); });*/
     
    }
    
    function refreshPage(xml){
   
         var pathTag = xml.getElementsByTagName("path");
       
         if (pathTag.length > 0){
           
          window.location = "/abmi/" +pathTag.item(0).firstChild.nodeValue;
   

         }
    }
    
    function showMoreRegion(id){
     var height = $('#'+id).dialog('option', 'height');
     if (!height){
            $('#'+id).dialog({
			bgiframe: true,
			resizable: true,
			modal: false,
                        autoOpen:true,
                        minHeight: 50,
			buttons: { "Ok": function() { $(this).dialog("close"); } }                      
		});
	
        }
       $('#'+id).dialog('open');
        
    }
    