function go(loc){document.location.href=loc;}function goBack(){history.back();}function goHide(obj){obj.style.display="none";}function goFocus(obj){obj.focus();}function goShow(obj){obj.style.display="block";}function goDisable(obj){obj.disabled=true;}function goEnable(obj){obj.disabled=false;}function goClearField(obj,text){if(obj.value==text){obj.value="";}}function goFillField(obj,text){if(obj.value==""){obj.value=text;}}function goClearFieldBg(elem){if(elem.value==""){elem.style.backgroundImage="none";}}function goFillFieldBg(elem,bg){if(elem.value==""){elem.style.backgroundImage="url("+bg+")";}}function goPopup(where){window.open(where);}function goPopupMinimal(loc,w,h){var leftVal=(screen.width/2)-(w/2);var topVal=(screen.height/2)-(h/2);window.open(loc,"new_window","left="+leftVal+",top="+topVal+",toolbar=no,width="+w+",height="+h+",status=no,resizable=yes,menubar=no,location=no,scrollbars=yes");}function goPopupImage(loc){var w=640;var h=480;var leftVal=(screen.width/2)-(w/2);var topVal=(screen.height/2)-(h/2);window.open(loc,"new_window","left="+leftVal+",top="+topVal+",toolbar=no,width="+w+",height="+h+",status=no,resizable=yes,menubar=no,location=no,scrollbars=no");}function getFormFields(objForm){if(!objForm){return false;}objParams=new Object;inputFields=objForm.getElementsByTagName("input");for(i=0;i<inputFields.length;i++){strName=inputFields[i].name;strType=inputFields[i].type;strValue=inputFields[i].value;switch(strType){case"text":case"hidden":case"password":case"button":case"submit":case"reset":case"image":case"file":objParams[strName]=strValue;break;case"checkbox":case"radio":if(inputFields[i].checked){objParams[strName]=strValue;}break;}}selectFields=objForm.getElementsByTagName("select");for(i=0;i<selectFields.length;i++){strName=selectFields[i].name;strType="";strValue="";for(j=0;j<selectFields[i].options.length;j++){if(selectFields[i].options[j].selected){if(strValue.length){strValue+=",";}strValue+=selectFields[i].options[j].value;}}objParams[strName]=strValue;}return objParams;}function goSwapImage(strId,strImage,strAlt){var theElem=document.getElementById(strId);if(!theElem){return;}if(theElem.tagName.toLowerCase()=="img"){theElem.src=strImage;if(strAlt!==null){theElem.alt=strAlt;}}}function getDirections(){var postcode=document.getElementById("postcode").value;var destination=document.getElementById("destination").value;window.open("http://maps.google.co.uk/maps?f=d&source=s_d&saddr="+postcode+"&daddr="+destination);}function disableEnterKey(e){var key;if(window.event){key=window.event.keyCode;}else{key=e.which;}return(key!=13);}