function _o (a) {
return document.getElementById(a)
}
function clickCheckbox ( obj, target ) {
if ( obj.checked ) target.value = obj.value;
else target.value = "";
}
var move_x, move_y, temp_x, temp_y ;
function mouse_dragdrop() {
var obj = selectManager;
if(event.button == 1 && flag_drag == true) {
obj.style.pixelLeft = temp_x + event.clientX - move_x;
obj.style.pixelTop = temp_y + event.clientY - move_y;
//obj.style.pixelLeft = event.clientX - move_x;
//obj.style.pixelTop = event.clientY - move_y;
}
}
function mouse_drag() {
var obj = selectManager;//Picker;
temp_x = obj.style.pixelLeft;
temp_y = obj.style.pixelTop;
move_x = event.clientX;
move_y = event.clientY;
document.onmousemove = mouse_dragdrop;
flag_drag = true;
}
function mouse_up() {
flag_drag = false;
}
function showManager ( html ) {
var obj = _o("selectManager");
obj.style.top = document.body.scrollTop + 40;
obj.style.left = ( document.body.offsetWidth - parseInt(obj.style.width) ) / 2 ;
obj.style.display = "";
obj.innerHTML = html;
pageDisabled ( true );
}
function showFileManager (pagename,pagetitle,pHeight, f, t ) {
var newH = pHeight+100;
var html = "";
html += '
';
html += '';
html += ' | ';
html += ' | ';
html += ' | ';
html += '
';
html += '';
html += ' | ';
html += '
';
html += ' | ';
html += '';
html += '';
html += '';
html += '  | ';
html += '關閉 | ';
html += ' ';
html += '';
html += ' | ';
html += ' ';
html += '';
html += '';
html += '';
html += '';
html += ' | ';
html += ' ';
html += ' ';
html += ' | ';
html += ' ';
html += ' ';
html += ' | ';
html += ' | ';
html += '
';
html += '';
html += ' | ';
html += '';
html += '';
html += '';
html += ' | ';
html += ' ';
html += ' ';
html += ' | ';
html += ' | ';
html += '
';
html += '';
html += ' | ';
html += ' | ';
html += ' | ';
html += '
';
html += '';
html += ' | ';
html += '
';
html += '
';
showManager ( html );
}
function showManagerSub ( html ) {
var obj = _o("selectManagerSub");
obj.style.top = parent.document.body.scrollTop + 70;
obj.style.left = ( document.body.offsetWidth - parseInt(obj.style.width) ) / 2 -50 ;
obj.style.display = "";
obj.innerHTML = html;
}
function hideManager () {
var obj = _o("selectManager");
obj.innerHTML = '';
obj.style.display = "none";
pageDisabled ( false );
if(typeof(fnStateReturn) == "function") fnStateReturn();
}
function selectDisabled(b)
{
if (b)
{
if ($$("select"))
{
$$("select").each(function(item) {
item.hide();
});
}
if ($("ifrCategory")) $("ifrCategory").hide();
if ($("fhistory")) $("fhistory").hide();
try{
if($(document.inBlogFrame.ifrFileManMain)) {
document.inBlogFrame.ifrFileManMain._pageSelectDisabled();
}
} catch(e){}
}
else
{
if ($$("select"))
{
$$("select").each(function(item) {
item.show();
});
}
if ($("ifrCategory")) $("ifrCategory").show();
if ($("fhistory")) $("fhistory").show();
try{
if($(document.inBlogFrame.ifrFileManMain)) {
document.inBlogFrame.ifrFileManMain._pageSelectEnabled();
}
} catch(e){}
}
}
function pageDisabled ( b ) {
var objbg = _o("selectManagerBack");
if ( b ) {
divH = 850;
if(document.body.scrollHeight > divH)
divH = document.body.scrollHeight
objbg.style.cssText = "position:absolute;top:0px;left:0px;width:" + document.body.scrollWidth + "px;height:"+ divH +"px;background-color:rgba(0,0,0,0.3);z-index:98;filter:alpha(opacity=50)'> ";
objbg.style.display = "";
} else {
objbg.style.display="none";
}
selectDisabled(b);
//document.body.disabled = b;
}
function startMouseCapture(objCapture)
{
//if ( isIE == false ) return;
objCapture.setCapture();
}
function endMouseCapture(objCapture)
{
//if ( isIE == false )return;
objCapture.releaseCapture();
}