current_show = 0;
function build(){
	var num = new Array(4,2,0,0)
	var str, step,step1, tmp;
	str = "";
	var line_height="3"
	for(var i=0;i<4;i++){
	
		if(i<record_info.length){
			step = num[i];
			step1 = 2;
			if(record_info[i][2]!=""){
				tmp = record_info[i][2].substr(record_info[i][2].lastIndexOf("/"))
				if(i!=0) str = str+'<table width="100%"><tr><td height="1" bgcolor="#999999"></td></tr><tr><td height="3"></td></tr></table>'
				str	= str+'<span style="width:100%;"><a href="news.asp?id='+record_info[i][0]+'" style="color:#0000FF;" title="'+record_info[i][3]+'"><img src="../../admin/english/images'+tmp+'" border="0" width="37" height="45" align="left" >'+max_str(record_info[i][3],48)+'</a></span><br><img src="img/blank.gif" height="'+line_height+'" width="100"><br>';
				step = step-1;
				step1 = 4
			}

			for(var ii=0;ii<step;ii++){

				str = str+'<a href="../'+record_info[i][ii*3+step1]+'" title="'+record_info[i][ii*3+step1+1]+'" target="_blank"><strong>&middot;</strong> '+max_str(record_info[i][ii*3+step1+1],30)+'</a> ('+record_info[i][ii*3+step1+2]+')<br><img src="img/blank.gif" height="'+line_height+'" width="100"><br>'
			}	
		}
	
	}	
	
table1.rows[1].cells[0].innerHTML = str;
}

function build1(){
	var obj,cell,row;
	var height = 260
	var line_height = 36
	var num = Math.ceil((260-35*record_info.length-16)/line_height)
	for(var i=0;i<4;i++){

		if(i<record_info.length){
			obj = table1.rows[i*2+1].cells[0].firstChild;
			table1.rows[i*2].cells[0].innerHTML = '<a onMouseOver="shows('+i+')" href="news.asp?id='+record_info[i][0]+'" style="font-weight:bolder;text-decoration:none;">'+record_info[i][1].substr(1)+'</a>';
			step = 2
			if(record_info[i][2]!=""){
				row = obj.insertRow(1);
				cells = row.insertCell();
				cells.style.paddingLeft = "20px"
				cells.height = line_height;
				tmp = record_info[i][2].substr(record_info[i][2].lastIndexOf("/"))

				cells.innerHTML = '<img src="../../admin/english/images'+tmp+'" width="37" height="45" align="left">'+max_str(record_info[i][3],24);
				num = num-1
				step = 4
			}
			for(var ii=0;ii<num;ii++){	
					row = obj.insertRow(obj.rows.length-1);
					cells = row.insertCell();
					cells.style.paddingLeft = "15px"
					cells.style.paddingRight = "10px"
					cells.height = line_height;

					if(ii<(record_info[i].length-step)/2) cells.innerHTML = '<a href="../'+record_info[i][ii*2+step]+'" title="'+record_info[i][ii*2+step+1]+'" target="_blank"><strong>&middot;</strong> '+max_str(record_info[i][ii*2+step+1],40)+'</a>'; else cells.innerHTML = '&nbsp;';
				
			}
			if(i!=0){
				table1.rows[i*2+1].style.display = "none";
			}
		}else{
			table1.rows[i*2].style.display = "none";
			table1.rows[i*2+1].style.display = "none";
		}
		
				
	}
}
function max_str(str,max_num)
{
	var str1='';
	var patrn=/([\x00-\x7F]|[\x80-\xFE][\x40-\x7E\x80-\xFE])/;
	var len=0;
	for(var i=0;i<str.length;i++){
		if(patrn.test(str.charAt(i))) len=len+1; else len=len+2;
		if(len <= max_num) str1 = str1+str.charAt(i); else {
			str1 = str1+'...';
			i = str.length;
		}
	}
	return str1
}

function shows(index){
	table1.rows[current_show*2+1].style.display	= "none";
	current_show = index;
	table1.rows[current_show*2+1].style.display	= "block";
}