//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=6; attempts=0; attemptsMax=1;
var score=0; scoreMax=6; scoreInc=1; scoreDec=1
var typeGame=0;
var tiTime=false;
var tiTimeType=0;
var tiButtonTime=true;
var textButtonTime="Start";
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="Good job!"; messageTime=""; messageError="Nooooo"; messageErrorG="Nooooo"; messageAttempts="Try again."; 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="MmluZzI"; 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=[["7","1","0","0"],["181","2","0","0"],["172","137","0","0"],["14","132","0","0"],["190","0","1","1"],["366","0","1","1"],["364","128","1","1"],["192","129","1","1"],["371","2","2","2"],["544","4","2","2"],["544","130","2","2"],["374","130","2","2"],["15","150","3","3"],["174","156","3","3"],["163","258","3","3"],["15","259","3","3"],["190","148","4","4"],["359","144","4","4"],["361","246","4","4"],["184","248","4","4"],["371","137","5","5"],["545","137","5","5"],["545","243","5","5"],["373","242","5","5"],["372","234","5","5"]];
var backSrc="2ing2_resources/media/animal02.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(7,1),new Point(181,2),new Point(172,137),new Point(14,132)],[new Point(190,0),new Point(366,0),new Point(364,128),new Point(192,129)],[new Point(371,2),new Point(544,4),new Point(544,130),new Point(374,130)],[new Point(15,150),new Point(174,156),new Point(163,258),new Point(15,259)],[new Point(190,148),new Point(359,144),new Point(361,246),new Point(184,248)],[new Point(371,137),new Point(545,137),new Point(545,243),new Point(373,242),new Point(372,234)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["","","","","",""];
var areaHelp=["","","","","",""];
var areaWrong=["","","","","",""];
var initMessageError="Nooooo";
var wordPointX=["7","190","371","15","190","371"];
var wordPointY=["1","0","2","150","148","137"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var imaSound='<img id="playSound" class="imaRight" src="2ing2_resources/media/sound.png" alt="Sound"  align="right">'
var pathMedia="2ing2_resources/media/"
var auMP3=["2skatefish.mp3","2sardines.mp3","2salamanders.mp3","2frogs.mp3","2snakes.mp3","2tourtles.mp3"];
var auOGG=["2skateFish.ogg","2sardines.ogg","2salamanders.ogg","2frogs.ogg","2snakes.ogg","2tourtles.ogg"];
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";
