YAHOO.namespace('disp');
YAHOO.disp.pullDown = function( type ) {
if(document.getElementById(type + "_list").style.display == "none")
{
document.getElementById(type + "_list").style.display = "block";
document.getElementById("more_" + type).style.display = "none";
}
}
YAHOO.disp.getEmbed = function(url,x,y)
{
var str = "";
var image_tag = '<img src="' + url + '" width="' + y + '" height="' + x + '">';
var y_blog_tag = '[[img(' + url + ',' + y + ',' + x + ')]]';
var wiki_url = global_helpurl['wiki'];
var blog_url = global_helpurl['blog'];
str += '<div class="jsAttach moduleTypeJ">';
str += '<div class="jsTitle">';
str += '<strong>ブログやホームページにはろう！</strong>';
str += '</div>';
str += '<div class="containerMain">';
str += '<dl class="normal">';
str += '<dt>';
str += '<span class="square">■</span>はり付け用URL';
str += '</dt>';
str += '<dd>';
str += '<span class="item">写真サイズ：</span><span class="data">幅' + y + 'px×縦' + x + 'px</span>';
str += '</dd>';
str += '<dd>';
str += '※Yahoo!ブログには対応していません。';
str += '</dd>';
str += '<dd>';
str += '<input type="text" name="" value=\'' + image_tag + '\' size="30" class="inputTextAttach" onclick="this.focus();this.select();">';
str += '</dd>';
str += '</dl>';
str += '<dl class="blog">';
str += '<dt>';
str += '<span class="square">■</span>Yahoo!ブログ対応URL';
str += '</dt>';
str += '<dd>';
str += '<span class="item">写真サイズ：</span><span class="data">幅' + y + 'px×縦' + x + 'px</span>';
str += '</dd>';
str += '<dd>';
str += 'Wiki文法で投稿してください。';
str += '</dd>';
str += '<dd class="helpLink">';
str += '<a href="' + wiki_url + '" target="new"><img src="http://i.yimg.jp/images/common/helpicon.gif" alt="ヘルプ" width="13" height="15" class="helpIcon">Wiki文法について</a><br>';
str += '<a href="' + blog_url + '" target="new"><img src="http://i.yimg.jp/images/common/helpicon.gif" alt="ヘルプ" width="13" height="15" class="helpIcon">Yahoo!ブログの推奨環境</a>';
str += '</dd>';
str += '<input type="text" name="" value="' + y_blog_tag + '" size="30" class="inputTextAttach" onclick="this.focus();this.select();">';
str += '</dd>';
str += '</dl>';
str += '</div>';
str += "<div class=\"closeWindow\"><a href=\"#\" onclick=\"document.getElementById('embed').style.display = 'none';return false;\"><img src=\"http://i.yimg.jp/images/socialproducts/album/jsCloseBtn_61x19.gif\" alt=\"閉じる\" width=\"61\" height=\"19\"></a></div>";
str += '</div>';
var div = document.createElement("div");
div.innerHTML = str;
div.id = "embed";
div.style.position = "absolute";
div.style.overflow = "visible";
div.style.display = "block";
div.style.backgroundColor = "#ffffff";
return div;
}
YAHOO.disp.showEmbed = function(url, x, y)
{
var emb = document.getElementById("embed");
var objBody = document.getElementById("stick");
var embed = YAHOO.disp.getEmbed ( url, x, y );
if(emb)
{
if(emb.style.display == "block")
{
emb.style.display = "none";
return;
}
else
{
emb.style.display = "block";
return;
}
}
objBody.appendChild(embed);
}
YAHOO.disp.showDoneMessage = function(id, message, column)
{
var top = '';
var bottom = '';
if(column == 'left'){
top = 'roundCorner634Top';
bottom = 'roundCorner634Bottom';
} else {
top = 'roundCorner716Top';
bottom = 'roundCorner716Bottom';
}
var str = '<div class="' + top + '">';
str += '<span class="message">'+message+'</span>';
str += '</div>';
str += '<div class="' + bottom + '"></div>';
var obj = document.getElementById("topDoneMessage");
if ( obj ){
div = obj;
} else {
var div = document.createElement("div");
div.className = "doneMessage";
div.id = "topDoneMessage";
var subObj = document.getElementById(id);
subObj.insertBefore(div, subObj.firstChild);
}
div.innerHTML = str;
}
YAHOO.disp.setCripBord = function(txt)
{
if(navigator.appName.indexOf("Microsoft Internet Explorer") > -1){
window.clipboardData.setData("text",txt);
}
}

