//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=3;
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="Ben localizado!"; messageTime=""; messageError="Ese non é o lugar pedido."; messageErrorG="Ese non é o lugar pedido."; messageAttempts="Cuarto 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="MDVzZWN1bG8xOF8y"; 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=[["214","209","0","0"],["239","226","0","0"],["205","281","0","0"],["181","273","0","0"],["282","128","1","0"],["345","126","1","0"],["354","107","1","0"],["341","19","1","0"],["303","22","1","0"],["306","46","1","0"],["289","49","1","0"],["301","73","1","0"],["299","84","1","0"],["394","269","2","2"],["378","275","2","2"],["377","305","2","2"],["400","301","2","2"],["461","314","3","2"],["460","339","3","2"],["424","322","3","2"],["436","313","3","2"],["332","273","4","4"],["332","280","4","4"],["339","286","4","4"],["341","277","4","4"],["213","296","5","5"],["225","295","5","5"],["220","309","5","5"],["211","307","5","5"]];
var backSrc="05seculo18_2_resources/media/europa.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(214,209),new Point(239,226),new Point(205,281),new Point(181,273)],[new Point(282,128),new Point(345,126),new Point(354,107),new Point(341,19),new Point(303,22),new Point(306,46),new Point(289,49),new Point(301,73),new Point(299,84)],[new Point(394,269),new Point(378,275),new Point(377,305),new Point(400,301)],[new Point(461,314),new Point(460,339),new Point(424,322),new Point(436,313)],[new Point(332,273),new Point(332,280),new Point(339,286),new Point(341,277)],[new Point(213,296),new Point(225,295),new Point(220,309),new Point(211,307)]];
var game=[];indexGame=0;
var area=["0","0","2","2","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["Portugal","Gran Bretaña","Cerdeña","Sicilia","Menorca","Xibraltar"];
var areaHelp=["Países contra os que España loitou polo comercio con América.","Países contra os que España loitou polo comercio con América.","Illas italianas que tenteou de recuperar Filipe V","Illas italianas que tenteou de recuperar Filipe V","Illa española que pasou a mans británicas tras o Tratado de Uttrech","Lugar na Península Ibérica que pasou a ser birtánico despois do Tratado de Uttrech"];
var areaWrong=["","","","","",""];
var initMessageError="Ese non é o lugar pedido.";
var wordPointX=["206","285","394","455","335","213"];
var wordPointY=["277","90","302","335","290","310"];
var areaColor=["#FF8040","#FF8040","#FFFF00","#FFFF00","#80FF00","#F0F0F0"];
var pathMedia="05seculo18_2_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";
