﻿// Wintertree Spelling Server
// SubmissionScript.js:
// Client-side script used to submit a form to the server for
// spell-checking using Wintertree Spelling Server.
// Copyright (c) 2002 Wintertree Software Inc.
// www.wintertree-software.com
// $Id: SubmissionScript.js,v 1.7 2003/07/08 18:07:33 wsi Exp wsi $

var spellCheckWin = null;
//var currTarget = document.forms[0].target;

function onCheckSpellingBtn(formNum) {
    if (spellCheckWin != null && !spellCheckWin.closed) {
    
        // The spell-check form is active. Bring it to the front.
        spellCheckWin.focus();
        return;
    }

    // When the Check Spelling button is pressed,
    // submit the form to SpellingForm.aspx and
    // display the result in a pop-up window.
    spellCheckWin = window.open("", "spellWin",'toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=1,width=540,height=220');
    document.forms[formNum].target = "spellWin";
}

function onSubmitBtn(formNum) {
	//This function must be assigned to any submit buttons on the form that do not have an explicit "target"
    // When the Submit button is pressed,
    // display the result in the same window.
    document.forms[formNum].target = "_self"; 
}

function onblurreset(formNum)
{
    document.forms[formNum].target = "_self";
}

// JScript File


