//  Hide script from older browsers

 function addToFavorites(pgurl,pgname)
 {

  var urlAddress
  var pageName 

  if (pgurl) 
  {
  	urlAddress = pgurl;
  	pageName = pgname;
  } 
  else
  {
  	urlAddress = "http://www.archivillia.com";;
  	pageName = "Archivillia.com";;
  }

  if (window.external)
  {
   window.external.AddFavorite(urlAddress,pageName )
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }

function PopUpAndGotoForum()
{
//	window.open("http://www.archivillia.com/bulletinpopup.html","","status=no,height=230,width=450,scrollbars=no,resizable=no,copyhistory=no,top=0,left=0");
    window.location="http://archivillia.com/forum";
}

 function BulletinPopUp()
  {
	window.open("http://www.archivillia.com/bulletinpopup.html","","status=no,height=230,width=450,scrollbars=no,resizable=no,copyhistory=no,top=0,left=0")
  }
  

var refer=true;
function scriptcombo() {
if (refer) {
  document.all.contents.style.visibility="visible";
  refer=false;
}
else {
  document.all.contents.style.visibility="hidden";
  refer=true;
}
}


function FinalCheck(){
	//note: written by Barry Moore March 29/09 to stop a certain robot
	//a robot was posting - always the same thing: "Good Post, Admin"
	//this function will look for the word "Post" in the "likebest" text box
	//if "Post" is found in the likebest field, the form will not submit
	//alert('Final Check')

	//********** variables needed ***********
	var StopForm=0//form is okay, until proven otherwise


	//************** check the first email ***********
	var MyLikeBest=document.forms[0].likebest.value
	//alert('MyLikeBest='+MyLikeBest)


	var MyPlaceMark=MyLikeBest.indexOf('Good site, admin.')


	//alert('MyPlaceMark='+MyPlaceMark)


	if(MyPlaceMark==-1){
		StopForm=0
	}else{
		StopForm=1
	}



	//************** prevent form from submitting, if error found *************
	//alert('StopForm='+StopForm)
	
	StopForm=1//robots were getting thru anyway - this function now blocks ALL posts!
	if(StopForm==1){
		alert('No robots Please!')
		return false
	}else{
		//alert('form will submit')
		return true
	}

}

