function submitvote()
{
var resdiv = document.getElementById('pollres');
resdiv.style.display = 'block';
var params = Form.serialize($('pollform'));
new Ajax.Updater('pollres', 'submitpollvote.php', {asynchronous:true, parameters:params, onComplete:function(){diffuseres('pollres')}});
}

function diffuseres(divId)
{
new Effect.Fade(divId, {duration: 5});
}

function validatesubt()
{
	var cate_value = document.subt_form.theme_cate.options[document.subt_form.theme_cate.selectedIndex].value;
	if (document.subt_form.theme_name.value=="")
	{
		alert('Please enter a theme name');
		document.subt_form.theme_name.focus();
		return false;
	}
	if (document.subt_form.theme_scri.value=="")
	{
		alert('Please enter the Script Name Wordpress theme');
		document.subt_form.theme_scri.focus();
		return false;
	}
	if (cate_value=="" || cate_value == "no" || cate_value=="all")
	{
		alert('Please select a theme category');
		return false;
	}
	if (document.subt_form.theme_file.value=="")
	{
		alert('Please upload the theme file');
		document.subt_form.theme_file.focus();
		return false;
	}
	if (document.subt_form.theme_screen.value=="")
	{
		alert('Please upload the theme screenshot');
		document.subt_form.theme_screen.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function pop_fth()
{
	var cat_id = $F('selcate');
	var pars = 'cat_id='+cat_id;
	var url = "populate_fth.php";
	var myAjax1 = new Ajax.Updater( 'fthpop', url, { method: 'get', parameters: pars});
}

function pop_fthpage(catid,page)
{
	var pars = 'cat_id='+catid+'&page='+page;
	var url = "populate_fth.php";
	var myAjax1 = new Ajax.Updater( 'fthpop', url, { method: 'get', parameters: pars});
}

