function NavCore() {
	this.ident ='';
	
	this.displayComplaintForm = function() {
		var cform = document.createElement('div');
		cform.id = 'complaint_form';
		cform.style.position = 'absolute';
		cform.style.top = '270px';
		cform.style.width = '400px';
		cform.style.left = '25%';
		cform.style.background = '#fafafa';
		cform.style.padding = '5px';
		cform.style.border = '2px solid #333';
		cform.innerHTML = '<table width="100%" cellspacing="0" cellpadding="0"><tr><td class="navheader">Форма жалобы</td><td align="right"><div style="padding:5px; cursor:pointer;" onclick="$a(\'complaint_form\').style.display=\'none\';">X</div></td></tr></table>';
		cform.innerHTML += '<div style="margin-bottom:5px;"><textarea id="complaint_comment" style="width:100%;height:50px;"></textarea></div>';
		cform.innerHTML += '<div style="margin-bottom:5px;"><input type="submit" onclick="Nav.Complaint();" value="Отправить жалобу"></div>';
		$a('contents').appendChild(cform);
	}
	
	this.Complaint = function() {
		 var data = new Object();	
		 data['comment'] = $a('complaint_comment').value;
		 data['page_namefull'] = window.path;
		 data['action'] = 'complaint';
		 data['widget'] = 'menu_navigation';

		 this.InitializeRequest('POST', '/ajax.php');
         this.Commit(postquery(data));	
	}
		
	this.OnSuccess = function()
      {
      	//alert(this.GetResponseText());
      	eval(this.GetResponseText());
      	// fade(0,"form_"+this.ident);
      	// $a("loading_"+this.ident).style.display = 'none';
      }
}

NavCore.prototype = new ajax();
Nav = new NavCore();
