function fieldempty()
{
    if(document.forms[0])
    {
        if(document.forms[0].elements['sword'])
        {
            document.forms[0].elements['sword'].value="";
        }
    }
}
/*
function fieldempty()
{
    if(document.forms[0].elements['sword'])
    {
        document.forms[0].elements['sword'].value="";
    }
}
*/

function changeImage(img_name, img_src)
{
    document[img_name].src = img_src;
}

function open_img(src, width, height)
{
    newWindow = window.open("", "displayWindow", "status=0, top=0, left=0, width="+width+", height="+height+", resizable=1");
    newWindow.document.open();
    
    with(newWindow.document)
    {
        newWindow.document.write("<html>");
        newWindow.document.write("<body style='margin:0px;'>");
        newWindow.document.write("<center>");
        newWindow.document.write("<img src=");
        newWindow.document.write(src);
        newWindow.document.write(">");
        newWindow.document.write("</center>");
        newWindow.document.write("</body>");
        newWindow.document.write("</html>");
    }
    
    newWindow.focus();
}

function check(form, element, stopwords)
{
    if(document.forms[form].elements[element].value == check.arguments[2])
    {
        //alert(document.forms[form].elements[element].value);
        return false;
    }
    return true;
}