function popup_window( img ) {

    popup=window.open('Photo.php?img=' + img,'','width=479,height=343,top=0,left=0,toolbar=0,location=0,scrollbars=No,status=0,menubar=0,resizable=0,fullscreen=0');
    popup.focus();
    screen_height = screen.height;
	screen_width = screen.width;
	left_point = parseInt(screen_width/2)-(479/2);
	top_point = parseInt(screen_height/2)-(343/2);
	setTimeout('popup.moveTo(left_point,top_point)',100);
	void(0);

}

	var gMessage = "";
	// Validate the form data
	 function validate(f) {
	var result =  true;	// If result is true, form will be submitted at end of this function
	var e = f.elements;
	var name = "";

	for( var i=0; i < e.length; i++ ) {	// Loop thru each form element
		name =  e[i].name;

		// List each required field
		if( name == "FirstName" ||
			name == "LastName" ||
			name == "Phone" ||
			name == "Country" ||
			name == "Email" ) {

			if( e[i].name == "Email") {
				if( doError(checkEmail(e[i]), e[i]) ) result = false;
			}
			else if ( e[i].name == "Country") {

				if( doError(checkCountry(e[i]), e[i]) ) result = false;

			}
			else {
				if( doError(e[i].value.length, e[i]) ) result = false;
			}

			} // end if required
	} // end for loop

	if( !result )
		alert("The required information is incomplete or contains errors. Please fill in the following  field(s) to continue." + "\n" + gMessage);

	gMessage = "";
/*** START SPECIAL OMNITURE CODE ***/
if(result==true){
s_linkType='o';
s_linkName='Contact Me Button-Hancock';
s_linkTrackVars='events,products,eVar20';
s_linkTrackEvents='event8';
s_events='event8';
s_products='Contact Me;Hancock-Contact Me-'+document.referrer;
s_eVar20='Hancock-Contact Me';
s_lnk=s_co(this);
s_gs(s_account);
				}
/*** END SPECIAL OMNITURE CODE ***/
	return(result);
	 }

function doError(ok, item) {
	var name = item.id;
	if( !ok ) {
		gMessage += "* " + name + "\n";
	}
	return( !ok );
}
function checkEmail(item) {
	var str = item.value;
	if( window.RegExp ) {
		var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
    	var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$";
    	var reg1 = new RegExp(reg1str);
    	var reg2 = new RegExp(reg2str);
    	if( !reg1.test(str) && reg2.test(str) ) {
      		return true;
    	}
		return false;
	}
	else {
		if( str.indexOf("@") >= 0 )
			return true;
    return false;
	}
}
function checkCountry(item) {

	if( item.selectedIndex == 0) {

    	return false;

	}
	else {

    	return true;

	}
}