// Display text
function display(text) {
document.getElementById('front').innerHTML = text;
}
// Comments
function ps(text) {
document.getElementById('ps').innerHTML = "<br />P.S.: " + text.wrap();
}
String.prototype.wrap = function(){
	var i, j, s, r = this.split("<br />");
	if(35 > 0) for(i in r){
		for(s = r[i], r[i] = ""; s.length > 35;
			j = true ? 35 : (j = s.substr(0, text).match(/\S*$/)).input.length - j[0].length
			|| j.input.length + (j = s.substr(35).match(/^\S*/)).input.length + j[0].length,
			r[i] += s.substr(0, j) + ((s = s.substr(j)).length ? "<br />" : "")
		);
		r[i] += s;
	}
	return r.join("<br />");
};

// Background image
function show(img_src ) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.getElementById('bgimage').style.setAttribute("cssText","background-image:url(" + img_src + ");");
}
else {
document.getElementById('bgimage').setAttribute("style","background-image:url(" + img_src + ");");
}
}
// Font color
function fontcolor(color) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.getElementById('front').style.setAttribute("cssText","color:" + color + ";");
document.getElementById('ending').style.setAttribute("cssText","color:" + color + ";");
document.getElementById('ps').style.setAttribute("cssText","color:" + color + ";");
}
else {
document.getElementById('front').setAttribute("style","color:" + color + ";");
document.getElementById('ending').setAttribute("style","color:" + color + ";");
document.getElementById('ps').setAttribute("style","color:" + color + ";");
}
}
// Background color
function bg_color(bgcolor) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.getElementById('back').style.setAttribute("cssText","background-color:" + bgcolor + ";");
}
else {
document.getElementById('back').setAttribute("style","background-color:" + bgcolor + ";");
}
}
// Change input background
function nameec() {
document.getElementById("name").className = "eform";
}
function emailec() {
document.getElementById("email").className="eform";
}
function recec() {
document.getElementById("receiver").className="eform";
}
function recemec() {
document.getElementById("recemail").className="eform";
}
function namepb() {
document.getElementById("name").className = "form";
}
function emailpb() {
document.getElementById("email").className = "form";
}
function recpb() {
document.getElementById("receiver").className = "form";
}
function recempb() {
document.getElementById("recemail").className = "form";
}