I have a strange issue when I'm trying to call a method in javascript file. This .js file has the following two methods:

```
function setCookie(c_name, value, exdays)
{
  //set the expiry date as now + the specified number of days
  var exdate=new Date();
  exdate.setDate(exdate.getDate() + exdays);

  //add the expiry date string to the cookie value
  var c_value = escape(value) + ((exdays==null) ? "" : "; 
  expires="+exdate.toUTCString()+"; path=/");

  //set the cookie
  document.cookie = c_name + "=" + c_value;
}

function setTheCookie(c_name, value, exdays)
{
  //set the expiry date as now + the specified number of days
  var exdate=new Date();
  exdate.setDate(exdate.getDate() + exdays);

  //add the expiry date string to the cookie value
  var c_value = escape(value) + ((exdays==null) ? "" : "; 
  expires="+exdate.toUTCString()+"; path=/");

  //set the cookie
  document.cookie = c_name + "=" + c_value;
}

```

On a button click when I use `onclick="setTheCookie('cookie_bar_hide', 'yes', 365)"` it gets called, but when I use `onclick="setCookie('cookie_bar_hide', 'yes', 365)"` it does not get called.

Any ideas why this could be happening?