function clock(){
var months = new Array ("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec");
var days = new Array ("Sun","Mon","Tues","Wed","Thurs","Fri","Sat");
var time = new Date();
var jmonth = months[time.getMonth()];
var date = time.getDate();
var year = time.getYear();
var jday = days[time.getDay()];
var hr = time.getHours();
var mn = time.getMinutes();
var sc = time.getSeconds();
var amp = ((hr<12)? " a.m" : " p.m");
hr = ((hr>12)? hr - 12 : hr);
mn = ((mn<10)?"0" : "") + mn;
sc = ((sc<10)?"0" : "") + sc;
if (year < 2000){year = year + 1900};
jtime = ( jday + " " + date + " " + jmonth + ", " + year + " " + hr + ":" + mn + ":" + sc + amp);
if (document.layers) {
document.layers.mytime.document.write(jtime);
document.layers.mytime.document.close();
}
else if (document.all){
mytimeb.innerHTML = jtime;
}
else{
document.getElementById('mytimeb').innerHTML = jtime;
}
setTimeout("clock()",1000)
}

ClickCount = 0;
function Send()
{
if (ClickCount > 0)
{   
alert("Request being processed. Please be patient.") ;
return false;
}
ClickCount = 1 ;
return true ;
}

function jump(fe){
var opt_key = fe.selectedIndex;
var uri_val = fe.options[opt_key].value;
window.open(uri_val,'_top');
return true;
}
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}


var computer=null;
var browser=navigator.appName;
var version=navigator.appVersion;
if(version.indexOf("Win")>=0){computer="PC";}
if(version.indexOf("MSIE")>=0){browser="Explorer";}
if(browser=="Explorer"){
i=version.indexOf("MSIE");
version=version.substr(i+5,1);
}
if(computer == "PC" && browser == "Explorer" && version >= "4"){setActiveStyleSheet('ie');}
else if(browser == "Explorer" && version >= "4"){setActiveStyleSheet('mac');}
else{setActiveStyleSheet('normal');}


leftPos = 250;
topPos = 150;
if (screen) {
leftPos = (screen.width-440) / 2;
topPos = (screen.height-280) / 2;
}

function share(place){
	if (screen) {
		leftPos = (screen.width-600) / 2;
		topPos = (screen.height-400) / 2;
	}
	link = ("" + place);
	dest = '/share.php?ref=' + link ;
	newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=350,width=400,scrollbars=0,resizable=0");
	if(window.focus){newwin.focus();}
	return false;
}
function mail(place){
link = ("" + place);
dest = 'postpage.php?place=' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}
function mail2(place){
link = ("" + place);
dest = 'postactivitypage.php?place=' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}
function mail3(place){
link = ("" + place);
dest = 'postshoppage.php?place=' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}
function mail4(place){
link = ("" + place);
dest = 'postsportpage.php?place=' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}
function mail5(place){
link = ("" + place);
dest = 'posteventpage.php?place=' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}
function mailnew(place){
link = ("" + place);
dest = 'postpage2.php?' + link ;
newwin = window.open(dest,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=0,resizable=0")}

function go(linkname) { link = (""+linkname);
nik = 'offers/index.php?id=' + link;
//nik = 'offers/' + link + 'htm';
newwin = window.open(nik,"","left="+leftPos+",top="+topPos+",height=350,width=500,scrollbars=1,resizable=0");
}

function wpop(linkname) { link = (""+linkname); nik = 'rweather.php?id=' + link ;
newwin = window.open(nik,"","left="+leftPos+",top="+topPos+",height=300,width=440,scrollbars=1,resizable=0")}

function pop(){
myWindow=window.open("convertor.php", "myWindow", "width=600,height=200,status=no,scrollbars=no,resizable=no,toolbar=no,menubar=no,left=50,top=40");
myWindow.focus();
}

function doPopups() {
  if (!document.getElementsByTagName) return false;
  var links = document.getElementsByTagName("a");
  for (var i=0; i < links.length; i++) {
    if (links[i].className.match("newpage")) {
      links[i].onclick = function() {
        window.open(this.href);
        return false;
      }
    }
  }
}
window.onload=function(){
	doPopups();
	clock();
	if(document.getElementById("map")){mapLoad();}
	if(document.getElementById("filmbox")){
		var options = {
			script: "/findfilm.php?",
			varname: "film"
		};
		var as = new bsn.AutoSuggest('filmbox', options);
	}
	if(document.getElementById("townbox")){
		var options = {
			script: "findtown.php?",
			varname: "town"
		};
		var as = new bsn.AutoSuggest('townbox', options);
	}
}

var majors = new Array('ul_one', 'ul_two', 'ul_three', 'ul_four', 'ul_five', 'ul_six', 'ul_seven', 'ul_eight');
function toggle(a, b) {
	if (!document.getElementById) return true;
	if (b==1) for (var i=majors.length-1; i>=0; i--) if (majors[i] != a) document.getElementById(majors[i]).style.display='none';
	a=document.getElementById(a);
	a.style.display=(a.style.display=='block')?'none':'block';
	return false;
}

function Show_Stuff(Click_Menu){
	if (!document.getElementById) return true;
	a=document.getElementById(Click_Menu);
	a.style.display=(a.style.display=='block')?'none':'block';
	return false;
}