//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
	document.SPELLDATA.subjectname.value=subject
	document.SPELLDATA.messagebodyname.value=body
	
	document.SPELLDATA.companyID.value="custom\\Soffront"
	document.SPELLDATA.language.value=1033
	//document.SPELLDATA.formaction.value="startspelling.asp"

	//Path	= document.MyFORM.action;
	Path	= "";
	document.SPELLDATA.formaction.value= Path + "startspelling.asp"

//	document.SPELLDATA.opener.value="../cgi-bin/sproxy.exe"
//	document.SPELLDATA.opener.value="../cgi-bin/sproxy.pl"
	document.SPELLDATA.opener.value=Path + "sproxy.asp"

	strLoc	= Path + "Initspell.asp";
	if (Path != ""){
		strLoc	+= "?From=Ext";
	}

	var sPlatform, bIsMac,strFind;
	bIsMac		= false;
	sPlatform	= window.navigator.platform;
	strFind		= new String(sPlatform);
	if (strFind.indexOf('Mac') >= 0){
		bIsMac=true;
	}

	if (!bIsMac){
		if (top.SoffrontKb && !top.SoffrontKb.closed )
			top.SoffrontKb.close();
	}
	top.SoffrontKb = window.open(strLoc,"Spell","toolbar=no,directories=no,resizable=yes,width=620,height=400,top=100,left=100 menubar=no");
	top.SoffrontKb.focus();
}


