/**** handy javascript functions used through out site ****/

function openCMSWindow(url)
{
	var attrs = 'width=500,height=500,resizable=yes,scrollbars=yes,toolbar=yes,';
	attrs = attrs + 'location=yes,directories=no,status=yes,menubar=yes,copyhistory=no';
	
	window.open( url, 'cms_popup', attrs);
}

function confirmDelete()
{
	$delete = confirm('Are you sure you want to delete this item and all associated information?');
	if($delete){ return true;}
	else { return false; }
}

function openWindow(url)
{
	var attrs = 'resizable=yes,scrollbars=yes,toolbar=yes,';
	attrs = attrs + 'location=yes,directories=no,status=yes,menubar=yes,copyhistory=no';
	
	window.open( url, 'new_window', attrs);
}

/* -- jump menu --- */

function menu_jump(path) 
{
    window.location.href = path.options[path.selectedIndex].value;
}

/* -- spell check stuff -- */
function spellCheck(form_name,field_name) 
{
	//read the form into the var: textform

	alert( "Form: " + form_name + "\nField: " + field_name );
	var textform = eval( "window.document.forms[1]." + field_name + ".value" );

	win_pop('');

	window.document.hidden_form.form_name.value = form_name; 	//w skritata forma se izpolzwa ime na pole form_name i field_name
	window.document.hidden_form.field_name.value = field_name;  	// koito nqmat nishto obshto s promrnliwite w tazi funkciq
	window.document.hidden_form.first_time_text.value = textform;
	window.document.hidden_form.submit();
}

function win_pop(URL)
{	
	winname=window.open(URL,'WIN','width=600,height=380,left=210,top=210,resizable=yes,scrollbars=yes,status=yes'); 
	return winname;
}