function popimg(elem) {
	var thisprevsrc = elem.src
	var folderpos = thisprevsrc.lastIndexOf("prev")
	var thisprevuri = thisprevsrc.substr(0,folderpos)
	var thisfullimg = thisprevuri + "full.jpg"
	var scrollbars = "no"
	var width = "400px"
	var height = "300px"
	var windowchrome = "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resize=yes"
	window.open(thisfullimg,'_blank',windowchrome)
}

function popwind(url) {
	var scrollbars = "no"
	var width = "600px"
	var height = "400px"
	var windowchrome = "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resize=yes"
	window.open(url,'_blank',windowchrome)
}

function flyout(prevelem,openpage) {
	var fullsuff = prevelem.src.substring((prevelem.src.lastIndexOf("/")+1),(prevelem.src.lastIndexOf(".")))
	var scrollbars = "no"
	var width = "600px"
	var height = "400px"
	var windowchrome = "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resize=yes"
	window.open('colorcharts/'+openpage+'?'+fullsuff,'_blank',windowchrome)
}

function highlight() {
	if (location.search != "") {
		var thisimg = location.search.substr(1)
		var thisobj = document.getElementById(thisimg)
		thisobj.style.borderColor = '#f90'
		thisobj.style.borderWidth = '2px'
		thisobj.style.width = '118px'
		thisobj.style.height = '18px'
		thisobj.style.backgroundPosition = '4px 5px'
	}
}

function showmore(linkobj,name) {
	var span = name + "span"
	var image = name + "img"
	var link = name + "link"
	if (linkobj.className == "morelink") {
		document.getElementById(span).className = "show"
		document.getElementById(image).className = "show"
		document.getElementById(link).className = "closelink"
	} else if (linkobj.className == "closelink") {
		document.getElementById(span).className = "hide"
		document.getElementById(image).className = "hide"
		document.getElementById(link).className = "morelink"
	}
}

function popgal(elem) {
	var thisprevsrc = elem.src
	var folderpos = thisprevsrc.lastIndexOf("prev")
	var thisprevuri = thisprevsrc.substr(0,folderpos)
	var thisfullimg = thisprevuri + "full.jpg"
	var scrollbars = "no"
	var width = thisfullimg.width
	var height = thisfullimg.height
	var windowchrome = "width=" + width + ",height=" + height + ",scrollbars=" + scrollbars + ",resize=yes"
	window.open(thisfullimg,'_blank',windowchrome)
}