function indexerobject(){
	this.userinfo = function(){
		Ajax.xml('userinfo','userinfo');
	}
	this.vlogincper = true;
	this.vlogin = function(results,urls){
		var theform = document.wane_login;
		if (results){
			var altmsg = '';
			var extjav = '';
			switch (results){
				case 'uu' : altmsg = jslang.login_uu; extjav = 'theform.username.focus()';	break;
				case 'up' : altmsg = jslang.login_up; extjav = 'theform.password.focus()';	break;
				case 'uc' : altmsg = jslang.login_uc; extjav = 'theform.certid.focus()';	break;
				case 'iu' : altmsg = jslang.login_iu; extjav = 'theform.username.focus()';	break;
				case 'ip' : altmsg = jslang.login_ip; extjav = 'theform.password.focus()';	break;
				case 'ic' : altmsg = jslang.login_ic; extjav = 'theform.certid.focus()';	break;
				case 'ss' : this.vlogincper ? window.location = urls : this.userinfo();		break;
			}
			if (altmsg != ''){
				alert(altmsg);
				if (theform.Submit.disabled){
					theform.Submit.disabled = false;
				}
			}
			if (extjav != ''){
				eval(extjav);
			}
		}else{
			if (theform.username.value == ''){
				this.vlogin('uu');
				return false;
			}else if (theform.password.value == ''){
				this.vlogin('up');
				return false;
			}else if (theform.certid && theform.certid.value == ''){
				this.vlogin('ic');
				return false;
			}else{
				theform.Submit.disabled = true;
			}
		}
	}
	this.vlogout = function(results){
		if (results){
			this.userinfo();
		}else{
			Ajax.xml('logout');
		}
	}
	this.schjname = function(results,url){
		var theform = document.wane_search_jname;
		if (results){
			this.tmpmsg = '';
			switch (results){
				case 'nojwords' 	: this.tmpmsg = jslang.nojwords;	theform.keywords.focus();	break;
				case 'noschdata'	: this.tmpmsg = jslang.noschdata;	theform.keywords.focus();	break;
			}
			if (this.tmpmsg != ''){
				alert(this.tmpmsg);
				if (theform.Submit.disabled){
					theform.Submit.disabled = false;
				}
			}
		}else{
			if (theform.keywords.value == ''){
				this.schjname('nojwords');
				return false;
			}else{
				theform.Submit.disabled = true;
			}
		}
	}
	this.schcname = function(results,url){
		var theform = document.wane_search_cname;
		if (results){
			this.tmpmsg = '';
			switch (results){
				case 'nocwords' 	: this.tmpmsg = jslang.nocwords;	theform.keywords.focus();	break;
				case 'noschdata'	: this.tmpmsg = jslang.noschdata;	theform.keywords.focus();	break;
			}
			if (this.tmpmsg != ''){
				alert(this.tmpmsg);
				if (theform.Submit.disabled){
					theform.Submit.disabled = false;
				}
			}
		}else{
			if (theform.keywords.value == ''){
				this.schcname('nocwords');
				return false;
			}else{
				theform.Submit.disabled = true;
			}
		}
	}
	this.location = function(url){
		window.location = url;
	}
}
indexer = new indexerobject();