//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="Start";
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="Well done."; messageTime=""; messageError=""; messageErrorG=""; messageAttempts="Try again."; 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="MDFuYWls"; 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=[["1","20","0","0"],["292","20","0","0"],["292","1","0","0"],["2","1","0","0"],["0","48","1","1"],["548","49","1","1"],["549","69","1","1"],["0","70","1","1"],["2","97","2","2"],["176","96","2","2"],["176","122","2","2"],["2","125","2","2"],["1","148","3","3"],["464","146","3","3"],["463","169","3","3"],["1","173","3","3"],["3","200","4","4"],["494","196","4","4"],["496","223","4","4"],["1","222","4","4"],["1","249","5","5"],["488","247","5","5"],["488","269","5","5"],["0","271","5","5"]];
var backSrc="01nail_resources/media/nailsFrases.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(1,20),new Point(292,20),new Point(292,1),new Point(2,1)],[new Point(0,48),new Point(548,49),new Point(549,69),new Point(0,70)],[new Point(2,97),new Point(176,96),new Point(176,122),new Point(2,125)],[new Point(1,148),new Point(464,146),new Point(463,169),new Point(1,173)],[new Point(3,200),new Point(494,196),new Point(496,223),new Point(1,222)],[new Point(1,249),new Point(488,247),new Point(488,269),new Point(0,271)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["","","","","",""];
var areaHelp=["","","","","",""];
var areaWrong=["Listen again","Listen again","","Listen again","Listen again","Listen again"];
var initMessageError="";
var wordPointX=["1","0","2","1","3","1"];
var wordPointY=["19","48","97","148","200","249"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var imaSound='<img id="playSound" class="imaRight" src="01nail_resources/media/sound.png" alt="Sound"  align="right">'
var pathMedia="01nail_resources/media/"
var auMP3=["nails1.mp3","nails2.mp3","nails3.mp3","nails4.mp3","nails5.mp3","nails6.mp3"];
var auOGG=["nails1.ogg","nails2.ogg","nails3.ogg","nails4.ogg","nails5.ogg","nails6.ogg"];
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";
