function preloadImages() {
	var d=document;
	if (d.images) {
		if (!d.preimages) d.preimages = new Array();
		var i, a=preloadImages.arguments;
  
		for(i=0; i<a.length; i++) {
			d.preimages[i]=new Image;
			d.preimages[i].src=a[i];
		}
	}
}

function findObject(name) {
	var x;
	x=document.getElementById(name);
	return x;
}

function swapImage() {
	//arguments in format: name, location
	var x, a=swapImage.arguments;
	document.swappedimage = new Array;
	for(i=0; i<a.length; i+=2) {
		if ((x=findObject(a[i]))!=null) {
			if (!x.oSrc) x.oSrc=x.src;
			x.src = a[i+1];
			document.swappedimage[i]=x;
		}
	}
}

function restoreImage() {
	var x, a=document.swappedimage;
	for (i=0; i<a.length; i+=2) {
		x=a[i];
		x.src=x.oSrc;
	}
}

var popwindow = ''
function imagepop(url) {
	if (popwindow.location && !popwindow.closed) {
		popwindow.location.href = url;
		popwindow.focus();
	} else {
		popwindow=window.open(url,'hbdesignimage','width=420,height=320,resizable=0,status=0,menubar=0,scrollbars=0,toolbar=0');
		popwindow.moveTo(150,150);
	}
}

function closepops() {
	if (popwindow.location && !popwindow.closed) popwindow.close();
}