//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="Bo traballo. Aquí rematamos este apartado."; messageTime=""; messageError="Aí non está o que se pide."; messageErrorG="Aí non está o que se pide."; messageAttempts="Vamos a intentalo 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="MTFvcmdhMw"; 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=[["80","128","0","0"],["175","129","0","0"],["174","196","0","0"],["155","204","0","0"],["145","231","0","0"],["83","230","0","0"],["84","212","0","0"],["176","129","1","1"],["266","129","1","1"],["265","229","1","1"],["207","231","1","1"],["201","210","1","1"],["190","200","1","1"],["173","194","1","1"],["206","235","2","2"],["264","235","2","2"],["267","306","2","2"],["244","331","2","2"],["223","335","2","2"],["203","334","2","2"],["186","324","2","2"],["180","311","2","2"],["175","294","2","2"],["174","278","2","2"],["174","268","2","2"],["187","265","2","2"],["200","255","2","2"],["202","242","2","2"],["132","341","3","3"],["159","325","3","3"],["175","305","3","3"],["185","324","3","3"],["208","333","3","3"],["232","339","3","3"],["201","348","3","3"],["161","349","3","3"],["82","234","4","4"],["144","235","4","4"],["154","253","4","4"],["173","267","4","4"],["172","301","4","4"],["157","321","4","4"],["129","334","4","4"],["110","333","4","4"],["94","324","4","4"],["81","309","4","4"],["81","268","4","4"],["165","203","5","5"],["155","213","5","5"],["149","229","5","5"],["151","241","5","5"],["164","256","5","5"],["178","258","5","5"],["196","246","5","5"],["199","227","5","5"],["191","210","5","5"],["178","203","5","5"],["173","200","5","5"]];
var backSrc="11orga3_resources/media/escudoEspana.png";
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(80,128),new Point(175,129),new Point(174,196),new Point(155,204),new Point(145,231),new Point(83,230),new Point(84,212)],[new Point(176,129),new Point(266,129),new Point(265,229),new Point(207,231),new Point(201,210),new Point(190,200),new Point(173,194)],[new Point(206,235),new Point(264,235),new Point(267,306),new Point(244,331),new Point(223,335),new Point(203,334),new Point(186,324),new Point(180,311),new Point(175,294),new Point(174,278),new Point(174,268),new Point(187,265),new Point(200,255),new Point(202,242)],[new Point(132,341),new Point(159,325),new Point(175,305),new Point(185,324),new Point(208,333),new Point(232,339),new Point(201,348),new Point(161,349)],[new Point(82,234),new Point(144,235),new Point(154,253),new Point(173,267),new Point(172,301),new Point(157,321),new Point(129,334),new Point(110,333),new Point(94,324),new Point(81,309),new Point(81,268)],[new Point(165,203),new Point(155,213),new Point(149,229),new Point(151,241),new Point(164,256),new Point(178,258),new Point(196,246),new Point(199,227),new Point(191,210),new Point(178,203),new Point(173,200)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["✓","✓","✓","✓","✓","✓"];
var areaHelp=["Reino de Castela","Reino de León","Reino de Navarra","Reino de Granada","Reino de Aragón","Dinastía dos Borbóns"];
var areaWrong=["","","","","",""];
var initMessageError="Aí non está o que se pide.";
var wordPointX=["100","190","220","155","100","175"];
var wordPointY=["150","150","250","341","250","230"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="11orga3_resources/media/"
var auMP3=["","","","","",""];
var auOGG=["","","","","",""];
var colorWord="#6F89E6";
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";
