//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="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="Perfecto. Vamos á seguinte."; messageTime=""; messageError="Esa non é a etiqueta axeitada."; messageErrorG="Esa non é a etiqueta axeitada."; messageAttempts="Segundo fallo. Espera a que se recargue 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="MDVyZWxlc3BhMDE"; 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=[["77","7","0","0"],["133","7","0","0"],["133","22","0","0"],["79","21","0","0"],["193","94","1","1"],["231","93","1","1"],["229","107","1","1"],["193","109","1","1"],["16","124","2","2"],["71","122","2","2"],["70","110","2","2"],["15","108","2","2"],["309","15","3","3"],["368","16","3","3"],["366","0","3","3"],["309","1","3","3"],["358","92","4","4"],["409","91","4","4"],["412","81","4","4"],["358","75","4","4"],["332","199","5","5"],["383","199","5","5"],["383","187","5","5"],["332","185","5","5"]];
var backSrc="05relespa01_resources/media/relevoIntMudo.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(77,7),new Point(133,7),new Point(133,22),new Point(79,21)],[new Point(193,94),new Point(231,93),new Point(229,107),new Point(193,109)],[new Point(16,124),new Point(71,122),new Point(70,110),new Point(15,108)],[new Point(309,15),new Point(368,16),new Point(366,0),new Point(309,1)],[new Point(358,92),new Point(409,91),new Point(412,81),new Point(358,75)],[new Point(332,199),new Point(383,199),new Point(383,187),new Point(332,185)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["Serra","Val","Meseta","Montaña","Outeiro","Chaira"];
var areaHelp=["Conxunto de montañas aliñadas.","Terreo que se encontra entre montañas por onde soe pasar un río.","Extensión de terreo plano ou con suaves ondulacións que está bastante elevada.","Gran elevación de terreo.","Elevación de pouca altura e cima redondeada.","Extensión de terreo plano o con suaves ondulacións pouco elevadas."];
var areaWrong=["","","","","",""];
var initMessageError="Esa non é a etiqueta axeitada.";
var wordPointX=["95","205","24","317","369","345"];
var wordPointY=["32","117","135","27","102","210"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="05relespa01_resources/media/"
var auMP3=["","","","","",""];
var auOGG=["","","","","",""];
colorText="#2B2B2B";colorButton="#858B00";colorBack="#FFFFFF";colorSele="#F8F5D7";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
