function CheckField(field_id)
{
	document.getElementById(field_id).checked=document.getElementById(field_id).checked?false:true;
}

function sendAuth(msg)
{
	var form=document.authForm;
	if(form.Ulogin.value.length<1 || form.Upassword.value.length<=5)
	{
		return;
	} else form.submit();
}

function ClearField(obj,field_id)
{
	if(obj)
		obj.value='';
	else 
		document.getElementById(field_id).value='';
}

function sendSearch(offset,sw)
{
	document.fsearch.offset.value=offset;
	if(sw)
	{
		document.fsearch.search_words.value=sw;
	}
	document.fsearch.submit();
}

function createFCK(val,w,h,tb,dn)
{
	var oFCKeditor = new FCKeditor(dn);
	oFCKeditor.BasePath = "/system/lib/fckeditor/";
	oFCKeditor.InstanceName = dn;
	oFCKeditor.Value = val;
	oFCKeditor.Width = w;
	oFCKeditor.Height = h;
	oFCKeditor.ToolbarSet = tb;
	oFCKeditor.Config["CustomConfigurationsPath"] = "/system/lib/fckeditor/fckconfig.js";
	oFCKeditor.Config["StartupFocus"] = 1;
	oFCKeditor.Config["DefaultLanguage"] = "ru";
	document.getElementById('fck_text').innerHTML=oFCKeditor.CreateHtml();
}
