function jumpHealthNotes(pageUrl)
{if(pageUrl.length>0)
{window.location.href=pageUrl;}}
function loadPage(pageno,action)
{document.getElementById('page').value=''+pageno;document.loadPageing.action=action;document.loadPageing.submit();}
function ValidateHealthSection(a){if(isWhitespace(a.name.value)){alert("Please enter your name.");a.name.focus();return false;}else if(!isCharsInBag(a.name.value,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ")){alert("Your name contains invalid characters.");a.name.focus();return false;}
var b=trimAll(a.email.value);if(isWhitespace(b)){alert("Please enter your e-mail address.");a.email.focus();return false;}else if(!isEmail(b)){alert("Please enter your e-mail address in the correct format.");a.email.focus();return false;}else if(!isCharsInBag(b,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-")){alert("Your e-mail address contains invalid characters.");a.email.focus();return false;}
if(isWhitespace(a.comments.value)){alert("Please enter your comments.");a.comments.focus();return false;}
if(isWhitespace(a.name2.value)){alert("Please enter characters in the image below.");a.name2.focus();return false;}
return true}
function postCommentHealth(){if(!ValidateHealthSection(document.blog_comment_form)){return false;}else{document.getElementById('secured').value='secured';return true;}}
function GetBrowserHealth()
{var xmlHTTP=null;try{xmlHTTP=new XMLHttpRequest();}
catch(e)
{try
{xmlHTTP=new ActiveXObject("Msxml2.XMLHTTP");}
catch(E)
{xmlHTTP=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHTTP;}
function showOverRatingHealth(imgId){var im=1;for(im=1;im<=imgId;im++){document.getElementById("img"+im).src='yellow_star_17_16.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/yellow_star_17_16.gif*/;}}
function showOutRatingHealth(imgId,ratingId){var im=1;for(im=1;im<=5;im++){if(im<=ratingId)
document.getElementById("img"+im).src='orange_star_17_16.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/orange_star_17_16.gif*/;else
document.getElementById("img"+im).src='grey_star_17_16.gif'/*tpa=http://assets.chemistdirect.co.uk/include/validationscript/images/grey_star_17_16.gif*/;}}
function doUpdateRatingHealth(type,id,vote)
{var url="http://assets.chemistdirect.co.uk/include/validationscript/rating_update_health.php";var param="id="+id+"&type="+type+"&vote="+vote;var xmlhttp=new GetBrowserHealth();xmlhttp.open('POST',url,true);document.getElementById('div_rating_health').style.display='';xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){var objDetails=xmlhttp.responseText;if(objDetails!=null){document.getElementById("div_rating_health").innerHTML=""
document.getElementById("div_rating_health").innerHTML=objDetails;}}}
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.send(param);}
