	var ri = 0;
	if (getParam('ri'))
		ri = getParam('ri');
	//alert("Ri = " + ri);
	function changePage()
	{
		click_aww();
		this.window.focus();
		this.document.location = pages[Math.round(Math.random()*(pages.length-1))]+"?ri="+ri;
	}
	function getParam(paramName)
	{   var url=document.URL.replace(paramName,'');
	   if ((left=url.indexOf('?='))<0) if ((left=url.indexOf('&='))<0) return '';
	   return (right=url.indexOf('&',left+1))<0?url.substr(left+2):url.substr(left+2,right-left-2);
	}
	function click_aww() 
	{
		//alert("Ri = " + ri);
		ri++;	
		var children = document.getElementsByTagName('td');
	    var l = children.length;	    
	    for(i=0;i<l;i++)
			if (children[i].className=='ac1')
				children[i].onclick=new Function('window.open("' + results[ri][3] + '"); click_aww(); return false;');			    
	}
	function init_aw(){
		if (ri>results.length) ri = 0;
		var children = document.getElementsByTagName('td');
	    var l = children.length;	    
	    for(i=0;i<l;i++){
			if (children[i].className=='ac1'){
			    children[i].onmouseover=function (){this.className='ach1';};
			    children[i].onmouseout=function (){this.className='ac1';};
				children[i].onclick=new Function('window.open("' + results[ri][3] + '");return false;');			
				children[i].onmouseup=new Function('setTimeout("changePage()",1000); return false;');					
			}
	    }
		var children = document.getElementsByTagName('a');
	    var l = children.length;
		for(i=0;i<l;i++){			
			if (children[i].className=='it2'){
				children[i].onmouseup = new Function('setTimeout("changePage()",1000); return false;');				
			}				
		}
	}