//	0	1	2									  3					   4							 5						6					  7		8		
//["10","4","INFORMACIÓN TÉCNICA COMPLEMENTARIA","Planchas Onduladas","Planchas Onduladas en CAD","Dibujos de planchas onduladas en AutoCad","onduladas.zip","","204547"],	
javaBrs = /\n/gi;
function showDocs(idcat,stitFlag){
	if (idcat==null){idcat=0;}
	var cCat="";
	var cTitle="";
	var csTitle="";
	var html="";
	for(var i=0;i<docs.length;i++){
		if((docs[i][1]==idcat)||(idcat==0)){
			
		
			if(cTitle!=docs[i][2]){
				cTitle=docs[i][2];
				html+="<div class=titulobig>"+cTitle+"</div>";
			}
			if(csTitle!=docs[i][3]){
				csTitle=docs[i][3];
				html+="<div class=titulobig style=\"margin-left:30px;\">"+csTitle+"</div>";
				flag=true;
			}
			html+="<table width=550 cellpadding=0 cellspacing=0 border=0 style=\"table-layout:fixed;margin-left:30px;margin-bottom:5px;\">";
			html+="<col width=450><col width=70><col width=30>"				
			html+="<tr>";
			html+="<td class=\"textogeneral\" style=\"border-bottom:solid 1px dotted;\" height=20>";
			html+="&nbsp;&nbsp;•&nbsp;&nbsp;<span class=titulodoc>"+docs[i][4]+"</span>";
			if((docs[i][5]!="")&&(stitFlag!=null)){html+="<div style=\"margin-left:22px;padding-right:20px;\">"+docs[i][5].toString().replace(javaBrs,"<br>")+"</div>\n";}
			html+="</td>";
			html+="<td align=center valign=top>";
			if (docs[i][6]!=""){
				html+="<a title=\"pulse aquí para descargar el documento:"+docs[i][6]+"\"href=\"/store/documentos/"+docs[i][0]+"/"+docs[i][6]+"\" target=\"_blank\">"+getFile(docs[i][6])+"</a>";
				html+="<br>("+docs[i][8]+" kb.)";
			}	
			html+="</td>";
			html+="<td align=center valign=top></td>";
			html+="</tr>"
			html+="</table>";
		}		
	}
	document.write(html);html=null;
}
function getFile(dato){
	if(dato==null){return "";}
	if (dato.substring(dato.lastIndexOf(".")+1,dato.length)!=""){
		return ("<img border=0 src=\"/store/iconos/"+dato.substring(dato.lastIndexOf(".")+1,dato.length)+".gif\">");
	}
	return "";
	
}
function openBook(url){
	window.open (url,"","status=0,toolbar=0,resizable=1,scrollbars=1,width=650,height=400"); 
}