// JavaScript Document
var homepos;

function initPage(y) {
	homepos=y;
	initCursor();
}

function initCursor() {
	moveMenuCursor(homepos);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function moveMenuCursor(y) {
	var obj=document.getElementById("selectCursor");
	obj.style.top=y+"px";
	obj.style.visibility="visible";
}

function showTestimonial(x) {
	window.frames["testimonialContent"].location="testimonial.php?testimonial=3";
}

function sendGOCARD(card) {
	window.open("send.php?card="+card,"send_gocard","scrollbars=yes,width=520,height=495");
}

function showVenue(venueid) {
	venuehl = document.getElementById('venue'+venueid);
	venuedetails = document.getElementById('venuedetail'+venueid);
	
	if( venuedetails.style.display=='none' ) {
		venuedetails.style.display = '';
		venuehl.innerHTML = '[-] '+venuehl.innerHTML.substring(4);
	} else {
		venuedetails.style.display = 'none';
		venuehl.innerHTML = '[+] '+venuehl.innerHTML.substring(4);
	}
}

function showDistrict(districtid) {
	districthl = document.getElementById(districtid);
	districtdetails = document.getElementById(districtid+'_detail');
	
	if( districtdetails.style.display=='none' ) {
		districtdetails.style.display = '';
		districthl.innerHTML = '[-] '+districthl.innerHTML.substring(4);
	} else {
		districtdetails.style.display = 'none';
		districthl.innerHTML = '[+] '+districthl.innerHTML.substring(4);
	}
}
