var hottopic_hmenu='';
var hottopic_page=0;

function hottopic_hmenu_ch(hmenu)
	{
	if(hmenu==hottopic_hmenu) return false;
	document.getElementById('hottopic_hmenu_'+hottopic_hmenu).className='';
	document.getElementById('hottopic_hmenu_'+hmenu).className='active';
	hottopic_hmenu=hmenu;
	hottopic_go(0);
	}

var hottopic_lastid=0;
function hottopic_more(lastid)
	{
	if(defaxlock) return false;
	defaxlock=true;
	var url='index.hottopic.more.ajax.php?lastid='+(hottopic_lastid>0?hottopic_lastid:lastid);
	defax.open('GET', url, hottopic_more_act, '');
	}
function hottopic_more_act(txt)
	{
	defaxlock=false;
	if(/^ok:/.exec(txt)!=null)
		{
		txt=txt.replace(/^ok:/,'');
		if(/^[0-9]+:/.exec(txt)!=null)
			{
			hottopic_lastid=parseInt(txt);
			txt=txt.replace(/^[0-9]+:/,'');
			var h=document.getElementById('hottopic_more').innerHTML;
			document.getElementById('hottopic_more').innerHTML=h+txt;
			}
		}
	else alert(txt);
	}

function hottopic_go(page)
	{
	if(defaxlock) return false;
	defaxlock=true;
	var url='index.hottopic.load.ajax.php?page='+page;
	if(hottopic_hmenu!='') url+='&srctype='+hottopic_hmenu;
	defax.open('GET', url, hottopic_go_act, '');
	}
function hottopic_go_act(txt)
	{
	defaxlock=false;
	if(/^ok:/.exec(txt)!=null)
		{
		txt=txt.replace(/^ok:/,'');
		if(/^[0-9]+:/.exec(txt)!=null)
			{
			hottopic_page=parseInt(txt);
			txt=txt.replace(/^[0-9]+:/,'');
			document.getElementById('hottopic_div').innerHTML=txt;
			}
		}
	else alert(txt);
	}
function hottopic_back()
	{
	if(hottopic_page>0) hottopic_go(hottopic_page-1);
	}
function hottopic_next()
	{
	hottopic_go(hottopic_page+1);
	}

function video_hl_sel(i)
	{
	if(i==video_hl_i) return true;
	document.getElementById('video_hl_sel'+video_hl_i).className='';
	document.getElementById('video_hl_sel'+i).className='active';
	video_hl_i=i;
	var hx='';
	if(video_hl[i].vtype=='postjung')
		hx='<iframe width="420" height="325" src="'+videohost+'/hilight.php?id='+video_hl[i].vid+'&autoplay=1" frameborder="0" scrolling="no" allowtransparency="true"></iframe>';
	else if(video_hl[i].vtype=='youtube')
		hx='<iframe width="420" height="325" src="http://www.youtube.com/embed/'+video_hl[i].vid+'?autoplay=1" frameborder="0" allowfullscreen></iframe>';
	document.getElementById('video_hl_div').innerHTML=hx;
	}

function pr_load(page)
	{
	if(defaxlock) return false;
	defaxlock=true;
	var url='index.pr.load.ajax.php?idrs='+pr_idrs+'&page='+page;
	defax.open('GET', url, pr_load_act, '');
	}
function pr_load_act(txt)
	{
	defaxlock=false;
	if(/^ok:/.exec(txt)!=null)
		{
		txt=txt.replace(/^ok:/,'');
		document.getElementById('pr_div').innerHTML=txt;
		}
	else alert(txt);
	}

var women_more_laststartdate=0;
var women_more_lastid=0;
function women_more(laststartdate, lastid)
	{
	if(defaxlock) return false;
	defaxlock=true;
	if(women_more_laststartdate>0) laststartdate=women_more_laststartdate;
	if(women_more_lastid>0) lastid=women_more_lastid;
	var url='index.women.more.ajax.php?laststartdate='+laststartdate+'&lastid='+lastid;
	defax.open('GET', url, women_more_act, '');
	}
function women_more_act(txt)
	{
	defaxlock=false;
	var data;
	try
		{
		data=eval('('+txt+')');
		women_more_laststartdate=data.laststartdate;
		women_more_lastid=data.lastid;
		var h=document.getElementById('women_vr_more').innerHTML;
		document.getElementById('women_vr_more').innerHTML=h+data.html;
		}
	catch (e)
		{
		document.getElementById('women_vr_more').innerHTML=txt;
		}
	}
