function perform_cms_action(action,param1,param2,param3,param4,param5,param6)

{
	if ( typeof(all_actions_disabled) == 'undefined' )
	{
		all_actions_disabled = false;	
	}
	
	if ( all_actions_disabled )
	{
		return;	
	}
	
	if (action.length > 5 && action.substring(0,5) == 'STEP_')
	{
		document.getElementById('next_action').value = action.toLowerCase();
		disable_buttons();
		document.getElementById('f_checkout').submit();
		return;
	}
	
	if ( action == 'ACTIVATE_BUTTON')
	{
		_DBSVARS.active_button_span1_id = param1;
		_DBSVARS.active_button_span2_id = param2;
		return;
	}
	
	if ( action == 'LOG_IN')
	
	{    
		
		var a_params = new Array();
		var login_id = DWRUtil.getValue('login_id');
		var password = DWRUtil.getValue('password');
		
		var next_action = '';
		var next_action_params = '';
		if ( param1 )
		{
			next_action = param1;	
		}
		
		if ( param2 )
		{
			next_action_params = param2;	
		}
		
		if ( trim_string(login_id) == '' || trim_string(password) == ''  )
		{
			display_message('Please enter a Logon Id and Password');
			return;
		}
		
		a_params[0] = 'ajax_root^cms';
				

		a_params[1] = 'logon_id^' + login_id;
		a_params[2] = 'password^' + password;
		a_params[3] = 'object_name^logon';
		a_params[4] = 'next_action^' + next_action;
		a_params[5] = 'next_action_params^' + next_action_params;
		
		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		
		return;
	} 	
	
	if ( action == 'LOG_OUT')
	
	{    
		var a_params = new Array();
		
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'object_name^logout';
		
		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	} 
	
	if ( action == 'CHANGE_PASSWORD')
	{	
		enable_buttons();
		document.getElementById('cms_login_div').style.display = 'none';	
		document.getElementById('cms_change_password_div').style.display = '';
		document.getElementById('change_password_login_id').value = document.getElementById('login_id').value;
		document.getElementById('change_password_password').value = '';
		enable_buttons();
		return;
	}
	
	if ( action == 'DO_CHANGE_PASSWORD')
	
	{    
		var a_params = new Array();
		var login_id = document.getElementById('change_password_login_id').value;
		var password = document.getElementById('change_password_password').value;
		var new_password = document.getElementById('new_password').value;
		var repeat_password = document.getElementById('repeat_password').value;		
		 
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'logon_id^' + login_id;
		a_params[2] = 'password^' + password;
		a_params[3] = 'new_password^' + new_password;
		a_params[4] = 'repeat_password^' + repeat_password;
		
		a_params[5] = 'object_name^change_password';
		 
		disable_buttons(); 
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	} 
	
	if ( action == 'CANCEL_CHANGE_PASSWORD')
	{	
		enable_buttons();
		document.getElementById('cms_login_div').style.display = '';	
		document.getElementById('cms_change_password_div').style.display = 'none';	
		document.getElementById('login_id').value = document.getElementById('change_password_login_id').value;
		document.getElementById('password').value = '';	
		
		return;
	}	

	if ( action == 'LOST_PASSWORD')
	{	
		enable_buttons();
		document.getElementById('cms_login_div').style.display = 'none';	
		document.getElementById('cms_lost_password_div').style.display = '';
		document.getElementById('lost_password_login_id').value = document.getElementById('login_id').value;
		
		return;
	}
	
	if ( action == 'DO_LOST_PASSWORD')
	
	{    
		var a_params = new Array();
		var login_id = document.getElementById('lost_password_login_id').value;	
		 
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'logon_id^' + login_id;
		a_params[2] = 'object_name^lost_password';
		a_params[3] = 'next_action^CANCEL_LOST_PASSWORD';
		
		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	} 
	
	if ( action == 'CANCEL_LOST_PASSWORD')
	{	
		enable_buttons();
		document.getElementById('cms_login_div').style.display = '';	
		document.getElementById('cms_lost_password_div').style.display = 'none';	
		document.getElementById('login_id').value = document.getElementById('lost_password_login_id').value;
		return;
	}

	if (action == 'SAVE_PAGE')
	{
		var a_params = new Array();
		var parent_id = DWRUtil.getValue('parent_id');
		var directory = DWRUtil.getValue('directory');
		var page_name = DWRUtil.getValue('page_name');
		var menu_heading = DWRUtil.getValue('menu_heading');
		var menu_title = DWRUtil.getValue('menu_title');
		var page_type_id = DWRUtil.getValue('page_type_id');
		var requires_security = DWRUtil.getValue('requires_security');
		var menu_placeholder = DWRUtil.getValue('menu_placeholder');
		var page_site_cfc = DWRUtil.getValue('page_site_cfc');
		var page_text_element_id = DWRUtil.getValue('page_text_element_id');
		 
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'parent_id^' + parent_id;
		a_params[2] = 'directory^' + directory;
		a_params[3] = 'page_name^' + page_name;
		a_params[4] = 'menu_heading^' + menu_heading;
		a_params[5] = 'menu_title^' + menu_title;
		a_params[6] = 'page_type_id^' + page_type_id;
		a_params[7] = 'requires_security^' + requires_security;
		a_params[8] = 'menu_placeholder^' + menu_placeholder;
		a_params[9] = 'show_when_ind^' +  document.getElementById('show_when_ind').value;
		a_params[10] = 'show_item^' + document.getElementById('show_item').checked;
		a_params[11] = 'show_https^' + document.getElementById('show_https').checked;
		a_params[12] = 'page_site_cfc^' + page_site_cfc;
		a_params[13] = 'page_text_element_id^' + page_text_element_id;		

		var smi_elem = document.getElementById('site_menu_id') || null;
		if(smi_elem)
		{
			a_params.push('site_menu_id^' + smi_elem.options[smi_elem.selectedIndex].value);
			a_params.push('object_name^modify_page');
			disable_buttons();
			ajax_get_data(a_params,'cms_ajax_response');
		}
		else
		{
			a_params.push('object_name^new_page');
			disable_buttons();
			ajax_get_data(a_params,'cms_ajax_response');
		}
		return;
	}

	if(action == 'SAVE_MENU')
	{
		var a_params = new Array();
		var v_error = [];
		var parent_id = DWRUtil.getValue('parent_id');
		var directory = document.getElementById('directory').value;
		var menu_heading = document.getElementById('menu_heading').value;
		if(parent_id == 0)
		{
			v_error.push('Please select a parent menu');
		}
		if(directory.search(/\w/) == -1)
		{
			v_error.push('Please input a directory');
		}

		if(menu_heading.search(/\w/) == -1)
		{
			v_error.push('Please input a menu');
		}

		if(v_error.length > 0)
		{
			display_message(v_error.join('\n'));
			return;
		}

		var menu_title = DWRUtil.getValue('menu_title');
		var requires_security = DWRUtil.getValue('requires_security');
		var smi_elem = document.getElementById('site_menu_id') || null;
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'parent_id^' + parent_id;
		a_params[2] = 'directory^' + directory;
		a_params[3] = 'menu_heading^' + menu_heading;
		a_params[4] = 'menu_title^' + menu_title;
		a_params[5] = 'requires_security^' + requires_security;
		a_params[6] = 'show_when_ind^' +  document.getElementById('show_when_ind').value;
		a_params[7] = 'show_item^' + document.getElementById('show_item').checked;
		a_params[8] = 'show_https^' + document.getElementById('show_https').checked;
				
		a_params.push('object_name^save_menu');
		if(smi_elem)
		{
			a_params.push('site_menu_id^' + smi_elem.options[smi_elem.selectedIndex].value);
		}
		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	}

	
	if (action == 'HIDE_EDIT_INSTRUCTIONS')
	{
		var a_params = new Array();
		
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'object_name^hide_edit_instructions';
		ajax_get_data(a_params,'refresh_page');
		return;
	}

	if(action == 'CHANGE_MENU_ID')
	{	
		var smi_elem = document.getElementById('site_menu_id');
		if(smi_elem.selectedIndex > 0)
		{
			var cms_edit_string = location.href.match(/\/cms_edit\/?/) || '';
			
			var tmp_loc = location.href.replace(cms_edit_string, '');

			var v_href = tmp_loc + '/' + smi_elem.options[smi_elem.selectedIndex].value + cms_edit_string;

			location.href = v_href;
		}
		return;
	}

	if(action == 'CHANGE_PAGE')
	{	
		enable_buttons();
		if(document.getElementById('site_menu_id').selectedIndex > 0)
		{
			document.getElementById('f_page').submit();
		}
		return;
	}

	if (action == 'SUBMIT_REGISTRATION')
	{
		
		if ( !document.getElementById('accept_terms').checked )
		{
			display_message('Sorry you must accept our terms and conditions before proceeding.')
			return;
		}

		var next_action = '';
		if ( typeof(param1) != 'undefined' )
		{
			next_action = param1;	
		}

		var a_params = new Array();
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'first_name^' + document.getElementById('first_name').value;
		a_params[2] = 'last_name^' + document.getElementById('last_name').value;
		a_params[3] = 'daytime_phone^' + document.getElementById('daytime_phone').value;
		a_params[4] = 'mobile_phone^' + document.getElementById('mobile_phone').value;
		a_params[5] = 'address_line_1^' + document.getElementById('address_line_1').value;
		a_params[6] = 'address_line_2^' + document.getElementById('address_line_2').value;
		a_params[7] = 'address_line_3^' + document.getElementById('address_line_3').value;
		a_params[8] = 'city^' + document.getElementById('city').value;
		a_params[9] = 'state^' + document.getElementById('state').value;
		a_params[10] = 'postcode^' + document.getElementById('postcode').value;
		a_params[11] = 'country_id^' + document.getElementById('country_id').value;
		a_params[12] = 'special_instructions^' + document.getElementById('special_instructions').value;
		a_params[13] = 'accept_terms^' + document.getElementById('accept_terms').checked;
		a_params[14] = 'email_address^' + document.getElementById('email_address').value;
		a_params[15] = 'confirm_email_address^' + document.getElementById('confirm_email_address').value;
		a_params[16] = 'password^' + document.getElementById('register_password').value;
		a_params[17] = 'confirm_password^' + document.getElementById('confirm_password').value;
		a_params[18] = 'object_name^register_user'; 
		a_params[19] = 'next_action^' + next_action;
		
		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	}
	
	if (action == 'UPDATE_REGISTRATION')
	{

		var next_action = '';
		if ( typeof(param1) != 'undefined' )
		{
			next_action = param1;	
		}
		
		var old_password = '';
		var password = '';
		var confirm_password = '';
		var special_instructions = '';
		
		try
		{
			old_password = document.getElementById('old_password').value;
			password = document.getElementById('register_password').value;
			confirm_password = document.getElementById('confirm_password').value;
		}
		catch(e){};
		
		try
		{
			special_instructions= document.getElementById('special_instructions').value;
		}
		catch(e){};

		var a_params = new Array();
		a_params[0] = 'ajax_root^cms';
		a_params[1] = 'first_name^' + document.getElementById('first_name').value;
		a_params[2] = 'last_name^' + document.getElementById('last_name').value;
		a_params[3] = 'daytime_phone^' + document.getElementById('daytime_phone').value;
		a_params[4] = 'mobile_phone^' + document.getElementById('mobile_phone').value;
		a_params[5] = 'address_line_1^' + document.getElementById('address_line_1').value;
		a_params[6] = 'address_line_2^' + document.getElementById('address_line_2').value;
		a_params[7] = 'address_line_3^' + document.getElementById('address_line_3').value;
		a_params[8] = 'city^' + document.getElementById('city').value;
		a_params[9] = 'state^' + document.getElementById('state').value;
		a_params[10] = 'postcode^' + document.getElementById('postcode').value;
		a_params[11] = 'country_id^' + document.getElementById('country_id').value;
		a_params[12] = 'special_instructions^' + special_instructions;
		a_params[13] = 'email_address^' + document.getElementById('email_address').value;
		a_params[14] = 'confirm_email_address^' + document.getElementById('confirm_email_address').value;
		a_params[15] = 'old_password^' + old_password;
		a_params[16] = 'password^' + password;
		a_params[17] = 'confirm_password^' + confirm_password;
		a_params[18] = 'object_name^update_registration'; 
		a_params[19] = 'next_action^' + next_action;

		disable_buttons();
		ajax_get_data(a_params,'cms_ajax_response');
		return;
	}

	if (action == 'DOWNLOAD')
	{
		/*var po_window;	 
		var winatts = "height=600,width=800,left=300,top=100,status=1,scrollbars=1,resizable=1";
				
		if (!po_window || po_window.closed	)
		{
			po_window = window.open('','CMS_DOWNLOAD',winatts);
		}*/
	
		document.f_download.cms_fuseaction.value = 'cms_download';
		document.f_download.download_file.value = param1;
		document.f_download.target = 'CMS_DOWNLOAD';
		document.f_download.action='index.cfm';			
		document.f_download.submit(); 
		
		/*po_window.focus();*/
			
		return;
	}
	
	if (action == 'GO_TO_PAGE')
	{
		disable_buttons();
		top.location.href = _DBSVARS.request.machine_root + '/' + param1;
		return;
	}

	if(action == 'POPUP')
	{
        var po_window;     
        var winatts = "status=0,toolbars=0,scrollbars=1,resizable=1";
		var path = param1;
		//default the window name
		if ( typeof(param2) == 'undefined' )
		{
			param2 = 'cms_popup';	
		}
		
		//default the height and width
		if ( typeof(param3) == 'undefined' )
		{
			param3 = '600';	
		}
		
		if ( typeof(param4) == 'undefined' )
		{
			param4 = '800';	
		}
		
		if ( typeof(param5) == 'undefined' )
		{
			param5 = '/no_menu';	
		}
		
		path = path + param5;
		
		winatts = winatts + 'height=' + param3 + ',width=' + param4;
				
		if (!po_window || po_window.closed)
		{
			po_window = window.open(path,param2, winatts);
		}
		po_window.focus();
		enable_buttons();
		return;
	}
	
	if (action == 'LOAD_PORTAL')
	{
		display_message('Loading portal, please wait.');
		<!--- Set params that need persisting to new app load here --->
		v_href = _DBSVARS.request.machine_root + '/index.cfm?fuseaction=main_site&deep_link_code=&target_menu_code=&do_cookie_check=yes&' + _DBSVARS.session.urltoken;
		/*&deep_link_code=#attributes.deep_link_code#&target_menu_code=#attributes.target_menu_code#&do_cookie_check=#attributes.do_cookie_check#&*/
		
		open_portal_window(v_href,_DBSVARS.request.application_name);
		return;
	}
	
	try{
		if (perform_web_store_action(action,param1,param2,param3))
		{
			return true;	
		}
	}catch(e){};
}

