function clearText(thefield)	{
	if (thefield.defaultValue == thefield.value)
		thefield.value = "";
}



// used on the category layout for thumbnail rollovers
function replaceContent(exstDiv, newDivContent)	{
	document.getElementById(exstDiv).innerHTML = document.getElementById(newDivContent).innerHTML;
	}


function openWindow(url,w,h) {
	adviceWin = window.open(url,'advice','status=no,width='+w+',height='+h+',menubar=no,scrollbars=yes');
	adviceWin.focus(true);
	}

function zoom (url) {
	z = window.open('','zoom_popUp','status=0,directories=0,toolbar=0,menubar=0,resizable=1,scrollbars=1,location=0');
	z.document.write('<html>\n<head>\n<title>Picture Zoom</title>\n</head>\n<body>\n<div align="center">\n<img src="' + url + '"><br>\n<form><input type="button" value="Close Window" onClick="self.close(true)"></form>\n</div>\n</body>\n</html>\n');
	z.document.close();
	z.focus(true);
	}
	
	
	
function PreselectMyItem(itemToSelect,formField)	{
	itemToSelect = itemToSelect.replace('%3A',':')
// Get a reference to the drop-down
	var myDropdownList = document.myfinder[formField];

// Loop through all the items
	for (iLoop = 0; iLoop< myDropdownList.options.length; iLoop++)	{    
		if (myDropdownList.options[iLoop].id == itemToSelect)	{
// Item is found. Set its selected property, and exit the loop
			myDropdownList.options[iLoop].selected = true;
			break;
			}
		}
	}
	
	
	
function adjustBodyHeight()	{
	var d = document.getElementById('bodyContent'); // Get div element
	var dh = d.offsetHeight; // div height
//	alert(dh);
	if(dh < 610)
		d.style.height = '610';
	}

