//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=7; attempts=0; attemptsMax=1;
var score=0; scoreMax=7; 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="Bien hecho."; messageTime=""; messageError="Ese no es el cuadrado que buscamos"; messageErrorG="Ese no es el cuadrado que buscamos"; messageAttempts="Vamos a empezar otra vez."; 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="YTAybWF0ZXMwMQ"; 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=[["372","0","0","0"],["436","0","0","0"],["438","124","0","0"],["315","126","0","0"],["314","3","0","0"],["223","0","1","0"],["288","0","1","0"],["288","126","1","0"],["156","126","1","0"],["158","1","1","0"],["529","146","2","2"],["592","146","2","2"],["593","271","2","2"],["463","272","2","2"],["461","147","2","2"],["74","1","3","3"],["134","0","3","3"],["133","125","3","3"],["16","124","3","3"],["15","1","3","3"],["224","146","4","3"],["289","146","4","3"],["290","270","4","3"],["158","271","4","3"],["158","145","4","3"],["527","1","5","5"],["590","2","5","5"],["592","124","5","5"],["463","125","5","5"],["463","2","5","5"],["75","146","6","5"],["132","147","6","5"],["134","269","6","5"],["14","267","6","5"],["15","148","6","5"]];
var backSrc="a02mates01_resources/media/act02.png";
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(372,0),new Point(436,0),new Point(438,124),new Point(315,126),new Point(314,3)],[new Point(223,0),new Point(288,0),new Point(288,126),new Point(156,126),new Point(158,1)],[new Point(529,146),new Point(592,146),new Point(593,271),new Point(463,272),new Point(461,147)],[new Point(74,1),new Point(134,0),new Point(133,125),new Point(16,124),new Point(15,1)],[new Point(224,146),new Point(289,146),new Point(290,270),new Point(158,271),new Point(158,145)],[new Point(527,1),new Point(590,2),new Point(592,124),new Point(463,125),new Point(463,2)],[new Point(75,146),new Point(132,147),new Point(134,269),new Point(14,267),new Point(15,148)]];
var game=[];indexGame=0;
var area=["0","0","2","3","3","5","5"];
var areaSolved=["N","N","N","N","N","N","N"];
var areaWord=["✓","✓","✓","✓","✓","✓","✓"];
var areaHelp=["1 décima","1 décima","5 centésimas","5 décimas","5 décimas","2 décimas","2 décimas"];
var areaWrong=["","","","","","",""];
var initMessageError="Ese no es el cuadrado que buscamos";
var wordPointX=["372","223","529","74","224","527","75"];
var wordPointY=["50","50","200","50","200","50","200"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="a02mates01_resources/media/"
var auMP3=["","","","","","",""];
var auOGG=["","","","","","",""];
var colorWord="#000000";
colorText="#000000";colorButton="#6F89E6";colorBack="#FFFFFF";colorSele="#C5E6FA";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
