function f___urlencode(_0){_a=_0;_a=_a.replace(/&/gi,'%26');return _a;}// converts '&' to '%26' so that value can be uploaded as AJAX string
var _012=[];// used to hold input fields influenced by form initializer
function f___initializeFormDefault(_0,_1,_2){
	var _i,o=typeof(_0)=='string'?$(_0):_0;
	if(o){
		_i=o.id;
		if(!_012[_i]){
			_012[_i]=[];
		}
		_012[_i]._dN=o;
		_012[_i]._dV=_1?_1:o.value;
		_012[_i]._s=[];
		_012[_i]._t=o.type;
		if(o.type=='password'){
			_012[_i]._oN=new Element('input');
			_012[_i]._oN.id=_i+'2';
			_012[_i]._oN.style.width=_012[_i]._dN.style.width;
			_012[_i]._oN.style.color='#CFCFCF';
			_012[_i]._oN.style.fontStyle='italic';
			_012[_i]._dN.style.display='none';
			o.parentNode.appendChild(_012[_i]._oN);
			_012[_i]._oN.value=_1?_1:o.value;
			_012[_i]._oN.onfocus=function(){
				_012[_i]._oN.style.display='none';
				_012[_i]._dN.style.display='inline';
				_012[_i]._dN.focus();
			}
		}
		if(!_2){
			_012[_i]._s['color']='#CFCFCF';
			_012[_i]._s['fontStyle']='italic';
		}
		else{
			for(v_i in _2){
				_012[_i]._s[v_i]=_2[v_i];
			}
		}
		o.onfocus=function(){
			f___tFD(this,true);
		};
		o.onblur = function () {
			f___tFD(this,false);
		};
		f___tFD(o,false);
	}
}// sets _1 as the default value for 'input' _0 and uses array _2['color','fontStyle'] as default
function f___initializeFormDefaults(_0){
	var i,l=_0.length;
	for(i=0;i<l;i++){
		f___initializeFormDefault(_0[i]);
	}
}
function f___tFD(_0,_1,_2){
	var i,g,h,o=typeof(_0)=='string'?$(_0):_0;
	var _i=o.id;
	if(o&&_012[_i]){
		if(_012[_i]['_dV']&&_012[_i]['_s']){
			if(_1){
				for(i in _012[_i]['_s']){
					o.style[i]='';
				}
				if(o.value==_012[_i]['_dV']){
					o.value='';
				}
			}
			else {
				if(o.value==''||o.value==_012[_i]['_dV']){
					if(o.type=='password'){
						g=_2?_2:_012[_i]['_dN'];
						h=_2?$(_i+'2').parentNode:_012[_i]['_oN'];
						g.style.display='none';
						h.style.display='inline';
					}
					else {
						o.value=_012[_i]['_dV'];
						for(i in _012[_i]['_s']){
							o.style[i]=_012[_i]['_s'][i];
						}
					}
				}
			}
		}
	}
}
function f___isInputEmpty(_0){
	var o=typeof(_0)=='string'?$(_0):_0;
	if(o.value==''){return true;}
	if(_012[_0]){
		if(o.value==_012[_0]._dV){return true;}
	}
	return false;
}// returns true if the 'input' field is empty or contains default value
function f___isEmail(_0){
	var o=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return(o.test(_0));
}// used regex to determine if a text is an email address
function f___disableFields(_0,_1){
	var i,p,l,o=typeof(_0)=='string'?$(_0):_0;
	var _1=typeof(_1)!='boolean'?true:_1;
	p=o.getElementsByTagName('input');
	l=p.length;
	for(i=0;i<l;i++){
		p[i].disabled=_1;
	}
	p=o.getElementsByTagName('select');
	l=p.length;
	for(i=0;i<l;i++){
		p[i].disabled=_1;
	}
}// disables/enableds all 'input' & 'select' fields inside form '_0'
function f___emptyFields(_0){
	var i,p,o=typeof(_0)=='string'?$(_0):_0;
	p=o.getElementsByTagName('input');
	for(i=0;i<p.length;i++){
		if(p[i].type!='button'&&p[i].type!='submit'){
			p[i].value='';
			f___tFD(p[i],false);
		}
	}
	p=o.getElementsByTagName('select');
	for(i=0;i<p.length;i++){
		p[i].selectedIndex=0;
	}
}// empties 'input' and resets 'select'
function f___setValue(_0){
	var o=typeof(_0)=='string'?$(_0):_0;
	o.value=_1;
	f___tFD(o,true);
}// set the values of an 'input' or 'select' field
function f___getValue(_0,_1){
	var o=typeof(_0)=='string'?$(_0):_0;
	_1=_1?_1:false;
	if(_012[_0]){
		if(o.value==_012[_0]._dV){return'';}
	}
	return _1?f___urlencode(o.value):o.value;
}// gets the value of an 'input' or 'select' field. Applies f___urlencode if _1 is true
function f___dc(_0){return document.createElement(_0);}