//Creado con Ardora - www.webardora.net
//bajo licencia Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)
//para otros usos contacte con el autor
var timeAct=360; timeIni=360; timeBon=0;
var successes=0; successesMax=9; attempts=0; attemptsMax=1;
var score=0; scoreMax=9; scoreInc=1; scoreDec=1
var typeGame=0;
var tiTime=false;
var tiTimeType=0;
var tiButtonTime=true;
var textButtonTime="Comenzar";
var tiSuccesses=true;
var tiAttempts=true;
var tiScore=true;
var startTime;
var colorBack="#FFFDFD"; colorButton="#91962F"; colorText="#000000"; colorSele="#FF8000";
var goURLNext=false; goURLRepeat=false;tiAval=false;
var scoOk=0; scoWrong=0; scoOkDo=0; scoWrongDo=0; scoMessage=""; scoPtos=10;
var fMenssage="Verdana, Geneva, sans-serif";
var fActi="Verdana, Geneva, sans-serif";
var fEnun="Verdana, Geneva, sans-serif";
var timeOnMessage=5; messageOk="Muy bien. Continuamos."; messageTime=""; messageError="Fíjate bien."; messageErrorG="Fíjate bien."; messageAttempts="Segundo fallo. Espera a que se recargue la actividad."; isShowMessage=false;
var urlOk=""; urlTime=""; urlError=""; urlAttempts="";
var goURLOk="_blank"; goURLTime="_blank"; goURLAttempts="_blank"; goURLError="_blank"; 
borderOk="#008000"; borderTime="#FF0000";borderError="#FF0000"; borderAttempts="#FF0000";
var wordsGame="bnVtRGVjaTAxQg"; wordsStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
function giveZindex(typeElement){var valueZindex=0; capas=document.getElementsByTagName(typeElement);
for (i=0;i<capas.length;i++){if (parseInt($(capas[i]).css("z-index"),10)>valueZindex){valueZindex=parseInt($(capas[i]).css("z-index"),10);}}return valueZindex;}
var points=[["32","29","0","0"],["104","27","0","0"],["107","67","0","0"],["34","76","0","0"],["215","108","1","0"],["321","108","1","0"],["320","152","1","0"],["218","150","1","0"],["359","21","2","2"],["376","19","2","2"],["376","62","2","2"],["335","65","2","2"],["340","23","2","2"],["66","184","3","2"],["107","185","3","2"],["108","226","3","2"],["23","224","3","2"],["26","185","3","2"],["184","183","4","2"],["246","182","4","2"],["246","231","4","2"],["133","227","4","2"],["138","183","4","2"],["224","21","5","0"],["299","25","5","0"],["301","67","5","0"],["167","72","5","0"],["163","31","5","0"],["393","177","6","6"],["459","177","6","6"],["460","222","6","6"],["329","222","6","6"],["321","179","6","6"],["129","100","7","7"],["187","102","7","7"],["187","141","7","7"],["76","141","7","7"],["74","105","7","7"],["407","83","8","7"],["478","86","8","7"],["478","131","8","7"],["345","136","8","7"],["341","89","8","7"]];
var backSrc="numDeci01B_resources/media/act01.jpg";
var Shape = function () {this.x=undefined;this.y=undefined;};
Shape.prototype={fill:function(context){context.save();context.fillStyle=this.fillStyle;this.createPath(context);context.fill();context.restore();},
stroke:function(context){context.save();this.createPath(context);context.stroke();context.restore();},
isPointInPath:function(context,x,y){this.createPath(context);return context.isPointInPath(x, y);},};
var Polygon=function(){this.points = [];this.numInd=0;};Polygon.prototype=new Shape();Polygon.prototype.addPoint=function(x,y){this.points.push(new Point(x,y));};
Polygon.prototype.createPath=function (context) {if (this.points.length === 0)return;context.beginPath();
context.moveTo(this.points[0].x,this.points[0].y);for (var i=0; i < this.points.length; ++i) {context.lineTo(this.points[i].x,this.points[i].y);}context.closePath();};
var Point=function(x,y){this.x=x;this.y=y;};var shapes=[];
var polygonPoints=[[new Point(32,29),new Point(104,27),new Point(107,67),new Point(34,76)],[new Point(215,108),new Point(321,108),new Point(320,152),new Point(218,150)],[new Point(359,21),new Point(376,19),new Point(376,62),new Point(335,65),new Point(340,23)],[new Point(66,184),new Point(107,185),new Point(108,226),new Point(23,224),new Point(26,185)],[new Point(184,183),new Point(246,182),new Point(246,231),new Point(133,227),new Point(138,183)],[new Point(224,21),new Point(299,25),new Point(301,67),new Point(167,72),new Point(163,31)],[new Point(393,177),new Point(459,177),new Point(460,222),new Point(329,222),new Point(321,179)],[new Point(129,100),new Point(187,102),new Point(187,141),new Point(76,141),new Point(74,105)],[new Point(407,83),new Point(478,86),new Point(478,131),new Point(345,136),new Point(341,89)]];
var game=[];indexGame=0;
var area=["0","0","2","2","2","0","6","7","7"];
var areaSolved=["N","N","N","N","N","N","N","N","N"];
var areaWord=["3 décimas","3 décimas","3 unidades","3 unidades","3 unidades","3 décimas","3 milésimas","3 centésimas","3 centésimas"];
var areaHelp=["3 décimas","3 décimas","3 unidades","3 unidades","3 unidades","3 décimas","3 milésimas","3 centésimas","3 centésimas"];
var areaWrong=["","","","","","","","",""];
var initMessageError="Fíjate bien.";
var wordPointX=["46","255","359","66","184","224","393","129","407"];
var wordPointY=["29","108","21","184","183","21","177","100","83"];
var areaColor=["#FFFF00","#FFFF00","#FF8000","#FF8000","#FF8000","#FFFF00","#8080FF","#808000","#808000"];
var pathMedia="numDeci01B_resources/media/"
var auMP3=["","","","","","","","",""];
var auOGG=["","","","","","","","",""];
colorText="#2B2B2B";colorButton="#D5D200";colorBack="#FFFFFF";colorSele="#D94C00";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
