/**
 * Page
 *
 * @version 1.1
 *
 * Version Control
 *
 * 1.1		Added function onLoaded()
 */
function usr_Page()
{
	/**
	 * Class objects
	 */
	this.obj_lib_ajax = new lib_Ajax();




	/**
	 * Perform on done loading page
	 *
	 * @param string element
	 */
	this.onLoaded = function(element)
	{
		if(element == '' || document.getElementById(element))
		{
		}
	}




	/**
	 * Go to catalog page
	 *
	 * @param string path
	 */
	this.gotoCatalog = function(path)
	{
		var act = "window.location.href = '"+path+"'";
		setTimeout(act, 250);
	}




	/**
	 * Set language path
	 *
	 * @param string language
	 */
	this.setLanguagePath = function(language)
	{
		var parameters = 'act=' + 'setLanguagePath'
					   + '&language=' + language
					   + '&path=' + window.location.href;

		obj_usr_page.obj_lib_ajax.postAjax('/setlanguage.php', parameters, this.callbackAjax_setLanguagePath);
	}

	this.callbackAjax_setLanguagePath = function()
	{
		obj_usr_page.obj_lib_ajax.callbackAjax('div_language', 3, 1);
		if(document.getElementById('hidden_newPath'))
		{
			var newPath = document.getElementById('hidden_newPath').value;
			if(newPath != '')
			{
				window.location.href = newPath;
			}
		}
	}
}

