//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="Localizadas."; messageTime=""; messageError="Ahí no está la propiedad que buscamos"; messageErrorG="Ahí no está la propiedad que buscamos"; messageAttempts="Inténtalo 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="MDRzdXJlbXVs"; 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=[["251","31","0","0"],["414","32","0","0"],["416","66","0","0"],["75","64","0","0"],["78","34","0","0"],["248","155","1","0"],["270","149","1","0"],["347","148","1","0"],["349","182","1","0"],["139","184","1","0"],["140","151","1","0"],["260","78","2","2"],["267","71","2","2"],["450","68","2","2"],["450","102","2","2"],["44","104","2","2"],["44","76","2","2"],["242","71","2","2"],["246","197","3","2"],["246","187","3","2"],["444","183","3","2"],["448","218","3","2"],["48","222","3","2"],["48","189","3","2"],["238","187","3","2"],["241","119","4","4"],["241","110","4","4"],["436","110","4","4"],["437","145","4","4"],["59","146","4","4"],["53","118","4","4"],["232","110","4","4"]];
var backSrc="04suremul_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(251,31),new Point(414,32),new Point(416,66),new Point(75,64),new Point(78,34)],[new Point(248,155),new Point(270,149),new Point(347,148),new Point(349,182),new Point(139,184),new Point(140,151)],[new Point(260,78),new Point(267,71),new Point(450,68),new Point(450,102),new Point(44,104),new Point(44,76),new Point(242,71)],[new Point(246,197),new Point(246,187),new Point(444,183),new Point(448,218),new Point(48,222),new Point(48,189),new Point(238,187)],[new Point(241,119),new Point(241,110),new Point(436,110),new Point(437,145),new Point(59,146),new Point(53,118),new Point(232,110)]];
var game=[];indexGame=0;
var area=["0","0","2","2","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["Conmutativa","Conmutativa","Distributiva","Distributiva","Asociativa"];
var areaHelp=["Conmutativa","Conmutativa","Distributiva","Distributiva","Asociativa"];
var areaWrong=["","","","",""];
var initMessageError="Ahí no está la propiedad que buscamos";
var wordPointX=["251","248","260","246","241"];
var wordPointY=["40","170","85","205","130"];
var areaColor=["#FF8000","#FF8000","#8080FF","#8080FF","#E8E800"];
var pathMedia="04suremul_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";
