
// this file have abridge for simple use
	var g_fixrow=1;
	var g_singleselect=1;
	
	function overtr(){
		var otr;
		try{
			otr=event.srcElement;
			if(otr.tagName=="TD")otr=otr.parentElement;
			g_overit(otr,true);
		}catch(e){alert(e);}
	}
	function outtr(){
		var otr;
		try{
			otr=event.srcElement;
			if(otr.tagName=="TD")otr=otr.parentElement;
			g_overit(otr,false);
		}catch(e){alert(e);}
	}
	function trclick(){
		var otr;
		try{
			otr=event.srcElement;
			if(otr.tagName=="TD")otr=otr.parentElement;
			g_trclick(otr,event.ctrlKey);
		}catch(e){
			//alert(e);
		}
	}
	
	function outth(){
		var otr;
		try{
			otr=event.srcElement;
			if(otr.tagName=="TD")otr=otr.parentElement;
			otr.style.cursor ="default";
		}catch(e){alert(e);}
	}


	function g_overit(tr,bover)
	{
		var lc,o;
		if (!event.ctrlKey ){
			try{
				lc=tr.parentElement.childNodes.length;
				for(i=g_fixrow;i<lc;i++){
					o=tr.parentElement.childNodes(i);
					if(o.className=="LV_rowOver")	o.className="LV_row";
				}
				if(bover){
					if(tr.className=="LV_row")tr.className="LV_rowOver";
				}
				else{
					if(tr.className=="LV_rowOver") tr.className="LV_row";
				}
			}catch(e){}
		}
		else{
			if(event.button!=1) return;
			try{
				if(! tr.parentElement.parentElement.singleselect){
					if( tr.className=="LV_row" || tr.className=="LV_rowOver"){
						tr.className="LV_rowActive";
						tr.select=true;
					}
				}
			}catch(e){alert(e);}
		}
	}
	
	function g_trclearup(tr){
		var lc,o;
		try{
			lc=tr.parentElement.childNodes.length;
			for(i=g_fixrow;i<lc;i++){
				o=tr.parentElement.childNodes(i);
				if(o.className=="LV_rowActive"){
					o.className="LV_row";
					o.select=false;
				}
			}
		}catch(e){}
	}

	function g_trclick(tr,ctrlKey)
	{
		if (!ctrlKey ) {
			try{
				g_trclearup(tr)
				tr.className="LV_rowActive";
				tr.select=true;
			}catch(e){}
		}
		else {
			try{
				if(tr.parentElement.parentElement.tagName=="TABLE" &&( ! g_singleselect)){
					if( tr.className=="LV_rowActive"){
						tr.className="LV_row";
						tr.select=false;
					}
					else{
						tr.className="LV_rowActive";
						tr.select=true;
					}
				}
			}catch(e){alert(e);}
		}
	}
	function lv_getversion(){return("listview 1.1 beta \r\n by John Zhang.");}
	

	function gopage(newpage){
		dataform.elements("page").value=newpage;
		dataform.submit();
	}
