
// on page load
Event.observe(window, 'load', function() {
	try
	{
			$('qq').onclick = function(){
				if((!$('ajax_form').hasClassName('qq')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'qq' }, 
						onComplete: function() { 
							$('ajax_form').className = 'qq';
							$('qq_form').onsubmit = function() {
								if(validate_qq()) { 
									//new Ajax.Request('form_req.php?m=qq', { parameters: $('qq_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();

						} 
					});
					
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

	try
	{
			$('pa').onclick = function(){
				if((!$('ajax_form').hasClassName('pa')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'pa' }, 
						onComplete: function() { 
							$('ajax_form').className = 'pa';
							$('pa_form').onsubmit = function() {
								if(validate_pa()) { 
									//new Ajax.Request('form_req.php?m=pa', { parameters: $('pa_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();
						} 
					});
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

	try
	{
			$('cb').onclick = function(){
				if((!$('ajax_form').hasClassName('cb')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'cb' }, 
						onComplete: function() { 
							$('ajax_form').className = 'cb';
							$('cb_form').onsubmit = function() {
								if(validate_cb()) { 
									//new Ajax.Request('form_req.php?m=cb', { parameters: $('cb_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();
						} 
					});
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

	try
	{
			$('cb_ah').onclick = function(){
				if((!$('ajax_form').hasClassName('cb')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'cb_ah' }, 
						onComplete: function() { 
							$('ajax_form').className = 'cb';
							$('cb_form').onsubmit = function() {
								if(validate_cb()) { 
									//new Ajax.Request('form_req.php?m=cb', { parameters: $('cb_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();
						} 
					});
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

		try
	{
			$('cb_we').onclick = function(){
				if((!$('ajax_form').hasClassName('cb')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'cb_we' }, 
						onComplete: function() { 
							$('ajax_form').className = 'cb';
							$('cb_form').onsubmit = function() {
								if(validate_cb()) { 
									//new Ajax.Request('form_req.php?m=cb', { parameters: $('cb_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();
						} 
					});
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

	try
	{
			$('cb_index').onclick = function(){
				if((!$('ajax_form').hasClassName('cb')) || ($('ajax_form').style.display='none')) {
					// update form
					new Ajax.Updater('ajax_form', 'ajax_get.php', {  
						parameters: { m: 'cb_index' }, 
						onComplete: function() { 
							$('ajax_form').className = 'cb';
							$('cb_form').onsubmit = function() {
								if(validate_cb()) { 
									//new Ajax.Request('form_req.php?m=cb', { parameters: $('cb_form').serialize(true) }); 
									return true; 
								} else { 
									return false; 
								}
							}
							$('ajax_form').show();
						} 
					});
				} else { 
					$('ajax_form').hide();
				} 
				return false;
			}
	}
	catch (e) { }

});