
/* gettext library */

var catalog = new Array();

function pluralidx(count) { return (count == 1) ? 0 : 1; }
catalog['Auction finished'] = 'Auction finished';
catalog['Inactive'] = 'Inactive';
catalog['Not started yet'] = 'Not started yet';
catalog['Paused'] = 'Paused';
catalog['Please login first!'] = 'Please login first!';
catalog['Stoped'] = 'Stoped';
catalog['Unexpected error during placing a bet, please verify if your bet was properly registered'] = 'Unexpected error during placing a bet, please verify if your bet was properly registered';
catalog['You can\'t bid on this auction'] = 'You can\'t bid on this auction';
catalog['ERROR !  Please, check you account for bids\' amount.'] = 'ERROR !  Please, check you account for bids\' amount.';
catalog['Approval of Terms and Conditions along with Privacy Policy is required'] = 'Approval of Terms and Conditions along with Privacy Policy is required';
catalog['Enter E-mail please, you will need it to log in'] = 'Enter E-mail please, you will need it to log in';
catalog['Enter a valid e-mail, please'] = 'Enter a valid e-mail, please';
catalog['Match the email, please'] = 'Match the email, please';
catalog['Username with at least 4 characters'] = 'Username with at least 4 characters';
catalog['Letters and Numbers only (or underscore(_) within)'] = 'Letters and Numbers only (or underscore(_) within)';
catalog['Choose your username: alphanumeric characters only'] = 'Choose your username: alphanumeric characters only';
catalog['Enter at least 5 characters'] = 'Enter at least 5 characters';
catalog['Choose and remember your password'] = 'Choose and remember your password';
catalog['Match the password, please'] = 'Match the password, please';
catalog['Enter your password again'] = 'Enter your password again';
catalog['Your name is required'] = 'Your name is required';
catalog['Your last name is required'] = 'Your last name is required';
catalog['Street address is required'] = 'Street address is required';
catalog['Your municipality name is required'] = 'Your municipality name is required';
catalog['Province is required'] = 'Province is required';
catalog['Valid Postal Code, please'] = 'Valid Postal Code, please';
catalog['10-digits phone number, please'] = '10-digits phone number, please';
catalog['Enter your phone number'] = 'Enter your phone number';
catalog['Invalid date, please check'] = 'Invalid date, please check';
catalog['Sorry, only persons over the age of 18 may register'] = 'Sorry, only persons over the age of 18 may register';
catalog['Enter yor birth date - you must be at least 18 years old'] = 'Enter yor birth date - you must be at least 18 years old';

catalog['January'] = 'January'; catalog['February'] = 'February'; catalog['March'] = 'March';
catalog['April'] = 'April'; catalog['May'] = 'May'; catalog['June'] = 'June';
catalog['July'] = 'July'; catalog['August'] = 'August'; catalog['September'] = 'September';
catalog['October'] = 'October'; catalog['November'] = 'November'; catalog['December'] = 'December';
catalog['You seem to be experiencing connection problems. If you have Avast antivirus, please uninstall it and install AVG antivirus instead (http://free.avg.com/).'] = 'You seem to be experiencing connection problems. If you have Avast antivirus, please uninstall it and install AVG antivirus instead (http://free.avg.com/).';
catalog['Finished'] = 'Finished';
catalog['Price too low'] = 'Price too low';
catalog['Price too low<br/>Bids Returned'] = 'Price too low<br/>Bids Returned';

function gettext(msgid) {
  var value = catalog[msgid];
  if (typeof(value) == 'undefined') {
    return msgid;
  } else {
    return (typeof(value) == 'string') ? value : value[0];
  }
}

function ngettext(singular, plural, count) {
  value = catalog[singular];
  if (typeof(value) == 'undefined') {
    return (count == 1) ? singular : plural;
  } else {
    return value[pluralidx(count)];
  }
}

function gettext_noop(msgid) { return msgid; }

