var spChkItem='document.forms["postMsg"].postText'; //config var: textarea to be checked
var spChkLang='document.forms["postMsg"].spellLang'; //config var: spelling language drop-down

var msMode=false;

function mSpell(setLang,main_url){
if(main_url!='') main_url+='/';
if(typeof(bbPane)!="undefined" && bbPane!='') launchEd(document.postMsg.postText);
var wdp=300, htp=200, w2=780, h2=540, nav=navigator.appVersion, version=0;
if(nav.indexOf("MSIE")!=-1){
temp=nav.split("MSIE");
version=parseFloat(temp[1]);
if(version>=5.5) msMode=true;
}
if(msMode || document.getElementById || document.layers){ w2=screen.availWidth; h2=screen.availHeight; }
var lPos=(w2/2-wdp/2), tPos=(h2/2-htp/2);
var mspWin=window.open(main_url+'mspell_f/mSpell.php?setlang='+setLang,'mSpell', 'width='+wdp+',height='+htp+',top='+tPos+',left='+lPos+',toolbar=no,status=no,menubar=no,directories=no,resizable=yes');
mspWin.focus();
}

function updElement(ntxt){ eval(spChkItem+".value=ntxt"); }