var global_counter="";function show_list_info(counter){if(global_counter!=""){document.getElementById("list_info_"+global_counter).style.display='none';}
document.getElementById("list_info_"+counter).style.display='block';global_counter=counter;}
function hide_list_info(){if(global_counter!=""){document.getElementById("list_info_"+global_counter).style.display='none';global_counter="";}}
function CheckEmail(value){email=value;AtPos=email.indexOf("@");StopPos=email.lastIndexOf(".");if(AtPos==-1||StopPos==-1){return false;}
else{return true;}}
function submitform(){var checker='';if(document.getElementById('contact_name').value==''){alert('Please enter your name');checker='false';}else if(document.getElementById('contact_email').value==''){alert('Please enter your email address');checker='false';}else if(CheckEmail(document.getElementById('contact_email').value)==false){alert('Please enter a valid email address');checker='false';}else if(document.getElementById('contact_number').value==''){alert('Please enter your contact number');checker='false';}else{checker='true';}
if(checker!='false'){document.getElementById('contact_form').submit();}}
function init()
{timeDisplay=document.createTextNode("");document.getElementById("clock").appendChild(timeDisplay);}
function updateClock(){loadXMLDoc("/servertime.php");}
function loadXMLDoc(url)
{if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.open("GET",url,false);xmlhttp.send(null);document.getElementById('timebox').innerHTML=xmlhttp.responseText;}
var weekdaystxt=["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"]
function showLocalTime(container,servermode,offsetMinutes,displayversion){if(!document.getElementById||!document.getElementById(container))return
this.container=document.getElementById(container)
this.displayversion=displayversion
var servertimestring=(servermode=="server-php")?'<? print date("F d, Y H:i:s", time())?>':(servermode=="server-ssi")?'November 29, 2009 18:43:25':'<%= Now() %>'
this.localtime=this.serverdate=new Date(servertimestring)
this.localtime.setTime(this.serverdate.getTime()+offsetMinutes*60*1000)
this.updateTime()
this.updateContainer()}
showLocalTime.prototype.updateTime=function(){var thisobj=this
this.localtime.setSeconds(this.localtime.getSeconds()+1)
setTimeout(function(){thisobj.updateTime()},1000)}
showLocalTime.prototype.updateContainer=function(){var thisobj=this
if(this.displayversion=="long")
this.container.innerHTML=this.localtime.toLocaleString()
else{var hour=this.localtime.getHours()
var minutes=this.localtime.getMinutes()
var seconds=this.localtime.getSeconds()
var ampm=(hour>=12)?"PM":"AM"
var dayofweek=weekdaystxt[this.localtime.getDay()]
this.container.innerHTML=formatField(hour,1)+":"+formatField(minutes)+" "+ampm+" "}
setTimeout(function(){thisobj.updateContainer()},1000)}
function formatField(num,isHour){if(typeof isHour!="undefined"){var hour=(num>12)?num-12:num
return(hour==0)?12:hour}
return(num<=9)?"0"+num:num}

