function setToSubscribe()
{
   document.subscribeform.action = "http://www.gilimbaa.com.au/mailinglist/?p=subscribe&id=2";
   return true;
}

function field_blank()
{
document.subscribeform.email.value ="";
}

function field_blank1()
{
document.subscribeform.name.value ="";
}


function rsvp_blank()
{
document.rsvpform.name.value ="";
}


function rsvp_blank2()
{
document.rsvpform.email.value ="";
}


function rsvp_blank3()
{
document.rsvpform.phone.value ="";
}

function rsvp_blank4()
{
document.rsvpform.guests.value ="";
}

var fieldstocheck = new Array();
fieldnames = new Array();
function checkform() {
	for (i=0;i<fieldstocheck.length;i++) {
	if (eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].value") == "") {
	alert("Please enter your "+fieldnames[i]);
	eval("document.subscribeform.elements['"+fieldstocheck[i]+"'].focus()");
	return false;
	}
}
return true;
}
function addFieldToCheck(value,name) {
	fieldstocheck[fieldstocheck.length] = value;
	fieldnames[fieldnames.length] = name;
} 

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
