function reload_image(id, mysrc)
{
	var rand_value = Math.floor(Math.random()*200);
	document.getElementById(id).src=mysrc+'?'+rand_value;
}
function sel_menu(id)
{
	var a = document.getElementById('menu_'+id);
	if(a)
	{
		a.style.color='#FF9900';
	}
}
function unsel_menu(id)
{
	var a = document.getElementById('menu_'+id);
	if(a)
	{
		a.style.color='';
	}
}
function check_vote(elname, msg)
{
	return true;
	var sel = false;
	var radios = document.chform.elname;
	for(var i in radios)
		if(radios[i].checked)
			sel = true;
	if(!sel)
		alert(msg);
	return sel;
}
function show_popup(id)
{
	var iall = 35;
	for(var i=1; i<=iall; i++)
	{
		if(document.getElementById('pop_'+i) != null)
		{
			document.getElementById('pop_'+i).style.display = 'none';
		}
	}
	
	document.getElementById('pop_'+id).style.display = 'block';
	
}
function close_popup(id)
{
	document.getElementById('pop_'+id).style.display = 'none';
}

function viewArchive(url, add_month)
{
	var yearselect = document.getElementById('listingArchiveYear');
	var monthselect = document.getElementById('listingArchiveMonth');
	if(yearselect.selectedIndex == 0 && monthselect.selectedIndex > 0)
		return true;
	else if(yearselect.selectedIndex > 0)
	{
		url += ('?archive=' + yearselect.options[yearselect.selectedIndex].value + '/');
		if(add_month || monthselect.selectedIndex > 0)
			url += monthselect.options[monthselect.selectedIndex].value;
	}
	window.location.href = url;
}
function clearText(val)
{
	if(document.getElementById('subscriber').value == val)
	{
		document.getElementById('subscriber').value = '';
	}
}

function confirmMsg(msg)
{
	return confirm(msg) || false;
}

function change_lang(sel)
{
	window.location.href = document.getElementById('lang_link_'+sel.options[sel.selectedIndex].value).href;
}

function show_and_hide(id, ms)
{
	document.getElementById(id).style.display = 'block';
	setTimeout("document.getElementById('"+id+"').style.display='none';", ms);
}
function show_hide(elemId, show)
{
	elem = document.getElementById(elemId);
	if(elem == null)
		return;
	if(show == 1)
		elem.style.display = 'inline';
	else if(show == 0)
		elem.style.display = 'none';
	else if(elem.style.display == 'none')
		elem.style.display = 'inline';
	else
		elem.style.display = 'none';
}

var show_quote = -1;
function slide_quote()
{
	curr = $('#bannerRight_'+show_quote);
	show_quote++;
	next = $('#bannerRight_'+show_quote);
	if(next.length == 0)
	{
		if(show_quote <= 1)
			return;
		show_quote = 0
		next = $('#bannerRight_'+show_quote);
	}
	if(curr.length > 0)
		curr.fadeOut('slow');
	if(next.length > 0)
		next.fadeIn('slow');
	setTimeout("slide_quote()", 30000);
}

