//<![CDATA[
String.prototype.trim = function () {
	return this.replace(/^\s*/g, "").replace(/\s*$/g, "");
}

function urimalSpellCheck_Start(str1,str2,str3,str4) {
	if(str1.trim() == "") {
		alert("본문을 입력해 주세요"); 
		return false;
	}

	width = 450;
	height = 520;
	left = (screen.width-width)/2;
	itop = (screen.height-height)/2;

	var tempWin=window.open("about:blank", "tempWindow", "width="+width+", height="+height+", left="+left+",top="+itop+", scrollbars=yes,status=yes");
	tempWin.focus();

	var formObj = document.createElement('form');
	formObj.setAttribute('name','spellCheckForm');
	formObj.setAttribute('action',str2);
	formObj.setAttribute('method','post');
	formObj.setAttribute('target','tempWindow');
	
	var spellText1 = document.createElement('input');
	spellText1.setAttribute('type', 'hidden');
	spellText1.setAttribute('name', 'text1');
	spellText1.setAttribute('value', str1.trim());

	var spellText2 = document.createElement('input');
	spellText2.setAttribute('type', 'hidden');
	spellText2.setAttribute('name', 'text2');
	spellText2.setAttribute('value', str3);
	
	formObj.appendChild(spellText1);
	formObj.appendChild(spellText2);
	document.body.appendChild(formObj);
	formObj.submit();
}

function spellcheck(id,pluginURL) {
	var content = document.getElementById(id).value;
	var path = pluginURL + "/tempaction.php";
	var actionkey = "http://164.125.36.47/WebSpell_ISAPI.dll?Check";
	var tempurl = "http://164.125.36.47/urimal-spellcheck.html";
	urimalSpellCheck_Start(content,path,actionkey,tempurl);
}
//]]>