function locChange (loc) {

	location = loc;

}

function openWindow (loc) {
	window.open(loc);
}

function toggleLayer(whichLayer) {
	if (document.getElementById) {
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display == "block" ? "none" : "block";
	} else if (document.all) {
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display == "block" ? "none" : "block";
	} else if (document.layers) {
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display == "block" ? "none" : "block";
	}
}

function scaleImage(imageID) {
	
	var widthLimit = 160;
	var heightLimit = 100;
	
	var img = document.getElementById(imageID);
	
	var imgHeight = img.style.height;
	var imgWidth = img.style.height;
	
	var scaleFactor = imgWidth > imgHeight ? imgWidth/imgHeight : imgHeight/imgWidth;
	
	if (imgHeight > heightLimit || imgWidth > widthLimit) {
		imgHeight =  imgHeight/scaleFactor + "px";
		imgWidth =  imgWidth/scaleFactor + "px";
	}
}
