			loaded=0;
			d=window.document;			r = 0 ;
			ds=[] ;			oe=[] ;			function init()
			{				if(!d.getElementById)return;
				r=d.getElementById("tbodyroot");
				e=r.getElementsByTagName("tr");
				ns=[];
				for(i=0;i<e.length;ns.push(e.item(i++)));					for(j=0;j<ot.length;j++){o=ot[j];c=oe[j]=[];if(o==undefined||o==null)break;if(o.length <= 0)for(i=0;i<ns.length;c.push(ns[i++]) );else for(i=0;i<ns.length;c.push(ns[o[i++]]));}				for(i=0;i<dd.length;ds.push(d.getElementById('dm'+(++i))));
				for(i=0;i<tt.length;i++){n=d.getElementById('th'+(i+1));n.setAttribute("title",tt[i]);n.style.border='2px outset';n.style.background='#ccc'}				loaded=1 ;			}
			function sort( c )
			{
				if(!d.getElementById)return;
				for(j=0;j<ds.length;j++)for(o=ds[j];o.hasChildNodes();o.removeChild(o.firstChild));
				for(;r.hasChildNodes();r.removeChild(r.firstChild));
				o=oe[c];				if(dr[c])for(i=0;i<o.length;r.appendChild(o[i++]));else for(i=(o.length-1);i>=0;r.appendChild(o[i--]));
				ds[c].appendChild(d.createTextNode(dr[c]?"▲":"▼"));
				for(i=0;i<dr.length;i++){dr[i]=(i==c?dr[i]^1:dd[i])}
			}
			function go(t,r) {if( document.images ){(new Image()).src="/go?r="+escape(r)+"&c=gay/.&url="+escape(t.href);}return true;}
			function AdItem( id, weight, content ){
				this.id = id ;
				this.weight = weight ;
				this.content = content ;
			}
			function AdGroup( id, itemarray ){
				this.id = id ;
				this.items = [] ;
				this.exists = [] ;
				for( var prop in itemarray ){
					var o ;
					o = itemarray[ prop ] ;
					if( o == undefined || o[0] == undefined || o[1] == undefined || o[2] == undefined ){
						continue ;
					}
					this.items.push( new AdItem( o[0], o[1], o[2] ) ) ;
				}
				this.select = AdGroup_select ;
				this.output = ADGroup_output ;
			}
			function AdGroup_select(){
				var weight ;
				weight = [] ;
				for( var i = 0 ; i < this.items.length ; i ++ ){
					if( this.exists[ i ] ){
						continue ;
					}
					for( var j = 0 ; j < (this.items.length - 1 ) * ( this.items[ i ].weight - 1 ) + 1 ; j ++ ){
						weight.push( i ) ;
					}
				}
				var currentIdx ;
				currentIdx = weight[ new Date().getTime() % weight.length ] ;
				this.exists[ currentIdx ] = 1 ;
				return this.items[ currentIdx ] ;
			}
				
			function ADGroup_output(){
				var item ;
				item = this.select() ;
				if( item == undefined) return "" ;
				var s ;
				s = "" ;
				s += "<span onmousedown='clk(\"" + this.id + "\",\"" + item.id + "\")' style='margin:0;padding:0'>" ;
				s += item.content ;s += "</span>" ;
				s += "<br>" ;vw( this.id, item.id ) ;
				return s ;
			}
			
			function vw( g, i ){
				if( document.images ){
					(new Image()).src="/vw?g="+escape(g)+"&i="+escape(i) ;
				}
			}
			function clk( g, i ) {if( document.images ){(new Image()).src="/clk?g="+escape(g)+"&i="+escape(i) ;}return true;}
