
function x() { return; }

function DoSmilie ( addSmilie )
{
	var addSmilie;
	var revisedMessage;
	var currentMessage = document.coolsus.message.value;
	revisedMessage = currentMessage + addSmilie;
	document.coolsus.message.value = revisedMessage;
	document.coolsus.message.focus();
	return;
}

function DoPrompt( action, targetDOM, insertValue )
{
    var thisReturnValue = null;

	switch( action )
	{
	    case "url":

    		var thisURL = prompt( UrlDialogCaption, "http://" );
    		var thisTitle = prompt( UrlTitleCaption, UrlSampleCaption );

    		if ( thisURL != null )
            {
                thisReturnValue = "[URI href=" + thisURL + "]" + thisTitle + "[/URI]";
            }

        break;

	    case "email":

    		var thisEmail = prompt( EmailDialogCaption, "" );

    		if ( thisEmail != null )
            {
                thisReturnValue = "[EMAIL]" + thisEmail + "[/EMAIL]";
            }

        break;

        case "image":

    		var thisImage = prompt( ImageDialogCaption, "http://" );
    		var thisImageAlt = prompt( ImageAltCaption, "" );

    		if ( thisImage != null && thisImage != "http://" )
            {
                thisReturnValue = "[IMG src=" + thisImage + " alt="  + thisImageAlt + " /]";
            }

        break;

	    case "bold":
    		thisReturnValue = "[B]  [/B]";
        break;

        case "italic":
            thisReturnValue = "[I]  [/I]";
        break;

	    case "quote":
    		thisReturnValue = "[QUOTE]  [/QUOTE]";
        break;

		case "code":
    		thisReturnValue = "[CODE]  [/CODE]";
        break;

	    case "literal":
    		thisReturnValue = "[LIT]  [/LIT]";
        break;

	    case "listopen":
    		thisReturnValue = "[LIST]";
		break;

	    case "listclose":
    		thisReturnValue = "[/LIST]";
        break;

    	case "listitem":

    		var thisItem = prompt( ListDialogCaption, "" );

    		if ( thisItem != null )
            {
                thisReturnValue = "[LI /]" + thisItem;
            }

        break;
    }

	if ( thisReturnValue != null )
    {
        targetDOM.value = targetDOM.value + thisReturnValue;
    }

    targetDOM.focus();
    return;
}