document.write('<script src="includejs/validation.js"><\/script>');document.write('<script src="includejs/generalfunctions.js"><\/script>');document.write('<script src="includejs/login_site.js"><\/script>');document.write('<script src="add_form.js"><\/script>');document.write('<script src="includejs/md5.js"><\/script>');document.write('<script src="includejs/members.js"><\/script>');document.write('<script src="includejs/enhance_profile.js"><\/script>');document.write('<script src="includejs/tabs.js"><\/script>');document.write('<script src="includejs/site_wide_functions.js"><\/script>');document.write('<script src="includejs/maps.js"><\/script>');document.write('<script src="includejs/statics.js"><\/script>');document.write('<script src="includejs/rating.js"><\/script>');document.write('<script src="includejs/page_control.js"><\/script>');document.write('<script src="includejs/markers.js"><\/script>');document.write('<script src="includejs/contact_forms.js"><\/script>');document.write('<script src="includejs/init_load_user.js"><\/script>');document.write('<script src="includejs/search.js"><\/script>');document.write('<script src="includejs/localisation.js"><\/script>');document.write('<script src="includejs/postcode.js"><\/script>');document.write('<script src="includejs/stats.js"><\/script>');document.write('<script src="includejs/pictures.js"><\/script>');document.write('<script src="includejs/amenity_functions.js"><\/script>');document.write('<script src="includejs/event_functions.js"><\/script>');document.write('<script src="includejs/business_functions.js"><\/script>');document.write('<script src="includejs/news_functions.js"><\/script>');document.write('<script src="includejs/weather_functions.js"><\/script>');window.onload=init;function init()
{load_localisation_form();loadgooglegeocoder();varlocalpostcode=getcookiepc();varlocalcountry=getcookiecountry();varlocallat=getcookielat();varlocallng=getcookielng();map=loadgooglemaps();if(varlocalpostcode=='WC2H 7HG')
{change_localisation_enable();varlocallat='51.50919';varlocallng='-0.130144';createcontrolpanel(varlocallng,varlocallat,varlocalpostcode,varlocalcountry);document.getElementById('localisation_enable').checked=false;load_local_latest_businesses(0,0,0);load_local_latest_busines_reviews(0,0,0);}else
{if(varlocalpostcode=='blank'&&((varlocallat!='blank')&&(varlocallng!='blank')))
{var point=new GLatLng(varlocallat,varlocallng);setCenterToPoint(point,map);}else
{usePointFromPostcode_worldwide(varlocalpostcode,varlocalcountry,map,setCenterToPoint);}}
var alltags=document.getElementById('float_inside').getElementsByTagName('*');for(var i=0;i<alltags.length;i++)
{alltags[i].onfocus=function(){this.style.backgroundColor='#FFFFFF';}}
re_position_elements();change_tab('tab_box','taba');checkifuserloggedin();load_user_value_from_php();load_local_news(varlocalcountry,varlocalpostcode);load_local_weather(varlocalcountry,varlocalpostcode);}
function createcontrolpanel(tmplng,tmplat,tmppc,tmpcontry)
{var tmpstr=document.getElementById("divcontrolpanel").innerHTML;var newcontents='<span class="" id="controlpanel_title"><b><center>Setup Options</center></b></span>';var tmpvar=tmpstr.toLowerCase().indexOf("loading...");if(tmpvar!=-1)
{if(tmpcontry=="usa")
{newcontents=newcontents+"<span class='itemlabel' title='This is your entered Zip code'>Your Zip Code: <span class='data'>"+tmppc.toUpperCase()+"</span></span>";}else
{newcontents=newcontents+"<span class='itemlabel'>Your Post Code: <span class='data' title='This is your entered Post code'>"+tmppc.toUpperCase()+"</span></span>&nbsp;&nbsp;";}
newcontents=newcontents+"<span class='itemlabel'>Your Latitude: <span  class='data' title='Your selected Latitude'>"+limittextsize(tmplat,10,0)+"</span></span>&nbsp;&nbsp;";newcontents=newcontents+"<span class='itemlabel'>Your Longitude: <span class='data' title='Your selected Longitude'>"+limittextsize(tmplng,10,0)+"</span></span>&nbsp;&nbsp;";newcontents=newcontents+'<span class="mainlabelmouse" onclick="resetpage();" title="Update your location"><img src="http://www.guidehut.com/images/buttons/updateloca_v1.gif" id="Update Location" title="Update Location" alt="Update Location"></span>';newcontents=newcontents+load_localisation_form();document.getElementById("divcontrolpanel").innerHTML=newcontents;}else
{}
if(tmpstr=="")
{document.getElementById("divcontrolpanel").innerHTML="<span class='itemlabel'>Loading...</span>";}}
function resetpage()
{deletecookiecontry();deletecookiepc();location.href='index.htm';}
function displayweathertag()
{var htmltosend;htmltosend="<div class='mainlabel'>Your Local Weather</div>";return htmltosend;}
function displayweather(datain)
{var tmpstr=document.getElementById("divweather").innerHTML;var tmpvar=tmpstr.toLowerCase().indexOf("loading...");if(tmpvar!=-1)
{document.getElementById("divweather").innerHTML=displayweathertag();}
document.getElementById("divweather").innerHTML+="<span class='data'>"+datain+"</span>";if(datain=="")
{document.getElementById("divweather").innerHTML="<span class='itemlabel'>Loading...</span>";}}
function getxmlweathernew()
{var url="http://www.guidehut.com/include/newxmlcomp-bbc.php?pc="+varlocalpostcode;xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function stateChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{if(xmlHttp.responseText=="could not open XML input")
{displayweather("");displayweather("Sorry - There was a problem loading your local weather please try later");}else
{if(xmlHttp.responseText=="could not open XML input")
{displayweather("");displayweather("Sorry - There was a problem loading your local weather please try later");}else
{displayweather(xmlHttp.responseText);}}}}
function GetXmlHttpObject()
{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 trim(str)
{return str.replace(/^(\s+)?(\S*)(\s+)?$/,'$2');}
function resetMessage(frm)
{document.getElementById("divmessages").innerHTML='';document.getElementById("errorname").innerHTML='';document.getElementById("erroradd").innerHTML='';document.getElementById("errorlng").innerHTML='';document.getElementById("errorlat").innerHTML='';document.getElementById("frmnamelab").style.color='#000000';document.getElementById("frmaddlab").style.color='#000000';document.getElementById("frmlnglab").style.color='#000000';document.getElementById("frmlatlab").style.color='#000000';var alltags=document.getElementById('float_inside').getElementsByTagName('*');for(var i=0;i<alltags.length;i++)
{alltags[i].style.backgroundColor='#FFFFFF';}}
function changebackgroundcolor(idname)
{document.getElementById(idname).style.backgroundColor='#FF0000';idname2=idname+'lab';document.getElementById(idname2).style.color='#FF0000';}
function redirectOutput(myForm)
{var w=window.open('about:blank','Popup_Window','height=500,width=600,resizable=yes,scrollbars=yes,toolbar=yes,status=no');myForm.target='Popup_Window';return true;}
function loadXMLDoc(url)
{xmlhttp=null;if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else if(window.ActiveXObject)
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
if(xmlhttp!=null)
{xmlhttp.onreadystatechange=state_Change;xmlhttp.open("GET",url,true);xmlhttp.send(null);}
else
{}}
function state_Change()
{if(xmlhttp.readyState==4)
{if(xmlhttp.status==200)
{}
else
{}}}
