function formatImageUrl(url){
	if(url.toLowerCase().lastIndexOf('http://') > 0) {
		return url.slice(7);
	} else {
		return url.substr(0,7).toLowerCase()=='http://'?url:"http://"+url;
	}
}
function isimg(filename){
	var names,l,low;
	names = filename.split('.');
	l = names.length;
	low = names[l-1].toLowerCase();
	return isfriend(filename) || ((low=='jpg' || low=='jpeg' || low=='gif' || low=='png') && filename.indexOf('?')==-1);
}
function isfriend(filename){
    var urls = _friends.join('|').replace(/\./g,'\\\.');
    var reg  = new RegExp('^http://(?:[^/]+\.)?(?:'+urls+')/','i');
    return reg.test(filename);
}