// -------------------------------------------------------------------
// Default JS-functions
// -------------------------------------------------------------------


function crypt_mail(name,domain,subjekt){
	var adress = '';
	
	this.subjekt=(typeof subjekt == "undefined" )? "" : '?subject=' + subjekt;
	adress =('<a href="mailto:' + name + '@' + domain + this.subjekt + '">' + name + '@' + domain + '</a>');
	document.write(adress);
}

function view_img(global_img){
	var img;
	var pos;
	var substr;
	this.global_img = (typeof global_img == "undefined" )? "" : global_img;
	pos = this.global_img.indexOf('.');
	substr = this.global_img.substr(0, pos);
	if(global_img != '' && substr.length > 4 ){
		img = '<img src="./img/forum_avatars/' + this.global_img + '" />';
	 	return img;
	}else if(global_img != '' && substr.length <= 4 ){
		img = '<img src="./img/user_img/' + this.global_img + '" />';
	 	return img;
	}else{
		return '';
	}
		
}
