var Keys=function(){
	this.getKey=function(opt){
		var _this=this;
		if(opt.method==="returnToFunction"){
			swal({
				title: "Autorizaci&oacute;n",
				html:true,
				text:opt.msg,
				type: "input",
				inputType:"password",
				showCancelButton: true,
				closeOnConfirm: false,
				animation: "slide-from-top",
				inputPlaceholder: "Llave"
			},
			function(inputValue){
				if(inputValue === false) return false;
				if(inputValue === "") {
					swal.showInputError("Ingrese una llave valida");
					return false
				}else{
					if(inputValue!='5494'){
						swal.showInputError("Ingrese una llave valida");
					}else{
						var params=[];
						$.each(opt.params,function(i,_val){
							if(i==opt.indexParamReplace)
								params[i]=true;
							else
								params[i]=(_val);
						});
						_this.funcionaejecutar=opt.returnFunction;
						opt.returnClass[_this.funcionaejecutar].apply(opt.returnClass,params);
					}
				}
			});
		}
	}
	this.test=function(){
		console.log('clase Keys instanciada correctamente');
	}
}