// JavaScript Document
function fixImgs(whichId, maxW, tableW) {
	var images=document.getElementById(whichId).getElementsByTagName('img');
	for (i=0; i<images.length; i++) {
		if(images[i].parentElement.tagName.toLowerCase() == 'td') {
			targMax = tableW;
		} else {
			targMax = maxW;
		}
		w=images[i].width;
		h=images[i].height;
		if (w > targMax) {
			f=1-((w - targMax) / w);
			images[i].width=w * f;
			images[i].height=h * f;
			images[i].style.width= (w * f).toString() + 'px';
			images[i].style.height= (h * f).toString() + 'px';
		}		
	}
}
function ImageFixonLoad() {
	try {
		fixImgs('article_text','320','180');
	} catch(E) {;}
}
if(window.addEventListener)
	window.addEventListener("load", ImageFixonLoad, false);
else if(window.attachEvent)
	window.attachEvent("onload", ImageFixonLoad);
else if(document.getElementById)
	window.onload=ImageFixonLoad;