//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=5;
var score=0; scoreMax=6; scoreInc=1; scoreDec=1
var typeGame=0;
var tiTime=false;
var tiTimeType=0;
var tiButtonTime=false;
var textButtonTime="Comenzar";
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=5; messageOk="CONGRATULATIONS!!"; messageTime=""; messageError="WRONG!!"; messageErrorG="WRONG!!"; 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="cGVyaXBoZXJhbHNpbWFnZXBvaW50cw"; 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=[["368","237","0","0"],["354","271","0","0"],["443","285","0","0"],["454","246","0","0"],["467","170","0","0"],["380","136","0","0"],["341","137","0","0"],["317","188","0","0"],["332","234","0","0"],["342","262","0","0"],["353","269","0","0"],["223","192","1","1"],["278","170","1","1"],["214","124","1","1"],["175","130","1","1"],["182","186","1","1"],["253","273","1","1"],["297","272","1","1"],["309","237","1","1"],["278","175","1","1"],["363","70","2","2"],["357","101","2","2"],["470","95","2","2"],["491","16","2","2"],["408","1","2","2"],["318","17","2","2"],["317","40","2","2"],["323","84","2","2"],["342","96","2","2"],["355","100","2","2"],["69","64","3","3"],["109","87","3","3"],["155","26","3","3"],["97","5","3","3"],["33","39","3","3"],["25","93","3","3"],["88","108","3","3"],["110","90","3","3"],["67","202","4","4"],["161","209","4","4"],["145","151","4","4"],["70","122","4","4"],["21","131","4","4"],["19","216","4","4"],["40","262","4","4"],["114","264","4","4"],["146","249","4","4"],["158","225","4","4"],["161","208","4","4"],["227","47","5","5"],["305","106","5","5"],["305","15","5","5"],["247","2","5","5"],["176","7","5","5"],["161","75","5","5"],["185","111","5","5"],["238","117","5","5"],["276","118","5","5"],["293","108","5","5"],["305","104","5","5"]];
var backSrc="peripheralsimagepoints_resources/media/coleccionperipherals.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(368,237),new Point(354,271),new Point(443,285),new Point(454,246),new Point(467,170),new Point(380,136),new Point(341,137),new Point(317,188),new Point(332,234),new Point(342,262),new Point(353,269)],[new Point(223,192),new Point(278,170),new Point(214,124),new Point(175,130),new Point(182,186),new Point(253,273),new Point(297,272),new Point(309,237),new Point(278,175)],[new Point(363,70),new Point(357,101),new Point(470,95),new Point(491,16),new Point(408,1),new Point(318,17),new Point(317,40),new Point(323,84),new Point(342,96),new Point(355,100)],[new Point(69,64),new Point(109,87),new Point(155,26),new Point(97,5),new Point(33,39),new Point(25,93),new Point(88,108),new Point(110,90)],[new Point(67,202),new Point(161,209),new Point(145,151),new Point(70,122),new Point(21,131),new Point(19,216),new Point(40,262),new Point(114,264),new Point(146,249),new Point(158,225),new Point(161,208)],[new Point(227,47),new Point(305,106),new Point(305,15),new Point(247,2),new Point(176,7),new Point(161,75),new Point(185,111),new Point(238,117),new Point(276,118),new Point(293,108),new Point(305,104)]];
var game=[];indexGame=0;
var area=["0","1","2","3","4","5"];
var areaSolved=["N","N","N","N","N","N"];
var areaWord=["Joystick","Flash Drive","Scanner","Mouse","Modem","Printer"];
var areaHelp=["A control device used in computer games","This device allows us to store data from a computer","You can scan documents or photographs with this device","A small device that you move across a surface in order to move a cursor on the screen","A device that connects one computer system to another using a telephone line","You need this device to print documents"];
var areaWrong=["","","","","",""];
var initMessageError="WRONG!!";
var wordPointX=["368","223","363","69","67","227"];
var wordPointY=["237","192","70","64","202","47"];
var areaColor=["#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0","#F0F0F0"];
var pathMedia="peripheralsimagepoints_resources/media/"
var auMP3=["","","","","",""];
var auOGG=["","","","","",""];
var colorWord="#000000";
colorText="#2B2B2B";colorButton="#0086FF";colorBack="#FFFFFF";colorSele="#CBDDEB";goURLNext=true;goURLRepeat=true;tiAval=true;
fMenssage="Verdana, Geneva, sans-serif";fActi="Verdana, Geneva, sans-serif";fEnun="Verdana, Geneva, sans-serif";
