function borderit(which,color){
//if IE 4+ or NS 6+

if (document.all||document.getElementById){
which.style.borderBottomColor=color
which.style.borderTopColor=color
which.style.borderLeftColor=color
which.style.borderRightColor=color
}
}

function newImage(arg) {
 if (arg = '') {alert('Newimage called without argument');}
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}
function findElement(n,ly) {
	d = document;
	if (browserVers < 4)		return d[n];
	if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 
	var cd = ly ? ly.document : d;
	var elem = cd[n];
	if (!elem) {
		for (var i=0;i<cd.layers.length;i++) {
			elem = findElement(n,cd.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}
function changeImages() {
	d = document;
	if (d.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (d.layers) {img = findElement(changeImages.arguments[i],0);}
			else {img = d.images[changeImages.arguments[i]];}
			if (img) {img.src = changeImages.arguments[i+1];}
		}
	}
}




var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		over_gobutton = newImage(/*URL*/'/media/gobutton_over.jpg');
		over_doorhandles = newImage(/*URL*/'/media/doorhandles_over.gif');
		over_doorknobs = newImage(/*URL*/'/media/doorknobs_over.gif');
		over_doorfurn = newImage(/*URL*/'/media/doorfurn_over.gif');
		over_cupboard = newImage(/*URL*/'/media/cupboard_over.gif');
		over_windowfurn = newImage(/*URL*/'/media/windowfurn_over.gif');
		over_hinges = newImage(/*URL*/'/media/hinges_over.gif');
		over_locks = newImage(/*URL*/'/media/locks_over.gif');
		over_blackantique = newImage(/*URL*/'/media/blackantique_over.gif');
		over_accessories = newImage(/*URL*/'/media/accessories_over.gif');
		over_seebigger = newImage(/*URL*/'/media/seebigger_over.gif');
		preloadFlag = true;
	}
}

function submitsort()
	{
		//alert('action '+document.sortform.action);
		//alert('ecode val '+document.sortform.ecode.value);
		theactval = document.sortform.sortlist.options[ document.sortform.sortlist.selectedIndex].value;
		thecode=document.sortform.ecode.value;
		theetype=document.sortform.etype.value;
		thepg=document.sortform.efile.value;
		thestr=document.sortform.searchkeys.value;
		theact=document.sortform.action;
		theact=theact+'?efile='+thepg+'&sortact='+theactval+'&pgecode='+thecode+'&searchkeys='+thestr+'&pgtype='+theetype;
		//alert('the act '+theact);
		//alert('value  '+document.sortform.sortlist.options[document.sortform.sortlist.selectedIndex].value);
		document.sortform.action=theact;
		//alert('action '+document.sortform.action);
		//document.sortform.submit();
		document.location.href=theact;
	}