//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="Buen trabajo."; messageTime=""; messageError="Esa no representa a una fracción."; messageErrorG="Esa no representa a una fracción."; messageAttempts="No. 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="MDJtYXRlMDE"; 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=[["8","38","0","0"],["58","2","0","0"],["107","41","0","0"],["89","97","0","0"],["28","100","0","0"],["123","41","1","0"],["170","9","1","0"],["217","42","1","0"],["200","96","1","0"],["141","97","1","0"],["17","139","2","0"],["36","117","2","0"],["67","110","2","0"],["87","120","2","0"],["103","140","2","0"],["103","172","2","0"],["86","194","2","0"],["62","204","2","0"],["32","198","2","0"],["17","174","2","0"],["130","151","3","0"],["149","122","3","0"],["183","114","3","0"],["204","123","3","0"],["216","140","3","0"],["220","159","3","0"],["216","180","3","0"],["201","197","3","0"],["187","203","3","0"],["163","201","3","0"],["152","198","3","0"],["132","178","3","0"],["292","112","4","0"],["247","138","4","0"],["243","178","4","0"],["279","208","4","0"],["304","206","4","0"],["321","196","4","0"],["333","179","4","0"],["338","160","4","0"],["289","158","4","0"],["64","223","5","0"],["13","311","5","0"],["113","311","5","0"],["126","311","6","0"],["179","223","6","0"],["230","314","6","0"]];
var backSrc="02mate01_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(8,38),new Point(58,2),new Point(107,41),new Point(89,97),new Point(28,100)],[new Point(123,41),new Point(170,9),new Point(217,42),new Point(200,96),new Point(141,97)],[new Point(17,139),new Point(36,117),new Point(67,110),new Point(87,120),new Point(103,140),new Point(103,172),new Point(86,194),new Point(62,204),new Point(32,198),new Point(17,174)],[new Point(130,151),new Point(149,122),new Point(183,114),new Point(204,123),new Point(216,140),new Point(220,159),new Point(216,180),new Point(201,197),new Point(187,203),new Point(163,201),new Point(152,198),new Point(132,178)],[new Point(292,112),new Point(247,138),new Point(243,178),new Point(279,208),new Point(304,206),new Point(321,196),new Point(333,179),new Point(338,160),new Point(289,158)],[new Point(64,223),new Point(13,311),new Point(113,311)],[new Point(126,311),new Point(179,223),new Point(230,314)]];
var game=[];indexGame=0;
var area=["0","0","0","0","0","0","0"];
var areaSolved=["N","N","N","N","N","N","N"];
var areaWord=["✓","✓","✓","✓","✓","✓","✓"];
var areaHelp=["¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?","¿ Qué figuras representan fracciones?"];
var areaWrong=["","","","","","",""];
var initMessageError="Esa no representa a una fracción.";
var wordPointX=["50","160","50","160","285","67","175"];
var wordPointY=["38","41","140","140","140","260","260"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="02mate01_resources/media/"
var auMP3=["","","","","","",""];
var auOGG=["","","","","","",""];
var colorWord="#DC5A15";
colorText="#000000";colorButton="#D5D200";colorBack="#FFFFFF";colorSele="#DC5A15";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
