IS_FILE_VIEW = false;
IS_MENU_VIEW = false;


//
// Just posts the form so that the data can be saved to the db
function savePrefs (){
		var f = eval ( 'document.mainForm' );
		f.localAction.value = 1;
		f.submit ();
}


//
// Open win special; A more abstract function than openWin
function openWinSpec ( dest, name, action, id ){
	var winWidth;
	var winHeight;
	var params;

	switch ( action ){
	case "sched":
		width = '360';
		height = '175';
		params = "width=" + width + ",height=" + height;

	break;

	case "schedWin":
		width = '1000';
		height = '650';
		params = "width=" + width + ",height=" + height + ",resizable,scrollbars";

	break;

	case "wwlEdit":
		width = '850';
		height = '500';
		params = "width=" + width + ",height=" + height;
	break;

	case "listNOA":
		width = '360';
		height = '250';
		params = "width=" + width + ",height=" + height;
	break;

	case "listMail":
		width = '390';
		height = '300';
		params = "width=" + width + ",height=" + height + ",resizable,scrollbars";
	break;

	case "posLangBar":
		width = '350';
		height = '180';
		params = "width=" + width + ",height=" + height;
	break;
	
	case "lastUpdate":
		width = '400';
		height = '90';
		params = "width=" + width + ",height=" + height;
	break;

	default:
	break;	
	}

	window.open( dest, name, params );
}



//
// Pretty much speaks for itself...
function openWin ( dest, name, selectorIndex ){
	if ( selectorIndex != '' ){
		var f = eval ( 'document.editorForm.img' + selectorIndex + 'Selector' );
		var imgNum = f.options[f.selectedIndex].value;
		dest = dest + imgNum;
	}
	if ( IS_FILE_VIEW ){ height = '120'; width = '380'; }
	else if ( IS_MENU_VIEW ){ height = '180'; width = '450'; }
	else { height = '300'; width = '380'; }


	w = window.open( dest, name, 'width=' + width + ',height=' + height + ',resizable,scrollbars');
}

function closeWin ( wId ){
	window.close ( wId );
}

