function winclose()
{
  window.opener.location.reload();
  window.close();
}

function w(name, width, height) {
        //var args = "status=1,scrollbars=0,resizable=1,width="+width+",height="+height;
        var args = "status=1,scrollbars=1,resizable=1,width="+width+",height="+height+",left=100,top=100";
        window.open(name,'untitled',args);
}
var tofrom=1;
function makecode() {
        var tmpbody = new String(document.pstfrm.body.value);
        if(tofrom) {
                while (tmpbody.search(/</) != -1) tmpbody = tmpbody.replace(/</,'&lt;');
                while (tmpbody.search(/>/) != -1) tmpbody = tmpbody.replace(/>/,'&gt; ');
                while (tmpbody.search(/"/) != -1) tmpbody = tmpbody.replace(/"/,'&quot; ');
                tofrom = 0;
                document.pstfrm.encode.value = "normal";
        }
        else {
                while (tmpbody.search(/&lt;/) != -1) tmpbody = tmpbody.replace(/&lt;/,'<');
                while (tmpbody.search(/&gt;/) != -1) tmpbody = tmpbody.replace(/&gt;/,'>');
                while (tmpbody.search(/&quot;/) != -1) tmpbody = tmpbody.replace(/&quot;/,'"');
                tofrom = 1;
                document.pstfrm.encode.value = "<code>";
        }
        document.pstfrm.body.value = tmpbody;
}
function insertimg () {
        href = prompt("enter the url to the desired image:","http://");
        if ((href != null) && (href != "http://")) {
                document.pstfrm.body.value += ' <img src="'+href+'"> ';
        }
        document.pstfrm.body.focus();
}
function tobold () {
        bwords = prompt("enter the words you would like in bold:","");
        if (bwords != null) {
                document.pstfrm.body.value += ' <b>'+bwords+'</b> ';
        }
        document.pstfrm.body.focus();
}
function toitalic () {
        iwords = prompt("enter the words you would like in italics:","");
        if (iwords != null) {
                document.pstfrm.body.value += ' <i>'+iwords+'</i> ';
        }
        document.pstfrm.body.focus();
}
function tolink () {
        alink = prompt("enter the url of the link:", "http://");
        if ((alink != null) && (alink != "http://")) {
                document.pstfrm.body.value += ' <a href="'+alink+'">here</a> ';
        }
        document.pstfrm.body.focus();
}

function reloadtimer()
{


}
