/**
 * ROT13<br />
 * 
 * @param value ROT13の変換前文字列
 * @return ROT13にて変換した文字列
 */
String.prototype.rot13 = function(){ //v1.0
	return this.replace(/[a-zA-Z]/g, function(c) {
		return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
	});
};

/**
 * メールタグ作成<br />
 * 指定されたアカウントのメールアドレスを表示する<br />
 * 
 * @param account メールアカウント
 */
function writeMail(account) {
	document.write("<a href=\"javascript:sendMail('" + account + "')\">");
	document.write("<img src=\"../common/images/image.php?a=" + account + "\" alt=\"mail\">");
	document.write("</" + "a>");
}

/**
 * メール送信<br />
 * 指定されたアカウントのメールを作成する<br />
 * 
 * @param account メールアカウント
 */
function sendMail(account) {
	this.location.href = "mailto:" + account.rot13();
}

