function logininput_movebg(pos, elem)
{
	var divelem = elem.parentNode.parentNode;
	divelem.style.backgroundPosition = '0px ' + pos + 'px';
	return true;
}

function do_currenttime()
{
	var obj = document.getElementById('currenttime');
	var date = new Date();
	date.setTime(date.getTime() + avetime);
	var h, m, s, str;
	h = date.getHours();
	m = date.getMinutes();
	s = date.getSeconds();
	str = (h < 10 ? '0' : '') + h + ':' + (m < 10 ? '0' : '') + m;
	obj.innerHTML = str;
	setTimeout(function() { do_currenttime(); }, 2000);
	
	return true;
}

function open_pmmessage(messid)
{
	do_ajax(http_path+'getajax/pmmessage/'+messid+'.html', true, function()
	{
		var texta = responseXML;
		var divobjs = document.getElementById('message_view').getElementsByTagName('div');
		var res = texta.getElementsByTagName('div');
		divobjs[0].innerHTML = res[3].innerHTML;
		divobjs[2].innerHTML = '<div class="itemtitle"><span>'+res[0].innerHTML+'</span> &nbsp; / &nbsp; '+res[2].innerHTML+'</div><div class="clear"></div> <div class="innertext">'+res[1].innerHTML+'</div>';
		
		document.getElementById('message_view').style.display = 'block';
		var tmprow = document.getElementById('messagerow'+messid).getElementsByTagName('th');
		tmprow[0].style.fontWeight = 'normal';
		tmprow[1].style.fontWeight = 'normal';
		tmprow[2].style.fontWeight = 'normal';
	}, 'pmmessage');
	return true;
}

function addLoadEvent2(func)
{	
	var oldonload = window.onload;
	if (typeof window.onload != 'function'){
    	window.onload = func;
	} else {
		window.onload = function(){
		oldonload();
		func();
		}
	}
}