function dictionary_submit( ) {
	var f = document.forms['sztaki_szotar'];
	if (f.W.value.length<2) {
		alert( aJSLangDefs.Please_type_at_least_2_chars );
		return false;
	}
	var url = f.action+"?";
	for (i=0; i<f.elements.length; i++) {
		if (f.elements[i].name == "L")
			url += f.elements[i].name +"="+f.elements[i].options[f.elements[i].selectedIndex].value+"&";
		else
			url += f.elements[i].name +"="+f.elements[i].value+"&";
	}
	w = window.open (url, 'sztaki_szotar', 'toolbar=no,scrollbars=yes,width=500,height=350');
	w.focus();
	return false;
} 

function HandleGlobalInfo( globalinfo ) {
	if (typeof globalinfo.t_numofagencies!="undefined")
		$("#numofagencies").html( globalinfo.t_numofagencies );
	if (typeof globalinfo.t_numoffreelancers!="undefined")
		$("#numoffreelancers").html( globalinfo.t_numoffreelancers );
	if (typeof globalinfo.t_numofparttimers!="undefined")
		$("#numofparttimers").html( globalinfo.t_numofparttimers );
	if (typeof globalinfo.t_numoftranslationjobs!="undefined")
		$("#numoftranslationjobs").html( globalinfo.t_numoftranslationjobs );
	if (typeof globalinfo.t_online_users!="undefined")
		$("#numofonlineusers").html( globalinfo.t_online_users );
	if (typeof globalinfo.t_online_members!="undefined")
		$("#numofonlinemembers").html( globalinfo.t_online_members );
}

function LaterInfoPanel( id ) {
	var data = $("#"+id).data( "datas" );
	var i,url="";
	for (i in data.facebook_iframe_params) {
		if (url.length==0) url+="?"; else url+="&";
		url+=i;
		url+="=";
		url+=data.facebook_iframe_params[i];
	}
	$("#facebook_frame").attr( "src" , data.facebook_iframe_src + url );
}

function InitInfoPanel( id , data ) {
	$("#"+id).data( "datas" , data );
	setTimeout( "LaterInfoPanel( '"+id+"' );" , 1000 );
}
