// JavaScript Document
toAlbumActionFile="module/ajax_album.php?fmb_id="+isfmb_id;
function $(id){return document.getElementById(id);}
function $name(name){return document.getElementsByName(name);};
function $value(node,name){try{return node.getElementsByTagName(name)[0].firstChild.nodeValue;}catch(e){return "";}}
function spacialTag(txt){txt=txt.replace(/>/g,'&gt;');txt=txt.replace(/</g,'&lt;');return txt;}
function spacialChar(txt){txt=txt.replace(/\\u000a|\\u000d/g," ");txt=txt.replace(/\\u0026/g,"&");return txt;}
function textLimitCheck(id,limit,idS){
	if(!id.nodeName){id=$(id)}
	txtStr=id.value.replace(/[\n ]+/g,' ');
	txtLength=txtStr.length;
	if(idS){
	$(idS).innerHTML=(txtLength>limit)?"<font>"+txtLength+"/"+limit+"</font>":txtLength+"<font>/"+limit+"</font>";
	}
	return (txtLength>limit||txtLength<=0)?false:true;
}
function deleteAlbum(albumID){
	if(window.confirm(confirmDelAlbum)){
		cp.call(toAlbumActionFile,'deleteAlbum',resDeleteAlbum,albumID);
	}
}
function resDeleteAlbum(result){
	albumID=result.getElementsByTagName('album')[0].getAttribute('id');
	$('album'+albumID).parentNode.removeChild($('album'+albumID));
}
