aux=-1;
		       count=0;
		       alturaMaxima=360;
		       mover = "true";                      function stop(){
		           mover="false";
		       }
		              function play(){
		           if(mover!="true"){                               s=document.getElementById("div_bola").style.top;
		               s=s.substring(0, s.length-2  );
		               if(s<=alturaMaxima)                       mover="true";                           }
		       }
		              function move(){
		                      if(mover=="true"){
		               var top=0;
		               var left=0;
		               s=document.getElementById("div_bola").style.top;
		               s=s.substring(0, s.length-2  );
		               top=(s*1)+(2);
		               s=document.getElementById("div_bola").style.left;
		               s=s.substring(0, s.length-2  );
		               left=(s*1)+(5*aux);
		               if((count==100)||(count==-100)){
		                   count=0;
		                   aux*=-1;
		               }
		               count=count+(5*aux);
		               document.getElementById("div_bola").style.top=top+"px";
		               document.getElementById("div_bola").style.left=left+"px";
		           }
		           s=document.getElementById("div_bola").style.top;
		           s=s.substring(0, s.length-2  );
		           if(s<=alturaMaxima)
		               setTimeout("move()",40);
		       }
		       
		       
		       
		       
		       
		       
		       
		       function isValidNumber(val){
		      if(val==null){return false;}
		      if (val.length==0){return false;}
		      var DecimalFound = false
		      for (var i = 0; i < val.length; i++) {
		            var ch = val.charAt(i)
		            if (i == 0 && ch == "-") {
		                  continue
		            }
		            if (ch == "." && !DecimalFound) {
		                  DecimalFound = true
		                  continue
		            }
		            if (ch < "0" || ch > "9") {
		                  return false
		            }
		      }
		      return true
		}
	
		function simulacao(){
		
			var maqs = document.getElementById("maquinas").value;
			document.getElementById("resultado").innerHTML='';
			
			var html="";
			
			if((!isValidNumber(maqs)||(maqs<=0)))
				alert("Valor inválido");
			else{
				html+="<br /><table border=\"0\" width=\"90%\" class=\"linha_tabela\"><tr><td align=\"left\">Nr. de máquinas: </td><td align=\"right\" width=\"20%\">"+(maqs)+"</td></tr><tr><td align=\"left\">Taxa única de setup: </td><td align=\"right\">R$ 420,00*</td></tr>"
				
				if(maqs==1)				
					html+="<tr><td align=\"left\">Mensalidade : </td><td align=\"right\"> R$ 72,00*</td></tr>";
				else
					html+="<tr><td align=\"left\">Mensalidade :  </td><td align=\"right\">R$ "+(((maqs-1)*32)+72)+",00*<br/></tr></td>";

				html+="<tr><td align=\"left\"><small><br />*Valores sujeitos a confirmação.</small></td></tr>"
				document.getElementById("resultado").innerHTML=html;
			}
			
		}

		
		var janelaPedido;
			function abreJanelaPedido(){
				
				if ((!janelaPedido)||(janelaPedido.closed)){
					janelaPedido = window.open('pedido.htm','janelaPedido','menubar=1,toolbar=0,status=1,width=720px,height=400,scrollbars=yes');
				}
				
				if((!janelaPedido.open))
					janelaPedido.open();

				janelaPedido.focus();
			}