//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=2;
var score=0; scoreMax=5; 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="It is correct. Good job."; messageTime=""; messageError="Wrong, try again!"; messageErrorG="Wrong, try again!"; messageAttempts="Wait until the activity is reload 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="MDNwbHVyYWxzMDI"; 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","39","0","0"],["345","38","0","0"],["381","102","0","0"],["361","114","0","0"],["296","114","0","0"],["252","105","0","0"],["245","65","0","0"],["440","139","1","1"],["490","155","1","1"],["490","187","1","1"],["435","204","1","1"],["395","201","1","1"],["394","166","1","1"],["401","141","1","1"],["106","180","2","2"],["153","195","2","2"],["156","216","2","2"],["145","240","2","2"],["133","251","2","2"],["124","265","2","2"],["42","255","2","2"],["25","236","2","2"],["50","200","2","2"],["457","221","3","3"],["480","212","3","3"],["524","213","3","3"],["529","242","3","3"],["524","270","3","3"],["509","282","3","3"],["449","288","3","3"],["370","280","3","3"],["366","271","3","3"],["368","241","3","3"],["388","224","3","3"],["427","215","3","3"],["52","97","4","4"],["87","103","4","4"],["114","148","4","4"],["105","166","4","4"],["66","173","4","4"],["32","163","4","4"],["22","139","4","4"],["26","101","4","4"]];
var backSrc="03plurals02_resources/media/act00.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,39),new Point(345,38),new Point(381,102),new Point(361,114),new Point(296,114),new Point(252,105),new Point(245,65)],[new Point(440,139),new Point(490,155),new Point(490,187),new Point(435,204),new Point(395,201),new Point(394,166),new Point(401,141)],[new Point(106,180),new Point(153,195),new Point(156,216),new Point(145,240),new Point(133,251),new Point(124,265),new Point(42,255),new Point(25,236),new Point(50,200)],[new Point(457,221),new Point(480,212),new Point(524,213),new Point(529,242),new Point(524,270),new Point(509,282),new Point(449,288),new Point(370,280),new Point(366,271),new Point(368,241),new Point(388,224),new Point(427,215)],[new Point(52,97),new Point(87,103),new Point(114,148),new Point(105,166),new Point(66,173),new Point(32,163),new Point(22,139),new Point(26,101)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["✔","✔","✔","✔","✔"];
var areaHelp=["These are vans","This is a bus","These are cars","These are lorries","This is a van"];
var areaWrong=["","","","",""];
var initMessageError="Wrong, try again!";
var wordPointX=["251","440","106","457","52"];
var wordPointY=["39","139","180","221","97"];
var areaColor=["#D5D200","#D5D200","#D5D200","#D5D200","#D5D200"];
var pathMedia="03plurals02_resources/media/"
var auMP3=["","","","",""];
var auOGG=["","","","",""];
var colorWord="#000000";
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";
