//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="¡ Muy bien!"; messageTime=""; messageError="Ese no es el punto pedido."; messageErrorG="Ese no es el punto pedido."; messageAttempts="Segundo fallo. Inténtalo otra 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="MDJjaWdvbmFs"; 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=[["336","28","0","0"],["344","31","0","0"],["343","195","0","0"],["328","195","0","0"],["326","24","0","0"],["336","198","1","1"],["354","213","1","1"],["349","240","1","1"],["338","249","1","1"],["325","233","1","1"],["323","208","1","1"],["49","112","2","2"],["63","124","2","2"],["63","155","2","2"],["27","157","2","2"],["27","128","2","2"],["33","116","2","2"],["222","21","3","3"],["380","12","3","3"],["379","27","3","3"],["299","29","3","3"],["212","38","3","3"],["176","53","3","3"],["119","72","3","3"],["102","82","3","3"],["70","100","3","3"],["55","111","3","3"],["39","111","3","3"],["53","94","3","3"],["116","56","3","3"],["184","29","3","3"],["76","55","4","4"],["134","69","4","4"],["140","134","4","4"],["134","153","4","4"],["87","175","4","4"],["75","175","4","4"],["75","103","4","4"]];
var backSrc="02cigonal_resources/media/cigonal.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(336,28),new Point(344,31),new Point(343,195),new Point(328,195),new Point(326,24)],[new Point(336,198),new Point(354,213),new Point(349,240),new Point(338,249),new Point(325,233),new Point(323,208)],[new Point(49,112),new Point(63,124),new Point(63,155),new Point(27,157),new Point(27,128),new Point(33,116)],[new Point(222,21),new Point(380,12),new Point(379,27),new Point(299,29),new Point(212,38),new Point(176,53),new Point(119,72),new Point(102,82),new Point(70,100),new Point(55,111),new Point(39,111),new Point(53,94),new Point(116,56),new Point(184,29)],[new Point(76,55),new Point(134,69),new Point(140,134),new Point(134,153),new Point(87,175),new Point(75,175),new Point(75,103)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["vara","cubo","contrapeso","pértiga","Punto de apoyo"];
var areaHelp=["...en uno de los extremos se ataba una cuerda o vara...","...a la que a su vez se unía un cubo o recipiente en el que extraer el agua...","...en el otro extremo se colocaba cualquier cosa que pudiese hacer de contrapeso como piedras o maderas...","Constaba de una pértiga que hacía la función de palanca.","El punto de apoyo constaba ... de dos palos verticales con uno horizontal sobre el que se apoyaba la palanca."];
var areaWrong=["","","","",""];
var initMessageError="Ese no es el punto pedido.";
var wordPointX=["336","336","49","222","76"];
var wordPointY=["35","198","112","30","55"];
var areaColor=["#C5E5E6","#C5E5E6","#C5E5E6","#C5E5E6","#C5E5E6"];
var pathMedia="02cigonal_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";
