function setCaption( id, caption ){  var code = "";  var left = "";  var right = "";    if (caption.indexOf('(') != -1)  {    left = caption.substr(0, caption.indexOf('(')); // Get the bit before the brackets    right = caption.substr(caption.indexOf('(') + 1); // Get rid of the open bracket    right = right.substr(0, right.indexOf(')')); // Get rid of the close bracket  }  else    left = caption;  document.getElementById(id).innerHTML = "<span>" + left + "</span>" + right;}function clearCaption( id ){  document.getElementById(id).innerHTML = "";}function setURL( link ){  link.href = '';  link.href = 'video.php?vid=' + link.rel + '&caption=' + escape(link.title);}
