function swapChart(img_loc, img_wid, img_hei) {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
 		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	var imgGroup = document.getElementById("chart").getElementsByTagName("img");
	for (var i=0; i<imgGroup.length; i++) {
		if (myWidth > 1120) {
//			window.alert( '(1120) Width = ' + myWidth );
			imgGroup[i].setAttribute("src", img_loc);
			imgGroup[i].setAttribute("width", img_wid);
			imgGroup[i].setAttribute("height", img_hei);
		}// else {
			//imgGroup[i].setAttribute("src", "http://www.mypricechart.com/images/charts/test2_small.png");
		//}
	}
}
function sameheight(cl){
	var className = '.' + cl;
	var maxHeight = -10;
	$$(className).each(function(sl){
		if(sl.offsetHeight > maxHeight){
			maxHeight = sl.offsetHeight;
		}
	});
	if($$('.extrapadding') != ''){
		$$('.extrapadding').each(function(sl){
			sl.setStyle('height', maxHeight - sl.getParent().offsetHeight + sl.offsetHeight);
		});
	}else{
		$$(className).each(function(sl){
			var curExtender = new Element('div',{'class': 'extrapadding'});
			curExtender.injectInside(sl);
			curExtender.setStyle('height', maxHeight - sl.offsetHeight);
		});
	}
}

