function printForm() {

myPath = location.pathname
lastChar = myPath.length - 1;
myLast = myPath.charAt(lastChar);

ext1 = /.html/gi;
results1 = myPath.search(ext1)

ext2 = /.htm/gi;
results2 = myPath.search(ext2)

if((results1 || results2) != -1)

{

form_page = "/cgi-bin/print.pl?url=" + myPath;


} else {

                if (myLast == "/")

                {

                myPath = myPath + "index.shtml";
                form_page = "/cgi-bin/print.pl?url=" + myPath;


                } else {

                        myPath = myPath + "/index.shtml";
                        form_page = "/cgi-bin/print.pl?url=" + myPath;
                        }}

window.open(form_page);
}

window.name = "main"

function emailPage() {

thisURL = '/utils/emailpage/index.shtml?fileURL=' + window.location.pathname;

remote = window.open(thisURL,'pop1','toolbar=no,location=yes,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=640,height=480')

}
