/*
 * found on jennifermadden.com (then cleaned up)
 */
function enterKeyBlurs( e, obj ) { 
	var characterCode;

	if ( e && e.which ) {
		characterCode = e.which;
	}
	else {
		characterCode = e.keyCode;
	}

	if ( characterCode == 13 ) {
		obj.blur();
		return false;
	}

	return true;
}

function popup( url ) {
	window.open(url,'name','height=600,width=800,resizable');
}

function swapImage( from, to, src ) {
  ++from;

  while ( --from > to ) {
    var img = document.getElementById( "ratingImage" + from );
    
    if ( img && ( img.src != src ) ) {
      img.src = src;
    }
  }
}

function swapImage2( from, to, src ) {
  ++from;

  while ( --from > to ) {
    var img = document.getElementById( "ratingImage2" + from );
    
    if ( img && ( img.src != src ) ) {
      img.src = src;
    }
  }
}