/* Legacy dont use any more */
function display_cms_message(response)
{
	var msgPane = document.getElementById('messagePane');
	msgPane.innerHTML = (response.length == 0) ? 'Successfully Saved' : 'Error Saving';
	msgPane.style.color = (response.length == 0) ? 'green' : 'red';
	msgPane.innerHTML += ' @ ' + (new Date()).getHours() + ':' + (new Date()).getMinutes();
	msgPane.style.display = 'block';
	document.body.scrollTop;

}

/*Use instead*/
function display_message(message,success,show_alert)
{
	try
	{
		
		if ( typeof(success) != 'boolean' )
		{
			success == false;	
		}
		if ( typeof(show_alert) != 'boolean' )
		{
			show_alert == false;	
		}

		var message_div = document.getElementById('message_div');
		message_div.innerHTML = '<p>' + message + '</p>';
		
		if (success)
		{
			message_div.className = 'message_div_success';	
		}
		else
		{
			message_div.className = 'message_div_error';	
		}
		message_div.style.display = '';
		
		if (show_alert)
		{
			alert(message);	
		}
		else
		{
			scroll(0,0);	
		}
	}
	catch(e)
	{
		alert(message);	
	}
	return;
}

function show_cms_help(id,parent)
{
	var left_corner = '';
	
	right_corner = '' + (jQuery(parent).offset().left - jQuery('#'+id).width()) + 'px';
	
	top_corner = '' + jQuery(parent).offset().top + 'px';
	
	document.getElementById(id).style.display = 'block';
	document.getElementById(id).style.zIndex = 1000;
	document.getElementById(id).style.left = right_corner;
	document.getElementById(id).style.top = top_corner;
}

