//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=5; attempts=0; attemptsMax=1;
var score=0; scoreMax=5; 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="Localizados!"; messageTime=""; messageError="Ese non é o lugar correcto."; messageErrorG="Ese non é o lugar correcto."; messageAttempts="Fíxate ben e inténtao outra vez."; 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="MDRhY3RIaXN0bzAx"; 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=[["478","132","0","0"],["492","151","0","0"],["484","171","0","0"],["465","176","0","0"],["433","184","0","0"],["416","186","0","0"],["413","166","0","0"],["449","147","0","0"],["2","160","1","1"],["125","148","1","1"],["146","118","1","1"],["157","63","1","1"],["168","58","1","1"],["167","105","1","1"],["164","142","1","1"],["241","140","1","1"],["235","115","1","1"],["230","86","1","1"],["222","70","1","1"],["212","52","1","1"],["154","22","1","1"],["100","9","1","1"],["47","10","1","1"],["2","0","1","1"],["0","130","1","1"],["221","295","2","2"],["263","315","2","2"],["272","237","2","2"],["266","208","2","2"],["237","180","2","2"],["216","176","2","2"],["197","219","2","2"],["180","258","2","2"],["162","299","2","2"],["191","321","2","2"],["220","310","2","2"],["315","86","3","3"],["229","66","3","3"],["242","128","3","3"],["287","158","3","3"],["286","181","3","3"],["293","204","3","3"],["323","215","3","3"],["308","195","3","3"],["334","176","3","3"],["333","145","3","3"],["312","118","3","3"],["312","102","3","3"],["278","153","4","4"],["257","182","4","4"],["255","190","4","4"],["274","210","4","4"],["281","197","4","4"],["284","175","4","4"],["287","163","4","4"]];
var backSrc="04actHisto01_resources/media/Columbus_Taking_PossessionFXD.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(478,132),new Point(492,151),new Point(484,171),new Point(465,176),new Point(433,184),new Point(416,186),new Point(413,166),new Point(449,147)],[new Point(2,160),new Point(125,148),new Point(146,118),new Point(157,63),new Point(168,58),new Point(167,105),new Point(164,142),new Point(241,140),new Point(235,115),new Point(230,86),new Point(222,70),new Point(212,52),new Point(154,22),new Point(100,9),new Point(47,10),new Point(2,0),new Point(0,130)],[new Point(221,295),new Point(263,315),new Point(272,237),new Point(266,208),new Point(237,180),new Point(216,176),new Point(197,219),new Point(180,258),new Point(162,299),new Point(191,321),new Point(220,310)],[new Point(315,86),new Point(229,66),new Point(242,128),new Point(287,158),new Point(286,181),new Point(293,204),new Point(323,215),new Point(308,195),new Point(334,176),new Point(333,145),new Point(312,118),new Point(312,102)],[new Point(278,153),new Point(257,182),new Point(255,190),new Point(274,210),new Point(281,197),new Point(284,175),new Point(287,163)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["Indíxenas","ASanta María, A Pinta e A Niña","Cristovo Colón","Estandarte dos Reis Católicos","Clero"];
var areaHelp=["Fai clic sobre os habitantes das terras descubertas.","Fai clic sobre A Santa María, A Pinta e A Niña.","Indica a persoa que descubriu o \"Novo Mundo\".","Cal é o estandarte dos Reis Católicos","Representante do clero"];
var areaWrong=["","","","",""];
var initMessageError="Ese non é o lugar correcto.";
var wordPointX=["420","15","221","290","278"];
var wordPointY=["160","50","295","110","153"];
var areaColor=["#6F89E6","#6F89E6","#6F89E6","#6F89E6","#6F89E6"];
var pathMedia="04actHisto01_resources/media/"
var auMP3=["","","","",""];
var auOGG=["","","","",""];
var colorWord="#000000";
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";
