var b=new Array(
	'menu',
	'live',
	'patio',
	'specials',
	'gallery',
	'tour',
	'merchandise',
	'groups',
	'links',
	'hours',
	'contact',
	'lobsterfest'
		

);

for(x=0;x<b.length;x++) {
	eval(b[x]+"_off=new Image();");
	eval(b[x]+"_off.src=\"images/b"+b[x]+"0.gif\";");
	eval(b[x]+"_on=new Image();");
	eval(b[x]+"_on.src=\"images/b"+b[x]+"1.gif\";");
}

function button_on ( imgName ) {
	butOn = eval ( imgName + "_on.src" );
	document [imgName].src = butOn;
}

function button_off ( imgName ) {
	butOff = eval ( imgName + "_off.src" );
	document [imgName].src = butOff;
}


function checkform ( application )
{

   		if (application.name.value == "") {
        alert( "Please enter your name." );
        application.name.focus();
        return false ;
    }
    	if (application.address.value == "") {
        alert( "Please enter your address." );
        contact.lastname.focus();
        return false ;
    }
	    if (application.email.value == "") {
        alert( "Please enter your email address." );
        application.email.focus();
        return false ;
    }
	    if (application.hphone.value == "") {
        alert( "Please enter your home phone number." );
        application.phone.focus();
        return false ;
    }
		if (application.category.value == "") {
        alert( "Please choose a membership category." );
        application.category.focus();
        return false ;
    }
	    if (application.address.value == "") {
        alert( "Please enter your address." );
        application.address.focus();
        return false ;
    }
		if (application.supply.value == "") {
        alert( "Please enter your email address." );
        application.supply.focus();
        return false ;
    }
	    if (application.profile.value == "") {
        alert( "Please tell us a bit about yourself!" );
        application.profile.focus();
        return false ;
    }
		
	return true ;
}



var imagenumber = 9 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/home/p_1.jpg"
images[2] = "images/home/p_2.jpg"
images[3] = "images/home/p_3.jpg"
images[4] = "images/home/p_4.jpg"
images[5] = "images/home/p_5.jpg"
images[6] = "images/home/p_6.jpg"
images[7] = "images/home/p_7.jpg"
images[8] = "images/home/p_8.jpg"
images[9] = "images/home/p_9.jpg"
var image = images[rand1]

var imagenumber = 9 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/home_small/p_1.jpg"
images[2] = "images/home_small/p_2.jpg"
images[3] = "images/home_small/p_3.jpg"
images[4] = "images/home_small/p_4.jpg"
images[5] = "images/home_small/p_5.jpg"
images[6] = "images/home_small/p_6.jpg"
images[7] = "images/home_small/p_7.jpg"
images[8] = "images/home_small/p_8.jpg"
images[9] = "images/home_small/p_9.jpg"
var imageb = images[rand1]

var imagenumber = 9 ;
var randomnumber = Math.random() ;
var rand1 = Math.round( (imagenumber-1) * randomnumber) + 1 ;
images = new Array
images[1] = "images/home_small/p_1.jpg"
images[2] = "images/home_small/p_2.jpg"
images[3] = "images/home_small/p_3.jpg"
images[4] = "images/home_small/p_4.jpg"
images[5] = "images/home_small/p_5.jpg"
images[6] = "images/home_small/p_6.jpg"
images[7] = "images/home_small/p_7.jpg"
images[8] = "images/home_small/p_8.jpg"
images[9] = "images/home_small/p_9.jpg"
var imagec = images[rand1]

var WinNum=0;

function WindowOpen(Url,x,y)

{

var String;

String = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=2,resizable=0,copyhistory=0,";

String += ",width=";

String += x;

String += ",height=";

String += y;



WinPic=window.open(Url,WinNum++,String);

}
