
function topnewsrc(){
var max=topnewidsrcarray.length;

var ar=new Array(max);

var j=0;
var i;
for(i=0;i<max;i++){
	ar[j]=i;
	j++;
}


var sorted = ar.sort( function(a, b){ return Math.random() - Math.random() } ); 

document.open();
document.write("<table width=\"200\" border=\"0\" cellpadding=\"4\" cellspacing=\"\">\n");
j=0;
var v;
var tmp;
var col=0;
for(i=0;i<max;i++){
	if(col==0){
		document.write("<tr>");
	}
	v=sorted[i];
	printitemsrc(v);
	j++;
	col++;
	if(col==2){
		document.write("</tr>");
		col=0;
	}
	if(j >=4){
		break;
	}

}

if(col){
	document.write("</td></tr>");
}

document.write("</table>\n");
document.close();

}

function printitemsrc(v){
var w;
var h;
var ra;

w=100;
h=100;



document.write("<td width=\"100\" valign=\"top\">");
document.write("<a href=\"search/search.cgi?mode=item&no="+topnewidsrcarray[v]+"\" title=\""+topnewshopsrcarray[v]+"\">");
document.write("<img src=\"upfile2/"+topnewimgsrcarray[v]+"\" width=\""+w+"\" height=\""+h+"\" border=0>");
document.write("<br>");
document.write("<font color=\"#5e005e\"><b>");
document.write(topnewshopsrcarray[v]);
document.write("</b></font>");
document.write("</a>");
document.write("</td>");

}


