
spellcheck_text_field = '';

function spellcheck_window_open(argument0, argument1)
{
	var ie4   = (document.all) ? 1 : 0;
	var gecko = (navigator.userAgent.indexOf('Gecko') > -1) ? 1 : 0;
	var op6   = (navigator.userAgent.indexOf('Opera/6') > -1) ? 1 : 0;
	var op7   = (navigator.userAgent.indexOf('Opera/7') > -1) ? 1 : 0;
	var ns4   = (navigator.userAgent.indexOf('Mozilla/4.7') > -1) ? 1 : 0;
	var sf    = (navigator.userAgent.indexOf('Safari') > -1) ? 1 : 0;
	
	op7   = (navigator.userAgent.indexOf('Opera 7') > -1) ? 1 : op7;
	gecko = (!ie4+gecko+op6+op7+ns4+sf) ? 1 : gecko;
	gecko = (sf ) ? 1 : gecko;
	ie4   = (op7) ? 0 : ie4;
	ie4   = (sf ) ? 0 : ie4;

	spellcheck_text_field = argument0;
	var width  = 575;
	var height = 410;

	if (gecko)
	{
		height += 6;
	}
	if (op6)
	{
		width  += 10;
		height += 10;
	}

	if (!(op6 || gecko || ie4 || op7))
	{
		alert("The Spell Checker does not support this browser or this current version of it, request support for it on the forum.");
	}
	else
	{
		if (spellcheck_text_field.value == '' && !argument1)
		{
			return;
		}
		directory = '../../../';
		win1 = window.open(directory+'spell'+'check.php','spellcheckwin','resizable=no,location=yes,width='+width+',height='+height);
		if (win1.opener == null)
		{
			win1.opener = self;
		}
	}

	return false;
}

function Opera_Get_Link()
{
	return spellcheck_text_field;
}

