function checkInputValue( iv, defVal )
{
  if ( iv.value == defVal )
  {
    iv.value = '';
  }
}


function checkInputValueOut( iv, defVal )
{
  if ( iv.value == '' )
  {
    iv.value = defVal;
  }
}


function checkInputPassValue( iv, defVal )
{
  if ( iv.value == defVal )
  {
    iv.value = '';
    iv.type = 'password';
  }
}


function checkInputPassValueOut( iv, defVal )
{
  if ( iv.value == '' )
  {
    iv.type = 'text';
    iv.value = defVal;
  }
}


function setErrorPatched( field, count )
{
  var newImgPath = bp + 'media/msg/';
  
  for ( var x = 1; x <= count; x++ )
  {
    $( '#' + field + x ).src = newImgPath + $( '#' + field + x ).alt + '_done.gif';
  }
}


function jslink( link )
{
  window.location.href = link;
}