//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=5; attempts=0; attemptsMax=1;
var score=0; scoreMax=5; 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="Localizados. Vamos a la siguiente."; messageTime=""; messageError="Ese no es el número pedido"; messageErrorG="Ese no es el número pedido"; messageAttempts="Céntrate y vuelve a intentarlo"; 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="MDNtYXQ"; 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=[["61","31","0","0"],["68","24","0","0"],["116","24","0","0"],["115","64","0","0"],["9","66","0","0"],["11","23","0","0"],["57","21","0","0"],["70","171","1","1"],["66","160","1","1"],["125","161","1","1"],["127","195","1","1"],["10","196","1","1"],["9","160","1","1"],["60","159","1","1"],["195","30","2","2"],["196","25","2","2"],["255","22","2","2"],["253","64","2","2"],["136","66","2","2"],["135","25","2","2"],["186","23","2","2"],["208","97","3","3"],["254","88","3","3"],["256","134","3","3"],["141","136","3","3"],["139","90","3","3"],["198","88","3","3"],["340","160","4","4"],["384","159","4","4"],["388","199","4","4"],["277","197","4","4"],["275","154","4","4"],["330","152","4","4"]];
var backSrc="03mat_resources/media/actromano.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(61,31),new Point(68,24),new Point(116,24),new Point(115,64),new Point(9,66),new Point(11,23),new Point(57,21)],[new Point(70,171),new Point(66,160),new Point(125,161),new Point(127,195),new Point(10,196),new Point(9,160),new Point(60,159)],[new Point(195,30),new Point(196,25),new Point(255,22),new Point(253,64),new Point(136,66),new Point(135,25),new Point(186,23)],[new Point(208,97),new Point(254,88),new Point(256,134),new Point(141,136),new Point(139,90),new Point(198,88)],[new Point(340,160),new Point(384,159),new Point(388,199),new Point(277,197),new Point(275,154),new Point(330,152)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["49","490","4 090","4 900","4 009"];
var areaHelp=["49","490","4 090","4 900","4 009"];
var areaWrong=["","","","",""];
var initMessageError="Ese no es el número pedido";
var wordPointX=["61","70","195","208","340"];
var wordPointY=["31","171","30","97","160"];
var areaColor=["#FF8000","#FF8000","#FF8000","#FF8000","#FF8000"];
var pathMedia="03mat_resources/media/"
var auMP3=["","","","",""];
var auOGG=["","","","",""];
var colorWord="#000000";
colorText="#000000";colorButton="#FF8000";colorBack="#FFFFFF";colorSele="#EBD0AB";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
