// JavaScript Document
function ConfirmChoice(section, aspect_id,genre_id) {
	answer = confirm("Do you really want to delete this item?")
	if (section=='aspect-delete' && answer) {
		location = "/admin/edit_aspect_genre.php?delete=true&aspect-id="+ aspect_id+"&genre-id="+genre_id;
	}


	if (section=='type-delete' && answer) {
		location = "/admin/edit_aspect_genre.php?delete-type=true&aspect-id="+ aspect_id+"&genre-id="+genre_id;
	}
	
	
}


function confirmFaqDelete(section,faq_id)
{
	answer = confirm("Do you really want to delete this item?")
	if (section=='faq-delete' && answer) {
		location = "/admin/faq.php?mode=deleteFaq&faqid="+ faq_id;
	}	
}


function submit_form(value) {
	if(value.rating.value == "") {
		alert("Please enter Rating value");
		value.rating.focus();
		value.rating.select();
		
		return false;
	}		
}

function redirect(value,value2,value3)
{
	location="/idea.php?mode=form&drop-populate="+value+"&grouptype="+value2+"&group="+value3;
	
}

function redirect_for_type(value)
{
	location="/search.php?mode=form&grouptype="+value;
	
}

function redirect_search(value,value2)
{
	location="/search.php?mode=search_directory&drop-populate="+value+"&grouptype="+value2;
	
}

function redirect_for_type_search(value)
{
	location="http://www.fredomeideas.org/search.php?mode=search_directory&grouptype="+value;
	
}
