//formname is the name of form
//subject is the name of subject control
//body is the name of message body control
//compnayid, each company will give a company id.  This is used to find the location
//of custom dictionary
//If you run from your own location, you can just pass custom as the value.
//all custom dictionary will created under this sub directory
//sproxylocation is location of done.asp or done.cgi

//this file will be generated for each customer
function DoSpell(formname, subject, body)
{
	document.SPELLDATA.formname.value=formname
	if(subject==null || subject==''){
		alert('Please enter a field name for the first field');
		return;
	}

	document.SPELLDATA.subjectname.value=subject
	
	if(body!=null && body!='')
		document.SPELLDATA.messagebodyname.value=body
	
	document.SPELLDATA.companyID.value="custom\\CompuBridge"
//	document.SPELLDATA.language.value=1033
	document.SPELLDATA.formaction.value="/SpellCheck/startspelling.asp"
	
//	document.SPELLDATA.opener.value="../cgi-bin/sproxy.exe"
//	document.SPELLDATA.opener.value="../cgi-bin/sproxy.pl"
	//----------------
	// Get URL
	// If you have multiple alias, you may need the following code to
	// dynamically get the URL if you are using the free spell checker
	//----------------
	// var str1  = document.location.href;     
    // var nbr   = str1.lastIndexOf('/');    
    // var str2  = str1.substring(0,nbr+1);
	// document.SPELLDATA.opener.value= str2 + "sproxy.asp";
//DEBUG:	alert('spellchecker.js');
	document.SPELLDATA.opener.value = "/SpellCheck/sproxy.asp";
	
	window.open("/SpellCheck/Initspell.htm","Spell",
		//"toolbar=no,directories=no,resizable=yes,width=620,height=500,top=100,left=100 menubar=no")
		"toolbar=yes,directories=no,resizable=yes,width=620,height=500,top=100,left=100 menubar=yes")
}

