JS not worked on new host

Gudday all
Recently I was forced to change hosts for my wife’s on-line business.
On the previous host my JS for displaying date last modified worked ok. But on the new host it is not visible.
The new host calims that my code must be wrong but I do not see how as it is unchanged. :confused:
Before is the code


<script type="text/javascript">//<![CDATA[var now =  new Date();document.write('<p class="webmaster">');document.write("Site design &copy; Petals &amp; Patches 2004 -" + now.getFullYear() + ".");document.write('<p class="lastupdated">');document.write("Last updated on " + document.lastModified.substring(3,5) + "/" + document.lastModified.substring(0,2)+ "/" + document.lastModified.substring(6,10) + '<\\/p>');//]]></script>

Is there any thing wrong with the code that might prevent it from working or displaying? Or is there some setting on the new host that needs to be changed? Or is the hoster is playing hard to get?

What I also find very puzzling is that on taht same page I have JS to detect whether a radio button has been selected or not and it workd fine.
This code is below


<script language="javascript" type="text/javascript">function checkRadio (frmName, rbGroupName){  var radios = document[frmName].elements[rbGroupName];   for (var i=0; i<radios.length;i++)    {	 if (radios[i].checked) {	  return true;	  }	}	return false;  }function valFrm(frmName){ if (!checkRadio(frmName, "productpr")) {  var err = 'You have not selected a ' + frmName  + ' quilt option. Please select an option';  alert(err);  return false; } else   return true;} </script>

That will generate a P tag within a P tag (and one of them won’t be closed). That’s not allowed.

It is horrible code anyway. For a start, you should do this stuff on the server, you don’t need javascript for it. Also, document.write should not be used at all.

Or is the hoster is playing hard to get?

This doesn’t make sense, as all that should run on the browser and is unrelated to the host.