function clear_error_fields()
{
	try
	{
		for (x=0; x <=_DBSVARS.attributes.field_list.length-1; x=x+1)
		{
			try{document.getElementById(_DBSVARS.attributes.field_list[x]).style.border='';}catch(e){};
		}
	}
	catch(e)
	{
	}
}

function highlight_error_fields()
{

	clear_error_fields();
	try
	{
		for (x=0; x <=_DBSVARS.attributes.error_fields.length-1; x=x+1)
		{
			/* Note hard coded corded style: change to be more generic */
			try{document.getElementById(_DBSVARS.attributes.error_fields[x]).style.border='1px solid #ffaa00';}catch(e){};
		}
	}
	catch(e)
	{
	}
	
}

function clear_message()
{
	
	clear_error_fields();
	try
	{
		var message_div = document.getElementById('message_div');
		message_div.innerHTML = '<p>&nbsp;</p>';	
		message_div.className = 'message_div_error';	
		message_div.style.display = 'none';
	}
	catch(e)
	{
	}
	return;
}

function refresh_page()
{
	top.location.href = top.location.href;	
}

function cms_ajax_response(r)
{
	
	enable_buttons();
	
	if (report_ajax_errors(r)==false)
	{
		var status = '';
		var message = '';
		var object_name = '';
		var product_id = "";
		var next_action = '';
		var next_action_params = '';
	
		status = get_value_from_ajax_response(r,'status');
		message = get_value_from_ajax_response(r,'message');
		object_name = get_value_from_ajax_response(r,'object_name');
		next_action = get_value_from_ajax_response(r,'next_action');
		next_action_params = get_value_from_ajax_response(r,'next_action_params');

		if (status == 'ER')
		{
			try{display_message(message)}catch(e){};
			display_message(message);
			return;
			 
		}

		switch(object_name)
		{
		case 'logon':
		
			if (status != 'OK')
			{
				display_message(message); 
			}
			else if (status == 'OK')
			{
				if ( next_action == '' )
				{
					top.location.href = top.location.href;	
				}
				else
				{
					perform_cms_action(next_action,next_action_params);	
				}
			}
			else	
			{
				document.getElementById('password').value = '';	
				if (status=='CHANGE_PASSWORD')
				{
					perform_cms_action('CHANGE_PASSWORD');	
				}
			}
		
		break;
		
		case 'new_page':
			display_message('New page was saved, will now display');
			path = get_value_from_ajax_response(r,'path');
			top.location.href = _DBSVARS.request.machine_root + '/' + path + '/cms_edit';	

		break;
		
		case 'modify_page':
			display_message('Page was saved.');
			try{display_message(message)}catch(e){};

		break;
		
		case 'save_menu':
			display_message('Menu was saved');
			try{display_message(message)}catch(e){};
		break;
				
		case 'register_user':
		 	
		 	perform_cms_action(next_action);
		
		break;
		
		case 'update_registration':
		 	
		 	perform_cms_action(next_action);
		
		break;
		
		case 'lost_password':
		 	
		 	display_message(message);
			perform_cms_action('CANCEL_LOST_PASSWORD');
		
		break;
		
		}
		
	}		
}


