// 投稿者名別アイコン表示
function getCommentNameImageTag(userName) {
// 投稿者名ごとの画像のURL定義
// ['(投稿者名)', '(画像のURL)']
var userImages = [
['ryoko', 'http://snow-bell.net/hl365/icon/cmnt001.gif'], 
['あやか', 'http://snow-bell.net/hl365/icon/cmnt003.gif'], 
['ユキナガ', 'http://snow-bell.net/hl365/icon/cmnt004.gif'], 
['投稿者名３', 'http://○○○.jugem.cc/?image=3']
];

// 上記投稿者名以外に表示する画像のURL
var otherImage = 'http://snow-bell.net/hl365/icon/cmnt002.gif';

// imgタグに指定する属性
// 例）var addAttribute = 'class="pict" alt="test"';
var addAttribute = '';

if ('' == userName) {
if ('' != otherImage) document.write('<img src="'+ otherImage +'" ' + addAttribute + ' />');
return;
}
if (userName.indexOf('</a>') > -1) {
var m = userName.match(/>.+<\/a>/);
if (null != m) userName = m[0].substr(1, m[0].length - 5);
}
for (var i = 0; i < userImages.length; i++) {
if (userImages[i][0] == userName) {
window.document.write('<img src="' + userImages[i][1] + '" ' + addAttribute + ' />');
return;
}
}
if ('' != otherImage) window.document.write('<img src="'+ otherImage +'" ' + addAttribute + ' />');
return;
}