function interpolate(fmt, obj, named) {
  if (named) {
    return fmt.replace(/%\(\w+\)s/g, function(match){return String(obj[match.slice(2,-2)])});
  } else {
    return fmt.replace(/%s/g, function(match){return String(obj.shift())});
  }
}
					///////Help functions MT//////
					//hide-show help
function hide_help(div_id) {
  for (var i = 0; i < 27; i++)       {
   var el = document.getElementById("help_index_" + i);
   var sel = document.getElementById("sel_" + i).className;
  if (sel != "child" && sel != "child sel_menu") {
        document.getElementById("sel_" + i).className = "none";
    		}
  if (sel == "child sel_menu") {
        document.getElementById("sel_" + i).className = "child";
    		}
  if (el) {
        el.style.display = "none"; 
                    }    
     }
  hideH(div_id);
 }
function hideH(div_id) {
   if(document.getElementById(div_id).style.display == "none") {
        document.getElementById(div_id).style.display = "block";
          var numb = div_id.split("_");
          document.getElementById('switchHelp').innerHTML = '<a href="/fr/help/?help_id=' + parseInt(numb[2]) + '">Français</a>';
          numb[2] = "sel_" + parseInt(numb[2]);
          document.getElementById(numb[2]).className += " sel_menu";
         }
   else { document.getElementById(div_id).style.display = "none";
        }
   }                                                              //hide-show profile item
function hide_profile(div_id) {
  for (var i = 0; i < 12; i++)       {
   var el = document.getElementById("help_index_" + i);
   try {
   var sel = document.getElementById("sel_" + i).className;

  if (sel != "child" && sel != "child sel_menu") {
        document.getElementById("sel_" + i).className = "none";
    		}
  if (sel == "child sel_menu") {
        document.getElementById("sel_" + i).className = "child";
    		}
    		   } 
   catch(err) {
   	  div_id = "help_index_0"; 
   }  
  if (el) {
        el.style.display = "none";
                    }
     }
  hideP(div_id);
 }
function hideP(div_id) {
	try {
   if(document.getElementById(div_id).style.display == "none") {
        document.getElementById(div_id).style.display = "block";
          var numb = div_id.split("_");
          document.getElementById('switchAccount').innerHTML = '<a href="/fr/accounts/profile/?account=' + parseInt(numb[2]) + '">Français</a>';
          numb[2] = "sel_" + parseInt(numb[2]);
          document.getElementById(numb[2]).className += " sel_menu";
         }
   else { document.getElementById(div_id).style.display = "none";
        }
   }
   catch(err) {}
}

function hide_admin(div_id) {
for (var i = 0; i < 5; i++)       {
   var el = document.getElementById("help_index_" + i);
   var sel = document.getElementById("sel_" + i).className;
  if (sel != "child" && sel != "child sel_menu") {
        document.getElementById("sel_" + i).className = "none";
    		}
  if (sel == "child sel_menu") {
        document.getElementById("sel_" + i).className = "child";
    		}
  if (el) {
        el.style.display = "none";
                    }
     }
  hideA(div_id);
 }
function hideA(div_id) {
   if(document.getElementById(div_id).style.display == "none") {
        document.getElementById(div_id).style.display = "block";
          var numb = div_id.split("_");
          numb[2] = "sel_" + parseInt(numb[2]);
          document.getElementById(numb[2]).className += " sel_menu";
         }
   else { document.getElementById(div_id).style.display = "none";
        }
   }
                       //     Select or Unselect all Checkboxes MT - modified
function checkedAll() {
var inputsWatch = document.getElementsByTagName("input");
var selectWatch = document.getElementById("SelectAll");
for (var i = 0; i < inputsWatch.length; i++)
{
if(inputsWatch[i].className == "watch_auction")
{
if(!selectWatch.checked)
{
inputsWatch[i].checked = false;
}
else
{
inputsWatch[i].checked = true;
}
}
}
}

