function showwidth () {
	widthValue=document.documentElement.clientWidth;
	//document.clock.thetime.value = widthValue;
	//显示宽度注释document.clock.thetime.value = widthValue;
	timerID = setTimeout("showwidth()",400);
	
	if (widthValue<=1120)
	{
		contents = getElementsByClass(document,'index_goods','div');
		for( i = 0 ; i < contents.length ; i++ ){
			contents[i].style.width = '31%';
		}
	}
	else if (widthValue>1120 && widthValue<=1269)
	{
		contents = getElementsByClass(document,'index_goods','div');
		for( i = 0 ; i < contents.length ; i++ ){
			contents[i].style.width = '23%';
		}
	}
	else if (widthValue>1269)
	{
		contents = getElementsByClass(document,'index_goods','div');
		for( i = 0 ; i < contents.length ; i++ ){
			contents[i].style.width = '18%';
		}
	}
	var the_best=document.getElementById("ISL_Cont_1");
	the_best.style.width=widthValue-300+"px";
}


function getElementsByClass(rootNode,classToSearch,tagName) {
    var elementsToReturn = new Array();

    var elementList = rootNode.getElementsByTagName(tagName);
    var nLen = elementList.length;

    var pattern = new RegExp("\\b"+classToSearch+"\\b");

    for(var i = 0; i < nLen; i++){
        if( pattern.test(elementList[i].className) ){
            elementsToReturn[elementsToReturn.length] = elementList[i];
        }
    }
    return elementsToReturn;
}
