function $(element) 
{
	if (arguments.length > 1)
	{
		for (var i = 0, elements = [], length = arguments.length; i < length; i++)
		elements.push($(arguments[i]));
		return elements;
	}
	if (typeof element == 'string')
	{
		element = document.getElementById(element);
	}
	return element ;
}
function showHotArt(id)
{
	if(id == 1)
	{
		$('hotArtList1').style.display='';
		$('hotArtList2').style.display='none';
		$('hotArtList3').style.display='none';
		$('hotArt1').src='/images/sys/index/rightbutton_on1.gif';
		$('hotArt2').src='/images/sys/index/rightbutton_up2.gif';
		$('hotArt3').src='/images/sys/index/rightbutton_up3.gif';
	}
	else if(id == 2)
	{
		$('hotArtList1').style.display='none';
		$('hotArtList2').style.display='';
		$('hotArtList3').style.display='none';
		$('hotArt1').src='/images/sys/index/rightbutton_up1.gif';
		$('hotArt2').src='/images/sys/index/rightbutton_on2.gif';
		$('hotArt3').src='/images/sys/index/rightbutton_up3.gif';
	}
	else
	{
		$('hotArtList1').style.display='none';
		$('hotArtList2').style.display='none';
		$('hotArtList3').style.display='';
		$('hotArt1').src='/images/sys/index/rightbutton_up1.gif';
		$('hotArt2').src='/images/sys/index/rightbutton_up2.gif';
		$('hotArt3').src='/images/sys/index/rightbutton_on3.gif';
	}
}
function ajust_image(imageId, xLimit, yLimit)
{
	var image	=	new	Image();
	image.src = $(imageId).src;
	if ((xLimit > 0) && (yLimit > 0) &&
	(image.width > xLimit) && (image.height > yLimit)) 
	{
		$(imageId).width = (xLimit < image.width * (yLimit / image.height)) ?
		xLimit : (image.width * (yLimit / image.height));
		$(imageId).height = (yLimit < image.height * (xLimit / image.width)) ?
		yLimit : (image.height * (xLimit / image.width));
	}
	else if ((xLimit > 0) && (image.width > xLimit))
	{
		$(imageId).width = xLimit;
		$(imageId).height = image.height * (xLimit / image.width);
	}
	else if ((yLimit > 0) && (image.height > yLimit)) 
	{
		$(imageId).height = yLimit;
		$(imageId).width = image.width * (yLimit / image.height);
	}
	else {
		$(imageId).width = image.width;
		$(imageId).height = image.height;
	}
}
