//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=3; attempts=0; attemptsMax=0;
var score=0; scoreMax=3; 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="Identificados, pasamos á seguinte."; messageTime=""; messageError=""; messageErrorG=""; messageAttempts="Esto non é cuestión de sorte, volve a facer a actividade."; 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="MDRjYXJwaW50ZXJpYQ"; 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=[["100","37","0","0"],["123","34","0","0"],["123","121","0","0"],["112","219","0","0"],["94","252","0","0"],["44","257","0","0"],["11","249","0","0"],["27","182","0","0"],["50","113","0","0"],["68","79","0","0"],["73","38","0","0"],["304","66","1","1"],["331","78","1","1"],["327","209","1","1"],["293","218","1","1"],["279","169","1","1"],["279","130","1","1"],["276","100","1","1"],["279","74","1","1"],["405","38","2","2"],["437","44","2","2"],["466","104","2","2"],["470","144","2","2"],["466","197","2","2"],["464","216","2","2"],["479","242","2","2"],["455","261","2","2"],["381","263","2","2"],["352","243","2","2"],["350","218","2","2"],["354","170","2","2"],["348","136","2","2"],["362","107","2","2"],["373","85","2","2"],["368","65","2","2"],["377","44","2","2"]];
var backSrc="04carpinteria_resources/media/reunionCarpinteria..jpg";
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(100,37),new Point(123,34),new Point(123,121),new Point(112,219),new Point(94,252),new Point(44,257),new Point(11,249),new Point(27,182),new Point(50,113),new Point(68,79),new Point(73,38)],[new Point(304,66),new Point(331,78),new Point(327,209),new Point(293,218),new Point(279,169),new Point(279,130),new Point(276,100),new Point(279,74)],[new Point(405,38),new Point(437,44),new Point(466,104),new Point(470,144),new Point(466,197),new Point(464,216),new Point(479,242),new Point(455,261),new Point(381,263),new Point(352,243),new Point(350,218),new Point(354,170),new Point(348,136),new Point(362,107),new Point(373,85),new Point(368,65),new Point(377,44)]];
var game=[];indexGame=0;
var area=["0","1","2"];
var areaSolved=["N","N","N"];
var areaWord=["✔","✔","✔"];
var areaHelp=["...temos defectos pero o carpinteiro traballa coas nosas cualidades.","...pediu a expulsión da lixa. Fixo ver era moi áspera no seu trato.","...pediu que tamén fose expulsado o parafuso, dixo que había que darlle moitas voltas para que servise de algo."];
var areaWrong=["Fíxate, é o serrón. Volve a ler a lectura.","Mira no texto quen pide a expulsión da lixa.","Fíxate ben"];
var initMessageError="";
var wordPointX=["100","304","405"];
var wordPointY=["37","66","38"];
var areaColor=["#6F89E6","#6F89E6","#6F89E6"];
var pathMedia="04carpinteria_resources/media/"
var auMP3=["","",""];
var auOGG=["","",""];
var colorWord="#FFFFFF";
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";
