//returns the string containing the correct document object for the client's browser
	function Document(){
		if(!document.all) return 'document.';
		else return 'document.all.';
	}

//displays border around the thumbnails
	function SwapThumb(object, value){
		if(value){
			object.style.border = 'solid 1px #FFFFFF';
			object.style.margin = '0px';
		}
		else{
			object.style.border = 'none';
			object.style.margin = '1px';
		}
	}
	
//pops up the window with the large picture
	function ShowLarge(url, width, height){
		if(width == null) width = 200;
		if(height == null) height = 250;
		doc = '<html><head><title>Large picture<\/title><\/head><body marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\" leftmargin=\"0\"><img src=\"' + url + '\"><\/body><\/html>';
		nw = window.open('', 'nw', 'width=' + width + ',height=' + height + ',scrollbars=no, menubar=no, resizable=no, left=300, top=200');
		nw.document.write(doc);
	}
	
//preloads images for navigation
	function PreloadNav(){
		img = new Array('home', 'profile', 'profil', 'profilo', 'contactus', 'arm', 'back', 'chinese', 'coverup', 'foot', 'leg', 'misc' , 'tribal');
		swaps = new Array();
		for(i=0; i<img.length; i++){
			swaps[img[i]] = new Array();
			swaps[img[i]][0] = new Image(74, 24);
			swaps[img[i]][1] = new Image(74, 24);
			swaps[img[i]][0].src = '_images/nav_' + img[i] + '_out.gif';
			swaps[img[i]][1].src = '_images/nav_' + img[i] + '_on.gif';
		}
	}
	
//rollover effect for navigation
	function SwapNav(object, value){
		if(swaps){
			if(value) object.src = swaps[object.name][1].src;
			else object.src = swaps[object.name][0].src;
		}
	}
	
//displays the border around the pairs of thumbnails in the Coverup section
	function SwapCoverup(object, value){
		id = parseInt(object.id.substr(1, object.id.length));
		pair = (id % 2 > 0) ? eval(Document() + 't' + (id + 1)) : eval(Document() + 't' + (id - 1));
		if(value){
			object.style.border = 'solid 1px #FFFFFF';
			object.style.margin = '0px';
			pair.style.border = 'solid 1px #FFFFFF';
			pair.style.margin = '0px';
		}
		else{
			object.style.border = 'none';
			object.style.margin = '1px';
			pair.style.border = 'none';
			pair.style.margin = '1px';
		}
	}