//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=4; attempts=0; attemptsMax=1;
var score=0; scoreMax=4; 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="No, ese no es el lugar adecuado para la coma."; messageErrorG="No, ese no es el lugar adecuado para la coma."; 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="MDNtYXRlczA0"; 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=[["303","23","0","0"],["325","24","0","0"],["323","63","0","0"],["299","63","0","0"],["362","71","1","0"],["380","70","1","0"],["381","109","1","0"],["354","107","1","0"],["370","118","2","0"],["394","121","2","0"],["393","165","2","0"],["366","165","2","0"],["360","167","3","0"],["383","166","3","0"],["379","214","3","0"],["348","214","3","0"]];
var backSrc="03mates04_resources/media/ac03.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(303,23),new Point(325,24),new Point(323,63),new Point(299,63)],[new Point(362,71),new Point(380,70),new Point(381,109),new Point(354,107)],[new Point(370,118),new Point(394,121),new Point(393,165),new Point(366,165)],[new Point(360,167),new Point(383,166),new Point(379,214),new Point(348,214)]];
var game=[];indexGame=0;
var area=["0","0","0","0"];
var areaSolved=["N","N","N","N"];
var areaWord=[",",",",",",","];
var areaHelp=["","","",""];
var areaWrong=["","","",""];
var initMessageError="No, ese no es el lugar adecuado para la coma.";
var wordPointX=["315","370","380","360"];
var wordPointY=["65","110","160","218"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="03mates04_resources/media/"
var auMP3=["","","",""];
var auOGG=["","","",""];
var colorWord="#6F89E6";
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";
