function changeDisplay( stype, elementId, setTo, intvalue ) {
  var theElement;
  if( document.getElementById ) {
    //DOM
    theElement = document.getElementById( elementId );
  } else if( document.all ) {
    //Proprietary DOM
    theElement = document.all[ elementId ];
  }
  if( !theElement ) {
    /* The page has not loaded, or the browser claims to
    support document.getElementById or document.all but
    cannot actually use either */
    return;
  }
  //Reference the style ...
  if( theElement.style ) { theElement = theElement.style; }
  if( typeof( theElement.display ) == 'undefined' ) {
    //The browser does not allow us to change the display style
    //Alert something sensible (not what I have here ...)
    window.alert( 'Your browser does not support this' );
    return;
  }
  //Change the display style
  if (stype == 'checkbox')
  {
	if (intvalue == true)
	{
		theElement.display = setTo;
	}
	else
	{
		theElement.display = 'none';
	}
  }
  else
  {
	if( intvalue >= 1)
	{
	    theElement.display = setTo;
	}
	else
	{
		theElement.display = 'none';
	}
  }
}

function getCaptcha() {
    var img = new Image();
    $(img).load(function() {
        $(this).hide();
        $('#spnCaptcha').html('').append(this);
        $(this).fadeIn();
    })
            .attr('src', '/CaptchaImage.aspx?id=' + Math.random());
}
