function swapImage(imgTag, imgName)
{
	document.images[imgTag].src="images/header/"+imgName;
}


	function swapImageArt(imgTag, imgName)
{
	document.images[imgTag].src="images/header/"+imgName;
}

function popUpWindow(URL, width, height, wname) {
	//alert(wname);
	
	//if (!wname) {
		wname = "PopUpWindow";
	//}
	popwin = window.open(URL, wname, "'toolbar=no,location=no,directories=no,status=no,left=500,menubar=no,scrollbars=no,resizable=no,width=" + width +",height=" + height)
	popwin.opener = self
	popwin.focus()
}

function popFullScreen(URL) {
	//alert(wname);
	
	//if (!wname) {
		wname = "PopUpWindow";
	//}
	window.open(URL, "_blank", "fullscreen=yes"); 
	popwin.opener = self
	popwin.focus()
}

function popUpWindowResize(URL, width, height, name) {
	if (!name) {
		name = "PopUpWindow";
	}
	popwin = window.open(URL, name, "'toolbar=no,location=no,directories=no,status=no,left=500,menubar=no,scrollbars=yes,resizable=yes,width=" + width +",height=" + height)
	popwin.opener = self;
	popwin.focus();
}

function returnSeparateDate(ddMMyyyy,frmName,fldYear,fldMonth,fldDay)
{
	var dd = ddMMyyyy.substring(0,2)
	var mm = ddMMyyyy.substring(2,4)
	var yy = ddMMyyyy.substring(4,8)
	var fldYY = eval("window.opener.document." + frmName + "."+ fldYear)
	var fldMM = eval("window.opener.document." + frmName + "."+ fldMonth)
	var fldDD = eval("window.opener.document." + frmName + "."+ fldDay)
	fldYY.value = parseInt(yy,10)
	fldMM.value = parseInt(mm,10)
	fldDD.value = parseInt(dd,10)
	window.close()
}	

function clearSearch(formField) {
	//  Only clear the field if it is equal to Site Search
	if (formField.value == "Site Search") {
		document.searchForm.searchString.value = "";
	}	
}

isLess = 1;
function showMore(rootClassID) {
	// provided with a root class for the More/Less pair
	var fullClassName = rootClassID + "More";
	var briefClassName = rootClassID + "Less";
	less = document.getElementById(briefClassName);
	more = document.getElementById(fullClassName);
	//alert(isBrief);
	if (isLess == 1) {
		// Hide the brief and show the full one
		less.style.visibility = "hidden";
		less.style.position = "absolute";
		more.style.visibility = "visible";
		more.style.position = "relative";
		isLess = 0;
	} else {
		// Hide the brief and show the full one
		less.style.visibility = "visible";
		less.style.position = "relative";
		more.style.visibility = "hidden";
		more.style.position = "absolute";
		isLess = 1;
	}
}


preloadFlag = 1;
function changeImages() {
	
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}



