 function pNL( $picID ){
 
   var $a = document.getElementById( 'PAD_' + $picID ).value;
   var $b = document.getElementById( 'PID_'   + $picID ).value.split('_');
   if ( $a <= 1 ){
    
	   return;
   
   }
   $a--;
   document.getElementById( 'PAD_' + $picID ).value = $a;
   document.getElementById( 'PCP_' + $picID ).innerHTML = $a;
   //var testing = document.getElementById('PicCurPic_' + $picID);
   //document.all.testing.innerHTML =$a;
   var $c="free-420-personals-pictures-" + $picID + "_" + $b[( $a - 1 )] + "_110_110.jpg";
   document.getElementById( 'PLS_' + $picID ).src = unescape( encodeURIComponent($c));
   return;
 
 }

  function pNR( $picID ){

   var $a = document.getElementById( 'PAD_' + $picID ).value;
   var $b = document.getElementById( 'PID_'   + $picID ).value.split('_');
   //alert($b.length-1 + '  ' + $a);
   if ( $a >= ( $b.length ) ){
    
	   return;
   
   }
   //Purpose: The block bellow changes the index of the current pictue and assigns the current HTML code to the USER's picture in there profile box.
   //         1. increase the index of the next picture to get from the database.
   //         2. display the index of the next picture in the profile box
   //         3. build the HTML source with the new index of the image included
   //         4. assign the HTML code from step 3. to the image in the profile box
   $a++;
   document.getElementById( 'PAD_' + $picID ).value = $a;
   document.getElementById( 'PCP_' + $picID ).innerHTML = $a;
   var $c="free-420-personals-pictures-" + $picID + "_" + $b[($a - 1)] + "_110_110.jpg";
   document.getElementById( 'PLS_' + $picID ).src = unescape( encodeURIComponent($c));

 }
 
 function picSwapImage( $username, $userID, $picID, $width, $height ){
 
    var $c = $username + "-pictures-" + $userID + "_" + $picID + "_" + $width + "_" + $height + ".jpg";

//var $k="/ajaxstarrater/images/working.gif";
    //document.getElementById( 'picLiveShotProfile_' + $userID ).src = unescape( encodeURIComponent($k));
    document.getElementById( 'PLS_' + $userID ).src = unescape( encodeURIComponent( $c ) );
 
 }
