function submitform()
{
  document.myform.submit();
}

function toggleFAQ(faq) {
	var e = document.getElementById(faq);
	if (e.style.display == '') 
		e.style.display = "none";
	if (e.style.display == "none")
		e.style.display = "block";
	else
		e.style.display = "none";
	return false;
}

function pairSelectToOther(whichCtrl,otherCtrl,otherStr)
{
	if(whichCtrl.options[whichCtrl.selectedIndex].value === otherStr)
	{
	otherCtrl.disabled = false;
	}
	else
	{
	otherCtrl.disabled = true;
	otherCtrl.value = ""; 
	} 
	return true;
} 

function confirmationDeleteContact(strPage) {
var answer = confirm("Are you sure you want to delete this contact?")
if (answer){
	window.location = strPage;
}
else{
}
}

function confirmationDeleteContacts() {
var answer = confirm("Are you sure you want to delete these contacts?")
if (answer){
	myform.action = "../engine/delcontact.asp";
	javascript: submitform()
}
else{
}
}

function confirmationDeleteNews(strPage) {
var answer = confirm("Are you sure you want to delete this news?")
if (answer){
	myform.action = strPage;
	javascript: submitform()
}
else{
}
}
function confirmationDelete(title, action_url) {
var answer = confirm("Are you sure you want to delete this " + title + "?")
if (answer){
	myform.action = action_url;
	javascript: submitform()
}
else{
}
}

function confirmationDeleteMultiple(title, action_url)
{
	var answer = confirm("Are you sure you want to delete these " + title + "?");
	if (answer)
	{
			myform.action = action_url;
			javascript: submitform();
	} else {
		return false;
	}
}

function confirmationDeleteNewsletter() {
var answer = confirm("Are you sure you want to delete these subscribers?")
if (answer){
	myform.action = "../engine/delnewsletter.asp";
	javascript: submitform()
}
else{
}
}

function confirmationDeleteRegistration() {
var answer = confirm("Are you sure you want to delete these registration list?")
if (answer){
	myform.action = "../engine/delregistration.asp";
	javascript: submitform()
}
else{
}
}

function confirmationDeleteRegisteredUser() {
var answer = confirm("Are you sure you want to delete these registratered users?")
if (answer){
	myform.action = "../engine/delregistratered_user.asp";
	javascript: submitform()
}
else{
}
}

function confirmationDelete20thRegisteredUser() {
var answer = confirm("Are you sure you want to delete these registered users?")
if (answer){
	myform.action = "../engine/del20th_registered_user.asp";
	javascript: submitform()
}
else{
}
}


function confirmationDeleteMultipleNews() {
var answer = confirm("Are you sure you want to delete these news?")
if (answer){
	myform.action = "../engine/delnews.asp";
	javascript: submitform()
}
else{
}
}


function confirmationDeleteJob(strPage) {
var answer = confirm("Are you sure you want to delete this job?")
if (answer){
	myform.action = strPage;
	javascript: submitform()
}
else{
}
}

function confirmationDeleteEvent(strPage) {
var answer = confirm("Are you sure you want to delete this event/seminar?")
if (answer){
	myform.action = strPage;
	javascript: submitform()
}
else{
}
}


function confirmationDeleteMultipleJob() {
var answer = confirm("Are you sure you want to delete these jobs?")
if (answer){
	myform.action = "../engine/deljob.asp";
	javascript: submitform()
}
else{
}
}

function confirmationDeleteMultipleEvent() {
var answer = confirm("Are you sure you want to delete these events/seminars?")
if (answer){
	myform.action = "../engine/delEvent.asp";
	javascript: submitform()
}
else{
}
}


function confirmationAddContactsToBasket() {
var answer = confirm("Are you sure you want to add these contacts to basket?")
if (answer){
	myform.action = "./doBasketAdd.asp";
	javascript: submitform()
}
}

function confirmRemoveContactsFromBasket() {
var answer = confirm("Are you sure you want to remove these contacts from basket?")
if (answer){
	myform.action = "./doBasketRemove.asp";
	javascript: submitform()
}
}

function confirmRemoveAllFromBasket() {
	var answer = confirm("Are you sure you want to REMOVE ALL contacts from basket?");
	if (answer)
	{
		myform.action = "./doBasketRemove.asp?all=true";
		javascript: submitform();
	}
}

function confirmationRestoreContacts() {
var answer = confirm("Are you sure you want to restore these contacts?")
if (answer){
	javascript: submitform()
}
else{
}
}

function checkAll(field)
{
	if (typeof(field.length) == 'number')
	{
		for (i = 0; i < field.length; i++)
		field[i].checked = true ;
	} else if (typeof(field) == 'object')
	{
		field.checked = true;
	}
}

function uncheckAll(field)
{
	if (typeof(field.length) == 'number')
	{
		for (i = 0; i < field.length; i++)
		field[i].checked = false;
	} else if (typeof(field) == 'object')
	{
		field.checked = false;
	}
}


function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

