var saveWidth = 0;

function scaleImg(what)
{
	what = document.getElementById(what);
	if (navigator.appName=="Netscape")
	{
		winW = window.innerWidth;
		curt = "-moz-zoom-in";
	}
	else
	{
		winW = document.body.offsetWidth;
		curt = "col-resize";
	}
	
	if(window.screen.width)
	{
		if(winW > window.screen.width)
			winW = window.screen.width;
	}
	
	if(app_small_screen == 'no')
	{
		pw = winW - 220;
	}
	else
	{
		pw = winW - 27;
	}
	
	if (what.width>pw || saveWidth>pw)
	{
		if (what.width==(pw))
		{
			what.width=saveWidth;
		}
		else
		{
			saveWidth = what.width;
			what.style.cursor = curt;
			
			if(app_small_screen == 'no')
			{
				if(pw < 277)
				{
					what.width=277;
				}
				else
				{
					what.width=(pw);
				}
			}
			else
			{
				what.width=(pw);
			}
			
		}
	}
}
