function getExtImg(ext) {
switch(ext) {
case "doc": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_word_s.gif";
case "xls": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_xls_s.gif";
case "ppt": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_ppt_s.gif";
case "pdf": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_pdf_s.gif";
case "txt": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_txt_s.gif";
case "hwp": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_hwp_s.gif";
case "jpg": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_jpg_s.gif";
case "gif": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_gif_s.gif";
case "png": case "bmp": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_png_s.gif";
case "zip": case "alz": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_zip_s.gif";
case "mp3": case "wav": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_mp3_s.gif";
case "avi": case "mpeg": case "wmv": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_movie_s.gif";
case "swf": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_swf_s.gif";
case "html": return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_html_s.gif";
default: return "http://cafeimg.daum-img.net/cf_img2/bbs2/p_etc_s.gif";
}
}
function setFileTypeImg(filename, idx) {
var firstpos = filename.lastIndexOf('.')
var ext = '';