function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i