//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!"; messageTime=""; messageError=""; messageErrorG=""; messageAttempts="¡ No! Vuelve a intentarlo."; 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="MDRsdWdhcmVzRXNwYW5h"; 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=[["385","87","0","0"],["387","115","0","0"],["412","139","0","0"],["421","139","0","0"],["416","152","0","0"],["398","142","0","0"],["387","149","0","0"],["367","157","0","0"],["350","150","0","0"],["354","138","0","0"],["359","126","0","0"],["359","117","0","0"],["374","118","0","0"],["371","103","0","0"],["376","93","0","0"],["388","77","1","1"],["405","81","1","1"],["429","87","1","1"],["421","136","1","1"],["406","132","1","1"],["396","117","1","1"],["390","103","1","1"],["367","155","2","2"],["402","144","2","2"],["417","152","2","2"],["418","166","2","2"],["402","166","2","2"],["403","177","2","2"],["391","191","2","2"],["379","190","2","2"],["366","183","2","2"],["361","176","2","2"],["367","166","2","2"],["406","201","3","3"],["376","194","3","3"],["370","212","3","3"],["383","234","3","3"],["388","238","3","3"],["410","234","3","3"],["307","148","4","4"],["288","167","4","4"],["281","180","4","4"],["304","189","4","4"],["320","189","4","4"],["314","173","4","4"],["311","159","4","4"],["462","143","5","5"],["492","129","5","5"],["484","117","5","5"],["470","105","5","5"],["461","108","5","5"],["458","120","5","5"],["454","130","5","5"]];
var backSrc="04lugaresEspana_resources/media/MapaProvincias.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(385,87),new Point(387,115),new Point(412,139),new Point(421,139),new Point(416,152),new Point(398,142),new Point(387,149),new Point(367,157),new Point(350,150),new Point(354,138),new Point(359,126),new Point(359,117),new Point(374,118),new Point(371,103),new Point(376,93)],[new Point(388,77),new Point(405,81),new Point(429,87),new Point(421,136),new Point(406,132),new Point(396,117),new Point(390,103)],[new Point(367,155),new Point(402,144),new Point(417,152),new Point(418,166),new Point(402,166),new Point(403,177),new Point(391,191),new Point(379,190),new Point(366,183),new Point(361,176),new Point(367,166)],[new Point(406,201),new Point(376,194),new Point(370,212),new Point(383,234),new Point(388,238),new Point(410,234)],[new Point(307,148),new Point(288,167),new Point(281,180),new Point(304,189),new Point(320,189),new Point(314,173),new Point(311,159)],[new Point(462,143),new Point(492,129),new Point(484,117),new Point(470,105),new Point(461,108),new Point(458,120),new Point(454,130)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["Zaragoza","Huesca","Teruel","Valencia","Madrid","Barcelona"];
var areaHelp=["Lugar en el que estudia Medicina","Lugar en el que estudia bachiller","La única de las provincias aragonesas que no se cita en la lectura.","Ciudad en la que estudió el cólera","Lugar donde crea el \"Laboratorio de Investigaciones Biológicas\"","Lugar al que se trasladó despues de haber estado en Valencia"];
var areaWrong=["Fíjate. Ahí no está la capital de Aragón.","No. Debes de buscar una provincia limítrofe con Francia.","","","Fíjate, es la capital de España","Deberías de buscar la capital de Cataluña"];
var initMessageError="";
var wordPointX=["375","399","380","390","307","470"];
var wordPointY=["135","89","170","210","165","125"];
var areaColor=["#FF8000","#FF8000","#FF8000","#FF8000","#FF8000","#FF8000"];
var pathMedia="04lugaresEspana_resources/media/"
var auMP3=["","","","","",""];
var auOGG=["","","","","",""];
colorText="#2B2B2B";colorButton="#D5D200";colorBack="#FFFFFF";colorSele="#D94C00";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
