/* Common Javascript functions. */
<!--

/**
 * The JQuery onload function. 
 */
$(document).ready(function(){
  // Curvy Corners object.
  var objCurvyCorners = null;
  // The page content container id.
  var contentContainerId = 'content_container';
  // Curvy Corners settings.
  var settings = {
	tl: { radius: 20 },
	tr: { radius: 20 },
	bl: { radius: 20 },
	br: { radius: 20 },
	antiAlias: true,
	autoPad: false
  }  

  // Check if the content container exists
  if($('#' + contentContainerId).length) {
	// Create the Curvy Corners object.
	objCurvyCorners = new curvyCorners(settings, document.getElementById(contentContainerId));
	// Apply the Curvy Corners settings to the content container.
	objCurvyCorners.applyCornersToAll();
  }
  
  // Sort any table that has the tablesorter class attached.
  if($('table.tablesorter').length)
	$('table.tablesorter').tablesorter();

  //
  if($('#frm_user_login').length) {
	$('#frm_user_login').submit(function() {
	  $('#UserPassword').val(hex_hmac_md5(hex_hmac_md5($('#UserPassword').val(), $('#UserSalt').val()), $('#UserChallenge').val()));
	  alert($('#UserPassword').val());
	});
  }
});
//-->