window.onload = resize_short_description;
window.onresize = resize_short_description;
function resize_short_description() {
	var short_desc_locators = document.getElementsByName('short_desc_locator');
	if (short_desc_locators) {
		for (i = 0; i < short_desc_locators.length; i++) {
			id = short_desc_locators[i].id.replace('short_desc_locator_', ''); //get numeric id for locating other elements
			w = document.getElementById('short_desc_container_'+id).clientWidth;
			logo = document.getElementById('listing_logo_'+id);
			if (logo) {
				logo_w = logo.clientWidth;
				if (w - logo_w < 190) { //not enough space for text on the right of a logo
					logo.style.display = 'block';
					logo.style.cssFloat = 'none'; //standards
					logo.style.styleFloat = 'none'; //for ie
				}
				else {
					logo.style.display = 'inline';
					logo.style.cssFloat = 'left'; //standards
					logo.style.styleFloat = 'left'; //for ie
				}
				//alert(w); //test
				//alert(logo_w); //test
			}
		}
	}
}