function initPage()
{
	clearFormFields({
		clearInputs: true,
		clearTextareas: true,
		passwordFieldText: true,
		addClassFocus: "focus",
		filterClass: "default"
	});
}
function clearFormFields(o)
{
	if (o.clearInputs == null) o.clearInputs = true;
	if (o.clearTextareas == null) o.clearTextareas = true;
	if (o.passwordFieldText == null) o.passwordFieldText = false;
	if (o.addClassFocus == null) o.addClassFocus = false;
	if (!o.filterClass) o.filterClass = "default";
	if(o.clearInputs) {
		var inputs = document.getElementsByTagName("input");
		for (var i = 0; i < inputs.length; i++ ) {
			if((inputs[i].type == "text" || inputs[i].type == "password") && inputs[i].className.indexOf(o.filterClass) == -1) {
				inputs[i].valueHtml = inputs[i].value;
				inputs[i].onfocus = function ()	{
					if(this.valueHtml == this.value) this.value = "";
					if(this.fake) {
						inputsSwap(this, this.previousSibling);
						this.previousSibling.focus();
					}
					if(o.addClassFocus && !this.fake) {
						this.className += " " + o.addClassFocus;
						this.parentNode.className += " parent-" + o.addClassFocus;
					}
				}
				inputs[i].onblur = function () {
					if(this.value == "") {
						this.value = this.valueHtml;
						if(o.passwordFieldText && this.type == "password") inputsSwap(this, this.nextSibling);
					}
					if(o.addClassFocus) {
						this.className = this.className.replace(o.addClassFocus, "");
						this.parentNode.className = this.parentNode.className.replace("parent-"+o.addClassFocus, "");
					}
				}
				if(o.passwordFieldText && inputs[i].type == "password") {
					var fakeInput = document.createElement("input");
					fakeInput.type = "text";
					fakeInput.value = inputs[i].value;
					fakeInput.className = inputs[i].className;
					fakeInput.fake = true;
					inputs[i].parentNode.insertBefore(fakeInput, inputs[i].nextSibling);
					inputsSwap(inputs[i], null);
				}
			}
		}
	}
	if(o.clearTextareas) {
		var textareas = document.getElementsByTagName("textarea");
		for(var i=0; i<textareas.length; i++) {
			if(textareas[i].className.indexOf(o.filterClass) == -1) {
				textareas[i].valueHtml = textareas[i].value;
				textareas[i].onfocus = function() {
					if(this.value == this.valueHtml) this.value = "";
					if(o.addClassFocus) {
						this.className += " " + o.addClassFocus;
						this.parentNode.className += " parent-" + o.addClassFocus;
					}
				}
				textareas[i].onblur = function() {
					if(this.value == "") this.value = this.valueHtml;
					if(o.addClassFocus) {
						this.className = this.className.replace(o.addClassFocus, "");
						this.parentNode.className = this.parentNode.className.replace("parent-"+o.addClassFocus, "");
					}
				}
			}
		}
	}
	function inputsSwap(el, el2) {
		if(el) el.style.display = "none";
		if(el2) el2.style.display = "inline";
	}
}
if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);


eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 t(a,b){g(3 u a){k c=[],e=[],p=[],d=[],5=[],l=[];8(a[3].6(\'.\')!=-1||a[3].6(\'#\')==-1){8(a[3].6(\'>\')!=-1){c[3]=a[3].f(a[3].6(\'>\')+2);a[3]=a[3].f(0,a[3].6(\'>\')-1)}8(a[3].6(\'.\')!=-1){e[3]=a[3].f(a[3].6(\'.\')+1);a[3]=a[3].f(0,a[3].6(\'.\'))}p[3]=a[3];8(!e[3])e[3]=\'\';8(c[3]){l[3]=r.q(p[3]);g(k j=0;j<l[3].o;j++){8(l[3][j].4.6(e[3])!=-1){5[3]=l[3][j].q(c[3]);g(k i=0;i<5[3].o;i++){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}}}s{5[3]=r.q(p[3]);g(k i=0;i<5[3].o;i++){8(5[3][i].4.6(e[3])!=-1){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}}}s 8(a[3].6(\'#\')!=-1){8(a[3].6(\'>\')!=-1){c[3]=a[3].f(a[3].6(\'>\')+2);a[3]=a[3].f(0,a[3].6(\'>\')-1)}a[3]=a[3].h(\'#\',\'\');d[3]=r.v(a[3]);8(d[3]){8(c[3]){5[3]=d[3].q(c[3]);g(k i=0;i<5[3].o;i++){5[3][i].n=9(){7.4+=\' \'+b};5[3][i].m=9(){7.4=7.4.h(b,\'\')}}}s{d[3].n=9(){7.4+=\' \'+b};d[3].m=9(){7.4=7.4.h(b,\'\')}}}}}}',32,32,'|||_el|className|_hoverElement|indexOf|this|if|function||||_id|_class|substr|for|replace|||var|_parent|onmouseout|onmouseover|length|_tag|getElementsByTagName|document|else|hoverForIE6|in|getElementById'.split('|'),0,{}))
function ieHover() {
	hoverForIE6(['ul > li' ], 'hover');
}
if (window.attachEvent && !window.opera){
	window.attachEvent("onload", ieHover);
}


var _id = 'nav';
var _innerEl = 'ul';
var _className = 'click';
var _hide = true;

var _menu;
var _nodes;
function initMenu() {
	_menu = document.getElementById(_id);
	if (_menu){
		_nodes = _menu.getElementsByTagName('a');
		for (var i=0; i<_nodes.length; i++) {
			if (_nodes[i].parentNode.getElementsByTagName(_innerEl)[0]) {
				_nodes[i].onclick = function () {
					if(this.parentNode.className.indexOf(_className) !=-1) {
						this.parentNode.className = this.parentNode.className.replace(_className, "");
					} else {
						if (_hide) hideLevels(this);
						this.parentNode.className += ' '+_className;
					}
					return true;
				}
			}
		}
	}
}
function hideLevels(_this){
	var _lis = _menu.getElementsByTagName('li');
	for (var i=0; i<_lis.length; i++) {
		var _f = false;
		var _a = _lis[i].getElementsByTagName('a');
		for (var j=0; j<_a.length; j++) {
			if (_a[j] == _this) _f = true;
		}
		if (!_f) _lis[i].className = _lis[i].className.replace(_className, "");
	}
}

if (window.addEventListener){
	window.addEventListener("load", initMenu, false);
	}
else if (window.attachEvent){
	window.attachEvent("onload", initMenu);
}
	
