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 jslink( link )
{
  window.location.href = link;
}

function jslinkWindow( link, target )
{
	window.open(link, target);
}

function setActive()
{
  active = true;
}


function setBoxHeight(el, this_el)
{
  $('#'+this_el).height($('#'+el).height());
}


function setFocus( field  )
{
  formname  = field.split("['");
  fieldname = formname[1].split("'");

  $('#' + formname[0] + ' #' + fieldname[0] ).focus();
}


function setErrorPatched( field, count )
{
  var newImgPath = bp + 'media/msg/';

  for ( var x = 1; x <= count; x++ )
  {
    $( '#' + field + x ).attr( 'src', newImgPath + $( '#' + field + x ).attr('alt') + '_done.gif' );
  }
}

function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
