function generateAttachmentTable(){	doc = document.forms[0]	loc = location.href.toLowerCase().split(".nsf")[0] + ".nsf"	attachmentName = ""	arrAttachmentNames = doc.AttachmentNames.value.split("^~")	arrAttachmentSizes = doc.AttachmentSizes.value.split("^~")	arrNameAndSize =doc.NameAndSize.value.split("^~")	if(doc.AttachmentNames.value=="")	{		strHTML = "<table cellpadding=2px cellspacing=1px width=100%><tr><td class='tableHeading' width=100%>There are no attachments for this document</td></tr></table>"		document.getElementById("idAttachmentDisplay").innerHTML = strHTML 		return true		}	strTitle = ""	strClass = "tableHeading"	strHTML = "<div style='background-color:#A6C3E6'><table cellpadding=2px cellspacing=1px width=100%"	for(i=0;i<arrAttachmentNames.length;i++)	{	 	 arrname = arrNameAndSize[i].split(":");	 //alert("name=" + arrname[0])	 //	 alert("size=" + arrname[1])		//attachmentURL = loc + "/0/" + doc.DocID.value + "/$File/" + arrAttachmentNames[i] 		attachmentURL = loc + "/0/" + doc.DocID.value + "/$File/" + arrname[0] 		if(i%2==0)		{			strHTML+= "</tr><tr>"			if(strClass == "evenLine")			{				strClass = "oddLine"			}			else			{				strClass = "evenLine"			}		}		if (arrname[0].length > 30)		{			//attachmentName = arrAttachmentNames[i].substring(0,27) + "..." + arrAttachmentNames[i].substring(arrAttachmentNames[i].length-3,arrAttachmentNames[i].length) + " ("+parseInt((parseInt(arrAttachmentSizes[i]))/1024) + "Kb)"			attachmentName = arrname[0].substring(0,27) + "..." + arrname[0].substring(arrname[0].length-3,arrname[0].length) + " ("+parseInt((parseInt(arrname[1]))/1024) + "Kb)"			strTitle = arrname[0]		}		else		{			//attachmentName = 	arrAttachmentNames[i] + " ("+(parseInt(parseInt(arrAttachmentSizes[i])/1024)) + "Kb)"			attachmentName = 	arrname[0]+ " ("+(parseInt(parseInt(arrname[1])/1024)) + "Kb)"			strTitle = ""		}		strHTML+= "<td class='"+strClass+"' width=50% title='"+strTitle+"'><a href='"+attachmentURL+"' target=_blank>"+attachmentName+"</a></td>"	}	if(i%2!=0)	{		strHTML+= "<td class='"+strClass+"' width=50%>&nbsp;</td>"	}	strHTML+= "</tr></table></div>"	document.getElementById("idAttachmentDisplay").innerHTML = strHTML }