/* Image rotate function written for ANZES very quck and crude

example of calling code:

<script language="javascript" src="/shared_apps/blocks/js_javascript_cms.js"></script> 

<script language=javascript>
	var image_array = new Array('abc.gif','xyz.gif','efg.gif');
	var image_to_rotate = document.getElementById("image_to_rotate");
	var int=self.setInterval("rotate_image()",5000);
	var image_id = 0;
</script>

*/
function dummy(){};
function rotate_image()
{
	if ( image_id < image_array.length -1 )
	{
		image_id = image_id + 1;
	}
	else
	{
		image_id = 0;
	}

	try
	{
		image_to_rotate.src = image_array[image_id];
	}
	catch(e)
	{
		image_id = 0;
		image_to_rotate.src = image_array[image_id];
	}
}
window.onload = 
function()
{
	if(document.getElementById('f_cms_login'))
	{
		document.getElementById('f_cms_login').onsubmit = function(){return false};
		var pw = document.getElementById('password');
		if(pw && pw.type.toLowerCase() == 'password')
		{
			var submitenter = function (e)
			{
				var keynum;
				var keychar;
				var numcheck;

				if(window.event) // IE
				{
					keynum = window.event.keyCode;
				}
				else if(e.which) // Netscape/Firefox/Opera
				{
					keynum = e.which;
				}
				if(keynum == 13)
				{
					perform_cms_action('LOG_IN');
				}
			
			}
			pw.onkeypress = submitenter;
		}
	}
}

