// JavaScript Document
var timer,time;
var j=-455;
var r=-1;
var scr=document.getElementById("pop").style.right;
function open_scr(kind) {

    $.post('anli.ashx', { kind: kind }, function (data) {


        $("#strHtml").html(data);

    });

  if(j==-1)
  {
	close_scr();
	
	setTimeout("open_scr()",2000)
  }
  else
  {
	 clearTimeout(time);
     if(j<=0)
	  {
         timer=setTimeout("open_scr()",25)
	     j=j/1.1
  	     document.getElementById("pop").style.right=j+"px";
	     if(j>-1)
	     {
	        clearTimeout(timer);	
	        document.getElementById("pop").style.right=0+"px";
		    j=-1;
			
	     }
	  }
	  else
	  {
	     clearTimeout(timer);	
	     document.getElementById("pop").style.right=0+"px";
	     j=-1;
	  }
  }
}

function close_scr()
{  clearTimeout(timer);
   if(j>-455)
   {
      
	  if(j<-455)
	  {
		 	
	     document.getElementById("pop").style.right=-456+"px";
	     j=-455;
		 //alert(document.getElementById("pop").style.right);
		 //alert(j);
		 //setTimeout(null,500);
		 time=null;
		 //document.getElementById("pop1").style.display='none';
		 clearTimeout(time);
	  }
	  
	  j=j-20;
      time=setTimeout("close_scr()",25);
      document.getElementById("pop").style.right=j+"px";
	  
   }
   
}








