self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)

var w = screen.availWidth;
var h = screen.availHeight;
var size;
var found;
if (w > 760) {
	size = 1;
	var check = location.href;
	if (!check.match(/large/)) {
		if (!location.href.match(/\?/)) {
			location.href = location.href + '?size=large';
		} else {
			location.href = location.href + '&size=large';
		}
	}
} else {
	size = 0;
}

function swap(my_image) {
	var but_id = "button_" + my_image;
	var new_button = "button_" + my_image + "_on.gif";
	if (size == 1) {
		document.images[my_image].src = 'images/large/menu_' + my_image + '.jpg'
		document.images[but_id].src = 'images/large/' + new_button;
	} else {
		document.images[my_image].src = 'images/small/menu_' + my_image + '.jpg'
		document.images[but_id].src = 'images/small/' + new_button;
	}	
}

function swap_back(my_image) {
	var but_id = "button_" + my_image;
	var old_button = "button_" + my_image + "_off.gif";
	if (size == 1) {
		document.images[my_image].src = 'images/large/menu_empty.jpg'
		document.images[but_id].src = 'images/large/' + old_button;
	} else {
		document.images[my_image].src = 'images/small/menu_empty.jpg'
		document.images[but_id].src = 'images/small/' + old_button;
	}
}

<!-- images -->

menu_location= new Image(50,50); 
menu_location.src="images/menu_location.jpg";

menu_events= new Image(50,50); 
menu_events.src="images/menu_events.jpg";

menu_gallery= new Image(50,50); 
menu_gallery.src="images/menu_gallery.jpg";

menu_menu= new Image(50,50); 
menu_menu.src="images/menu_menu.jpg";

menu_booking= new Image(50,50); 
menu_booking.src="images/menu_booking.jpg";

menu_links= new Image(50,50); 
menu_links.src="images/menu_links.jpg";

<!-- buttons -->

button_location_on= new Image(50,25); 
button_location_on.src="images/button_location_on.gif";

button_events_on= new Image(50,25); 
button_events_on.src="images/button_events_on.gif";

button_gallery_on= new Image(50,25); 
button_gallery_on.src="images/button_gallery_on.gif";

button_menu_on= new Image(50,25); 
button_menu_on="images/button_menu_on.gif";

button_booking_on= new Image(50,25); 
button_booking_on.src="images/button_booking_on.gif";

button_links_on= new Image(50,25); 
button_links_on.src="images/button_links_on.gif";