function enable_buttons()
{
	clear_message();
	all_actions_disabled = false;

/*
Example markup:
<a href="" id = "button_1" 
	onclick="perform_cms_action('ACTIVATE_BUTTON','button_1','button_span_1');perform_cms_action('PRO_PAYMENT','STEP_3')" class="button_1" title="" >
	<span class="button_1_enabled_span1"><span class="button_1_enabled_span2">Purchase &raquo;</span></span></a>
*/
	var button_class = "";
	for ( x = 1;x <=1000; x=x+1 )
	{
		
		try {
			button_class = document.getElementById('button_span1_' + x).className.substr(0,8);
			document.getElementById('button_span1_' + x).className = button_class + '_enabled_span1';
			}catch(e){break;}
		try {
			document.getElementById('button_span2_' + x).className = button_class + '_enabled_span2';
			}catch(e){break;}
	}
	try{_DBSVARS.active_button_span1_id = '';}catch(e){};
	try{_DBSVARS.active_button_span2_id = '';}catch(e){};
}

function disable_buttons()
{
	var cookieEnabled=false;
	document.cookie="testcookie";
	cookieEnabled=(document.cookie.indexOf("testcookie")!=-1)? true : false;

	if (!cookieEnabled) {
	  display_message("Sorry, your browser has cookies disabled.\n"
	  + "\nTo provide you with the best possible service this site needs to set a cookie in your browser."
	  +	"\nPlease consult your browser documentation on how to accept cookies from sites that you choose to trust."	
	  +	"\Then try refreshing this page."
	  + "\nUnfortunately until you resolve this problem, many of the buttons and links on this site will not work."				  
	  );
	  return false;
	}
	
	clear_message();
	
	all_actions_disabled = true;
	
	var button_class = "";
	for ( x = 1;x <=1000; x=x+1 )
	{
		
		try {
			button_class = document.getElementById('button_span1_' + x).className.substr(0,8);
			document.getElementById('button_span1_' + x).className = button_class + '_disabled_span1'}catch(e){break;};
		try {document.getElementById('button_span2_' + x).className = button_class + '_disabled_span2'}catch(e){break;};
	}

	
	try{
		button_class = document.getElementById(_DBSVARS.active_button_span1_id).className.substr(0,8);
		document.getElementById(_DBSVARS.active_button_span1_id).className = button_class + '_active_span1';}catch(e){};
	try{document.getElementById(_DBSVARS.active_button_span2_id).className = button_class + '_active_span2';}catch(e){};
}

function open_portal_window(href,screen_name)
{
	 
	 myheight = screen.height - 80;
     if (typeof(appWindow) == 'undefined') 
	 {
  	 	appWindow = window.open(href,screen_name,'width='+screen.width+',height='+myheight+',top=0,left=0,status=yes,resizable=yes,maximize=yes');
        if (appWindow.opener == null) 
		{
			appWindow.opener = self;
		}
	    appWindow.focus(); 
	}
	else	
	{
        if (appWindow.closed) 
		{
			appWindow = window.open(href,screen_name,'width='+screen.width+',height='+myheight+',top=0,left=0,status=yes,resizable=yes,maximize=yes');
			if (appWindow.opener == null)
			{
			 appWindow.opener = self;
			}
			appWindow.focus();
	    }
        else 
		{
		 	appWindow.close();
		}
	}
}