// JavaScript Documentfunction init(){	if(document.getElementById('float_total')){		document.getElementById('float_total').style.width="125px";		document.getElementById('float_total').style.left="9px";		document.getElementById('float_total').style.top="570px";		document.getElementById('float_total').style.zIndex="900";		document.getElementById('float_total').style.position="absolute";		if (is_pc_ie){			window.setTimeout('doSomething()', 50);		}else{			document.getElementById('float_total').style.position="fixed";//Non-IE on windows		}	}}var field_id_global=null;function getAddress(field_id)   {      		field_id_global=field_id;   		postcode=document.getElementById(field_id+'_postcode').value;       building=document.getElementById(field_id+'_house_no').value;      var scriptTag = document.getElementById("pcaScriptTag");      var headTag = document.getElementsByTagName("head").item(0);      var strUrl = "";      //Build the url      strUrl = "../address_finder2.php?";      strUrl += "&postcode=" + escape(postcode);      strUrl += "&building=" + escape(building);      //Make the request      if (scriptTag)          {            headTag.removeChild(scriptTag);         }      scriptTag = document.createElement("script");      scriptTag.src = strUrl	   scriptTag.type = "text/javascript";      scriptTag.id = "pcaScript";      headTag.appendChild(scriptTag);   }      function getAddress_just_postcode(field_id)   {   calls=0;   		field_id_global=field_id;   		postcode=document.getElementById(field_id+'_postcode').value;       building="";      var scriptTag = document.getElementById("pcaScriptTag");      var headTag = document.getElementsByTagName("head").item(0);      var strUrl = "";      //Build the url      strUrl = "../address_finder2.php?";      strUrl += "&postcode=" + escape(postcode);      strUrl += "&building=" + escape(building);      //Make the request      if (scriptTag)          {            headTag.removeChild(scriptTag);         }      scriptTag = document.createElement("script");      scriptTag.src = strUrl	   scriptTag.type = "text/javascript";      scriptTag.id = "pcaScript";      headTag.appendChild(scriptTag);   }calls=0;function getAddressEnd()   {      //Test for an error      if (pcaIsError)         {            //Show the error message 				if(pcaErrorMessage=="Sorry, no matching address found"){					calls=1;					getAddress(field_id_global);				}else{					alert(pcaErrorMessage);				}         }      else         {            //Check if there were any items found            if (pcaRecordCount==0)               {					  if(calls==1){   						 alert("Sorry, no matching address found");						}else{							calls=1;							getAddress(field_id_global);						}               }            else               {			   document.getElementById(field_id_global+"_address").value="";				 if(pca_line1[0]){                  document.getElementById(field_id_global+"_address").value+=pca_line1[0]+"\r";				  }				 if(pca_line2[0]){                  document.getElementById(field_id_global+"_address").value+=pca_line2[0]+"\r";				  }				 if(pca_line3[0]){                  document.getElementById(field_id_global+"_address").value+=pca_line3[0]+"\r";				  }				 if(pca_post_town[0]){                  document.getElementById(field_id_global+"_address").value+=pca_post_town[0]+"\r";				  }				 if(pca_county[0]){                  document.getElementById(field_id_global+"_address").value+=pca_county[0]+"\r";				  }				  if(pca_postcode[0]){                  document.getElementById(field_id_global+"_address").value+=pca_postcode[0]+"\r";				  }               }         }   }   var ua  = navigator.userAgent.toLowerCase(); var is_pc_ie  = ( (ua.indexOf('msie') != -1 ) && ( ua.indexOf('win') != -1 ) && ( ua.indexOf('opera') == -1 ) && ( ua.indexOf('webtv') == -1 ) );function doSomething(){ 		if (document.documentElement && document.documentElement.scrollTop){			theTop = document.documentElement.offsetHeight+document.documentElement.scrollTop;		}else if (document.body){			theTop = document.body.offsetHeight+document.body.scrollTop;		}		//offst=-50;		offst=document.getElementById('float_total').offsetHeight;		posy=theTop-offst;		flashtop= parseFloat(document.getElementById('float_total').style.top);		if(flashtop>posy){			document.getElementById('float_total').style.top=flashtop-parseInt((flashtop-posy)/5)+"px";		}else if(flashtop<posy){			document.getElementById('float_total').style.top=flashtop+parseInt((posy-flashtop)/5)+"px";		}		window.setTimeout('doSomething()', 50);}