

Boxs= new Array();
Boxs[0]='<a href="#"><img border=0 src="/images/rand_banner/1.gif"></a>';
Boxs[1]='<a href="#"><img border=0 src="/images/rand_banner/2.gif"></a>';
Boxs[2]='<a href="#"><img border=0 src="/images/rand_banner/3.gif"></a>';


countR=3;

function CS(row,direction){

document.write('<table width=100% style="border:1px solid #cccccc;" border="0" cellspacing="0" cellpadding="6"><tr>');

if(direction=='g'){ 
countOfArray=new Array();
widthTD=Math.floor(100/row);


 for(j=0;j<row;j++){
	
	document.write('<td class="text_main" width="'+widthTD+'%" align=left>');
	rand=Math.random()*Boxs.length;
	rand=Math.floor(rand);
	countOfArray[j]=Boxs[rand];	
	document.write(countOfArray[j]);
	Boxs.splice(rand,1);	
	document.write('</td>');
 }
}
 
if(direction=='v'){
countOfArray=new Array();

 for(i=0;i<row;i++){
	
	document.write('<td class="text_main"  align=left>');
	rand=Math.random()*Boxs.length;
	rand=Math.floor(rand);
	countOfArray[i]=Boxs[rand];	
	document.write(countOfArray[i]);
	Boxs.splice(rand,1);
	
      
	if(i!=row-1){
	
	document.write('</td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td  height="6"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC"><tr><td valign="top"></td></tr></table></td></tr></table>');
	document.write('</td></tr><tr>');
	} else {document.write('</td></tr>');}
	
 }
 
}
document.write('</tr></table>');
}

