if (document.images){
	var images3 = new Array(2);
		for(var z=0; z<2; z++){
			images3[z] = new Image();
		}	
		
	images3[0].src = 'images/lblView.gif';
	images3[1].src = 'images/lblView2.gif';
}

function BiteMe(v,nm){
		if(document.images) {
			eval ('document.' + nm + '.src = images3[' + v + '].src');
		}
	}
	

var beendone=false;
var httpFocus=false;
function sendMsg(sometext){
	if (beendone==false){
		alert(sometext);
		beendone=true;
	}
}	

function setHttp(){
	if (httpFocus==false){
		self.document.forms[0].visitorURL.value="http\:\/\/";
		httpFocus = true;
	}
}


function verifyForm(){
	var Arnaud = document.guestSign.visitorName.value;
	Arnaud = Arnaud.toLowerCase();
	//if ((Arnaud.indexOf('martin')!=-1) && (Arnaud.indexOf('guerre'))!=-1){
		//alert('The imposter is here!\n\nThought you\'d try to be a smart aleck, eh?');
		//return false;
		//}
	//else 
	if ((Arnaud =="") || (Arnaud == null)){
		var needName= "\"Who knows who you know\n and who knows if it\'s you...\"";
		needName += "\n\t\t-Benoit"
		needName += "\n\n\(A name is required, if you please\)"
		alert(needName);
		return false;
		}
	else if (document.guestSign.comments.value=="")  {
		alert('You need to sign!\n\nTo finish your entry,\nTo add some comments-\nAt least fill a line. \:\)\n');
		return false;
	}
	else {
		return true;
	}
}
function previewEntry(){
	if (verifyForm() == true) {
	newURL = 'guestpreview.asp?visitorName=' + self.document.forms[0].visitorName.value;
	newURL += '&visitorEmail=' + self.document.forms[0].visitorEmail.value;
	newURL += '&visitorURL=' + self.document.forms[0].visitorURL.value;
	newURL += '&visitorLocation=' + self.document.forms[0].visitorLocation.value;
	newURL+= '&comments=' + self.document.forms[0].comments.value;
	newURL = newURL.replace(/ /g,'+')
	
	
	window.open(newURL, 'preview', 'width=620,height=230,scrollbars=yes,resizable=no');
	
	}
}

