//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=4;
var score=0; scoreMax=10; scoreInc=2; scoreDec=1
var typeGame=0;
var tiTime=false;
var tiTimeType=0;
var tiButtonTime=false;
var textButtonTime="Start";
var tiSuccesses=false;
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=3; messageOk="BRAVO!!"; messageTime=""; messageError="INCORRECT!!"; messageErrorG="INCORRECT!!"; messageAttempts="START 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="c291bmRpbWFnZQ"; 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=[["13","52","0","0"],["109","16","0","0"],["139","79","0","0"],["37","116","0","0"],["429","148","1","1"],["411","225","1","1"],["415","242","1","1"],["500","238","1","1"],["503","150","1","1"],["327","40","2","2"],["296","80","2","2"],["296","122","2","2"],["342","127","2","2"],["386","117","2","2"],["372","52","2","2"],["169","161","3","3"],["240","130","3","3"],["291","150","3","3"],["292","203","3","3"],["277","221","3","3"],["208","223","3","3"],["171","193","3","3"],["152","172","3","3"],["339","140","4","4"],["327","166","4","4"],["330","226","4","4"],["402","220","4","4"],["382","145","4","4"]];
var backSrc="soundimage_resources/media/picturepoints.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(13,52),new Point(109,16),new Point(139,79),new Point(37,116)],[new Point(429,148),new Point(411,225),new Point(415,242),new Point(500,238),new Point(503,150)],[new Point(327,40),new Point(296,80),new Point(296,122),new Point(342,127),new Point(386,117),new Point(372,52)],[new Point(169,161),new Point(240,130),new Point(291,150),new Point(292,203),new Point(277,221),new Point(208,223),new Point(171,193),new Point(152,172)],[new Point(339,140),new Point(327,166),new Point(330,226),new Point(402,220),new Point(382,145)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4"];
var areaSolved=["N","N","N","N","N"];
var areaWord=["","","","",""];
var areaHelp=["","","","",""];
var areaWrong=["","","","",""];
var initMessageError="INCORRECT!!";
var wordPointX=["13","429","327","169","339"];
var wordPointY=["52","148","40","161","140"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var imaSound='<img id="playSound" class="imaRight" src="soundimage_resources/media/sound.png" alt="Sound"  align="right">'
var pathMedia="soundimage_resources/media/"
var auMP3=["beborn.mp3","retire.mp3","celebrateyourbirthday.mp3","learntodrive.mp3","getmarried.mp3"];
var auOGG=["","","","",""];
var colorWord="#000000";
colorText="#000000";colorButton="#CC9900";colorBack="#FFFFFF";colorSele="#808040";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
