Is there a way to call the head js instead of showing all this in the header? I have tried a few things and it does not seem to work.
Code:
{literal}
<script type="text/javascript">
function setCookie(name, value) {
var today = new Date()
var expires = new Date()
expires.setTime(today.getTime() + 1000*60*60*24*30)
document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +";path=/"
}
function getCookie(Name) {
var search = Name + "="
if(document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if(offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if(end == -1) end = document.cookie.length
return unescape(document.cookie.substring(offset, end))}
else return ""
}
}
</script>
{/literal}