//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="Localizados! Pasamos á seguinte."; messageTime=""; messageError="Non é correcto."; messageErrorG="Non é correcto."; messageAttempts="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="MDRyb21hbmE"; 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=[["280","103","0","0"],["553","106","0","0"],["552","143","0","0"],["191","133","0","0"],["184","103","0","0"],["181","175","1","1"],["198","177","1","1"],["223","243","1","1"],["138","237","1","1"],["160","187","1","1"],["79","199","2","2"],["92","208","2","2"],["107","260","2","2"],["84","275","2","2"],["62","273","2","2"],["59","231","2","2"],["145","28","3","3"],["162","60","3","3"],["154","90","3","3"],["139","101","3","3"],["121","94","3","3"],["120","49","3","3"]];
var backSrc="04romana_resources/media/romana.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(280,103),new Point(553,106),new Point(552,143),new Point(191,133),new Point(184,103)],[new Point(181,175),new Point(198,177),new Point(223,243),new Point(138,237),new Point(160,187)],[new Point(79,199),new Point(92,208),new Point(107,260),new Point(84,275),new Point(62,273),new Point(59,231)],[new Point(145,28),new Point(162,60),new Point(154,90),new Point(139,101),new Point(121,94),new Point(120,49)]];
var game=[];indexGame=0;
var area=["0","1","2","3"];
var areaSolved=["N","N","N","N"];
var areaWord=["Brazo graduado","Contrapeso","Gancho","Punto de apoio"];
var areaHelp=["...no brazo máis longo qe estaba graduado...","...en latín aequipondium...","Lugar onde se colocaban os obxectos para pesar.","Punto de apoio"];
var areaWrong=["Aí non está o brazo máis longo \"graduado\"","","Fíxate, pídese o gancho do cal se colgaban os produtos para pesar.","Aí non está o punto de apoio."];
var initMessageError="Non é correcto.";
var wordPointX=["280","181","79","145"];
var wordPointY=["103","175","199","28"];
var areaColor=["#C5E5E6","#C5E5E6","#C5E5E6","#C5E5E6"];
var pathMedia="04romana_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";
