function pwConfirm(title,position,callback){
if (typeof(callback) != 'function') alert('error');
if (objCheck('oldinfo')) {
getObj('oldinfo').parentNode.removeChild(getObj('oldinfo'));
}
var container = elementBind('div','container_del','','position: absolute;z-index:1011');
(getObj('upPanel')||document.body).appendChild(container);
closefm = callback;
var pw_box = '
'+title+'
';
container.innerHTML = pw_box;
if (typeof(position)!='object') {
container.style.top = (ietruebody().clientHeight - container.offsetHeight)/3 + getTop() + 'px';
container.style.left = (ietruebody().clientWidth - container.offsetWidth)/2 + 'px';
} else {
var top = findPosY(position);
var left = findPosX(position);
top = getTop() + top - container.offsetHeight;
if (ietruebody().clientWidth
';
container.innerHTML = pw_box;
if (typeof(position)!='object') {
container.style.top = (ietruebody().clientHeight - container.offsetHeight)/3 + getTop() + 'px';
container.style.left = (ietruebody().clientWidth - container.offsetWidth)/2 + 'px';
} else {
var top = findPosY(position);
var left = findPosX(position);
top = getTop() + top - container.offsetHeight;
if (ietruebody().clientWidth -1) {
showDialog('success', '上传成功!', 2);
obj.onload = null;
SETTOP();
getObj('uploadPhotoForm').reset();
setTimeout("parent.location.href = '" + basename + "';", 2000);
} else {
showDialog('error', data);
SETTOP();
}
} catch(e){}
}
function loadReturnedData(obj) {
var _innerText = obj.contentWindow.document.documentElement.innerText;
var _textContent = obj.contentWindow.document.documentElement.textContent;
var data = '';
if (_innerText == undefined && _textContent==undefined) {
return false;
}
if (-[1,]) {
data = _textContent;
} else {
var rules = //.exec(_innerText);
if(rules && rules[1]){
data = rules[1].replace(/^\s+|\s+$/g, '');
} else {
var xmlDoc = obj.contentWindow.document.XMLDocument;
if(xmlDoc){
data = xmlDoc.text;
}else{
data = _innerText;
}
}
}
return data;
}
function iDiaryForm (obj) {
try {
var data = loadReturnedData(obj);
if (!data) return false;
var rText = data.split('\t');
if (rText[0] == 'success') {
showDialog('success', '日志发表成功!', 2);
SETTOP();
getObj('FORM').reset();
setTimeout("parent.location.href = '" + rText[1] + "';", 2000);
} else {
document.FORM.Submit.disabled = false;
showDialog('error', data);
SETTOP();
}
} catch(e){}
}