﻿	<!--//
		function verifyCompatibleBrowser() {
			this.ver=navigator.appVersion
			this.agent=navigator.userAgent
			this.dom=document.getElementById?1:0
			this.opera5=this.agent.indexOf("Opera 5")>-1
			this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
			this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
			this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
			this.ie=this.ie4||this.ie5||this.ie6
			this.mac=this.agent.indexOf("Mac")>-1
			this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
			this.ns4=(document.layers && !this.dom)?1:0;
			this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
			return this
		}

		bw = new verifyCompatibleBrowser();
		var NS=(document.layers);
		
		function ConstructObject(obj,nest) {
			nest=(!nest) ? '':'document.'+nest+'.'
			this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
			this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
			this.wref= bw.ns4?this.el.document:this.el;
			this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
			this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
			this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
			this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
			this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj):0;	
			this.ref=bw.dom||bw.ie4?document:this.css.document;
			this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;
			this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0
			this.w=this.evnt.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0; 
			this.h=this.evnt.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0
			this.c=0 //Clip values
			if((bw.dom || bw.ie4) && this.css.clip) {
				this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); 
				this.c=this.c.split(' ');
				for(var i=0;i<4;i++){this.c[i]=parseInt(this.c[i])}
			}
			this.ct=this.css.clip.top||this.c[0]||0; 
			this.cr=this.css.clip.right||this.c[1]||this.w||0
			this.cb=this.css.clip.bottom||this.c[2]||this.h||0; 
			this.cl=this.css.clip.left||this.c[3]||0
			this.obj = obj + "Object"
			eval(this.obj + "=this")
			return this
		}

		String.prototype.LTrim=new Function("return this.replace(/^\\s+/,'')");
		String.prototype.RTrim=new Function("return this.replace(/\\s+$/,'')");
		String.prototype.Trim= new Function("return this.replace(/^\\s+|\\s+$/g,'')");
		
		function toggleObjectDisplay(objName) {
            var obj = new ConstructObject(objName);
            
            
            if (obj.css.display == 'block') {
                obj.css.display='none';
            } else {
                obj.css.display='block';
            }
        }
        
		function toggleTbody(id, show) { 
            if (document.getElementById) { 
                var tbod = document.getElementById(id); 
                if (tbod && typeof tbod.className == 'string') { 
                    if (show) { 
                        tbod.className = 'on'; 
                    } else { 
                        tbod.className = 'off'; 
                    } 
                } 
            } 
            return false;
        } 
        	
	//-->
