﻿

function header1(tb)
{
	var head1=prompt('Text for the size 1 header','Text');
		if(head1==null)
		{

			doneNew(tb);
		}
		else
		{
			tb.value+=('<h1>'+head1+'</h1>');
			doneNew(tb);
		}
}

function header2(tb)
{
	var head2=prompt('Text for the size 2 header','Text');
		if(head2==null)
		{

			doneNew(tb);
		}
		else
		{
			tb.value+=('<h2>'+head2+'</h2>');
			doneNew(tb);
		}
}

function header3(tb)
{
	var head3=prompt('Text for the size 3 header','Text');
		if(head3==null)
		{

			doneNew(tb);
		}
		else
		{
			tb.value+=('<h3>'+head3+'</h3>');
			doneNew(tb);
		}
}

function bold(tb)
{
	var dark=prompt('Bold text','text');

		if(dark==null)
		{
			doneNew(tb);
		}
		else
		{
			tb.value+=('<b>'+dark+'</b>');
			doneNew(tb);
		}

}

function italic(tb)
{

	var ital=prompt('Italicized Text','Text');

		if(ital==null)
		{

			doneNew(tb);
		}
		else
		{
			tb.value+=('<i>'+ital+'</i>');
			doneNew(tb);

		}
}

function underlined(tb)
{
	var underline=prompt('Underlined Text','Text');
		if(underline==null)
		{

			doneNew(tb);
		}
		else
		{
			tb.value+=('<u>'+underline+'</u>');
			doneNew(tb);
		}
}

 

function email(tb)
{
	var email=prompt('Enter an email address (ie.mailto:name@address.ext)','name@address.ext');
	if(email==null)
	{

		doneNew(tb);
	}
	else
	{
		tb.value+=('<a href="mailto:'+email+'" style="font-family: verdana; color: #FF0010; font-weight: bold">'+email+'</a>');
		doneNew(tb);
	}
}

function linkmail(tb)
{
	var linkmail=prompt('Enter a Hyperlink (ie.www.address.com or nextpage.html)','www.address.com');
	if(linkmail==null)
	{

		doneNew(tb);
	}
	else
	{
		tb.value+=('<a href="http://'+linkmail+'" style="font-family: verdana; color: #FF0010; font-weight: bold">'+linkmail+'</a>');
		doneNew(tb);
	}
}

 

function taggy(tag,tb)
{
	tb.value+=(tag);
	doneNew(tb);
}

function special(ddl,form,tb)
{

    var amp="&"
    var tag = ddl.value;
    tb.value+=(amp+tag);
 
    ddl.options[0].selected=true;
    ddl.value="";
    
    doneNew(tb);
    return false;
}
function doneNew(tb)
{
	tb.focus();
	return false;
}
