/*
 * Updates the value of `field' with the size of the `chartWidget'.  This way 
 * charts in the media analysis tool can be rendered with the proper size.
 */
function updateChartSize(field, chartWidget) {
	field.value = $(chartWidget).getWidth() - 30;
}

/**
 Deletes the cookie. This is used on the loginPage, to make sure that no old cookies are left.
 Which used to be a problem for safari.
*/
function deleteCookie( cookieName ) {  
  var cookieDate = new Date();  // current date & time
  cookieDate.setTime ( cookieDate.getTime() - (1*24*60*60*1000) );
  document.cookie = cookieName += "=; expires=" + cookieDate.toGMTString() + "; path=/app/";
}

