function doEditSpaceTitle(uid){
TINY.box.show("editspacetitle.aspx?uid="+uid+"&rd="+Math.random(),1,366,22,1,0);
}
function savespacetitle(uid,obj1){
var str1=document.getElementById(obj1).value;
if(str1=="")alert("请输入空间个性名称！")
else{
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.lastIndexOf("#"));
ajax("post","/space/editspacetitle.aspx?act=ajax","uid="+uid+"&value="+base64en(str1)+"&rd="+Math.random(),function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText=='ok'){window.location=url;}else if(xmlHttp.responseText=='err'){alert('修改失败！');}else if(xmlHttp.responseText=='safe'){alert('禁止输入危险字符！');}}});
}
}

function onkeyupnoenter(e){ 
var theEvent=window.event||e;var keyNum=theEvent.keyCode||theEvent.which;
if(keyNum==13)return false;
}

function savephotoclass(uid,id,obj1){
var str1=document.getElementById(obj1).value;if(str1.substring(str1.length-1)=="图"){str1=str1+"！";}
if(str1=="")alert("请输入相册名称！")
else{
var url=location.href;if(url.indexOf("#")!=-1)url=url.substring(0,url.lastIndexOf("#"));
ajax("post","/space/photo_class_do.aspx?act=ajax","uid="+uid+"&id="+id+"&value="+base64en(str1)+"&rd="+Math.random(),function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText=='ok'){window.location=url;}else if(xmlHttp.responseText=='err'){alert('修改失败！');}else if(xmlHttp.responseText=='safe'){alert('禁止输入危险字符！');}else if(xmlHttp.responseText=='max'){alert('最多只能创建60个相册！');}}});
}
}

function photo_view_title_show(id,obj1){
if(document.getElementById("photo_view_title").style.display=="none")
{
var title=document.getElementById(obj1).innerHTML;
document.getElementById("photo_view_title").style.display="";
document.getElementById("photo_view_title").innerHTML="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"wto\"><tr><td><input type=\"text\" id=\"photo_view_title_inp\" style=\"width:250px\" maxlength=\"20\" class=\"inp2\" value=\""+title+"\" /></td><td style=\"padding-left:5px\"><input type=\"button\" value=\"确定\" class=\"but1\" onclick=\"photo_view_title_edit("+id+",'photo_view_title_inp')\" /></td></tr></table>";
}
else{document.getElementById("photo_view_title").style.display="none";document.getElementById("photo_view_title").innerHTML="";}
}
function photo_view_title_edit(id,obj1){
ajax("get","photo_view.aspx?act=ajax&id="+id+"&title="+base64en(document.getElementById(obj1).value)+"&rd="+Math.random(),"",function OnHandler(){if(xmlHttp.readyState == 4){if(xmlHttp.responseText!='err'){document.getElementById("photo_name").innerHTML=base64de(xmlHttp.responseText);document.getElementById("photo_view_title").style.display="none";document.getElementById("photo_view_title").innerHTML="";}}});
}

