function gup(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results===null)return"";else{return results[1].replace(/%20/g,' ')}}function distanceLatLon(lat1,lon1,lat2,lon2){var R=6371;var dLat=(lat2-lat1)*Math.PI/180;var dLon=(lon2-lon1)*Math.PI/180;var a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);var c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));var d=R*c;return Math.ceil(d*1000)}function getLocation(){var trackerId=0;var theUser={};var map={};var gps=navigator.geolocation;if(navigator.geolocation){var options={timeout:60000,maximumAge:330000};gps.getCurrentPosition(showLoc,errorHandler,options)}if(gps!=undefined){trackerId=gps.watchPosition(function(pos){setGeoPos(pos);showLocation(pos)})}}function showLoc(pos){setGeoPos(pos);showLocation(pos)}function errorHandler(err){if(err.code==1){alert("Error: Access is denied!")}else if(err.code==2){alert("Error: Position is unavailable!")}}function timeStr(dt){var currentTime=dt;var hours=currentTime.getHours();var minutes=currentTime.getMinutes();var suffix="AM";if(hours>=12){suffix="PM";hours=hours-12}if(hours===0){hours=12}if(minutes<10)minutes="0"+minutes;return hours+":"+minutes+" "+suffix}function distFormat(d){if(d>=1000)return Math.round((d/1000)*100)/100+' km.';else return Math.round(d*1000)/1000+' m.'}function getFile(fileName){oxmlhttp=null;try{oxmlhttp=new XMLHttpRequest();oxmlhttp.overrideMimeType("text/xml")}catch(e){try{oxmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){return null}}if(!oxmlhttp)return null;try{oxmlhttp.open("GET",fileName,false);oxmlhttp.send(null)}catch(e){return null}return oxmlhttp.responseText}function stopTracking(){if(trackerId){navigator.geolocation.clearWatch(trackerId)}}function setCookie(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays===null)?"":"; expires="+exdate.toUTCString());document.cookie=c_name+"="+c_value}function getCookie(c_name){var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i')}loadjscssfile("css/basic.css",'css');loadjscssfile("css/main.css",'css')}function getWinDim(){var winW=630,winH=460;if(document.body&&document.body.offsetWidth){winW=document.body.offsetWidth;winH=document.body.offsetHeight}if(document.compatMode=='CSS1Compat'&&document.documentElement&&document.documentElement.offsetWidth){winW=document.documentElement.offsetWidth;winH=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){winW=window.innerWidth;winH=window.innerHeight}return{"wd":parseInt(winW,10),"ht":parseInt(winH,10)}}