//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="Correcto. Aquí rematamos este apartado."; messageTime=""; messageError="Esa non é a posición pedida."; messageErrorG="Esa non é a posición pedida."; messageAttempts="Segundo fallo. Volvemos a empezar."; 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="MDVhY3RUZXJyYTI"; 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=[["289","7","0","0"],["254","11","0","0"],["243","43","0","0"],["249","70","0","0"],["276","78","0","0"],["307","68","0","0"],["316","50","0","0"],["310","29","0","0"],["307","14","0","0"],["286","184","1","0"],["253","206","1","0"],["251","231","1","0"],["265","254","1","0"],["297","255","1","0"],["313","241","1","0"],["321","222","1","0"],["318","204","1","0"],["306","190","1","0"],["49","95","2","2"],["74","96","2","2"],["83","120","2","2"],["76","147","2","2"],["59","159","2","2"],["38","159","2","2"],["25","145","2","2"],["20","124","2","2"],["27","98","2","2"],["517","85","3","3"],["483","92","3","3"],["474","114","3","3"],["481","139","3","3"],["505","152","3","3"],["531","146","3","3"],["536","121","3","3"],["531","100","3","3"]];
var backSrc="05actTerra2_resources/media/translacionMudo.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(289,7),new Point(254,11),new Point(243,43),new Point(249,70),new Point(276,78),new Point(307,68),new Point(316,50),new Point(310,29),new Point(307,14)],[new Point(286,184),new Point(253,206),new Point(251,231),new Point(265,254),new Point(297,255),new Point(313,241),new Point(321,222),new Point(318,204),new Point(306,190)],[new Point(49,95),new Point(74,96),new Point(83,120),new Point(76,147),new Point(59,159),new Point(38,159),new Point(25,145),new Point(20,124),new Point(27,98)],[new Point(517,85),new Point(483,92),new Point(474,114),new Point(481,139),new Point(505,152),new Point(531,146),new Point(536,121),new Point(531,100)]];
var game=[];indexGame=0;
var area=["0","0","2","3"];
var areaSolved=["N","N","N","N"];
var areaWord=["Equinocio de primavera","Equinocio de outono","Solsticio de verán","Solsticio de inverno"];
var areaHelp=["Situacións nas que a duración do día e da noite son iguais.","Situacións nas que a duración do día e da noite son iguais.","Posición na que se produce o día máis longo do ano.","Posición na que se produce a noite máis longa do ano."];
var areaWrong=["","","",""];
var initMessageError="Esa non é a posición pedida.";
var wordPointX=["300","286","49","400"];
var wordPointY=["30","195","95","100"];
var areaColor=["#FF8000","#FF8000","#808000","#8080FF"];
var pathMedia="05actTerra2_resources/media/"
var auMP3=["","","",""];
var auOGG=["","","",""];
var colorWord="#FF8000";
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";
