function checklogin()
{
	if (document.admin.username.value.length == 0)
	{
		alert("Please enter a username.");
		document.admin.username.focus();
		return false;
	}
	if (document.admin.pwd.value.length == 0)
	{
		alert("Please enter a password.");
		document.admin.pwd.focus();
		return false;
	}
	return true;
}
function checklog()
{
	if (document.login.email.value.length == 0)
	{
		alert("Please enter your email.");
		document.login.email.focus();
		return false;
	}
	return true;
}
function checkCatAdd()
{
	if (document.addcat.category.value.length == 0)
	{
		alert("Please enter a category in the space provided.");
		document.addcat.category.focus();
		return false;
	}
	return true;
}
function checkCatAddww()
{
	if (document.addwhoswhoCat.category.value.length == 0)
	{
		alert("Please enter a category in the space provided.");
		document.addwhoswhoCat.category.focus();
		return false;
	}
	return true;
}
function checkCatMod()
{
	if (document.modcat.category.value.length == 0)
	{
		alert("Cannot submit a blank value as update to the category.");
		document.modcat.category.focus();
		return false;
	}
	return true;
}
function checkCatModww()
{
	if (document.modwhoswhoCat.category.value.length == 0)
	{
		alert("Cannot submit a blank value as update to the category.");
		document.modwhoswhoCat.category.focus();
		return false;
	}
	return true;
}
function checkReg()
{
	if (document.register.name.value.length == 0)
	{
		alert("Please enter your name in the space provided.");
		document.register.name.focus();
		return false;
	}
	if (document.register.email.value.length == 0)
	{
		alert("Please enter your email address in the space provided.");
		document.register.email.focus();
		return false;
	}
	
	if ((document.register.email.value).indexOf("@") == -1)
	{
		alert("The email address entered was not valid.  Please re-enter your email address.");
		document.register.email.focus();
		return false;
	}
	
	if (document.register.interest.value.length == 0)
	{
		alert("Please specify your area of interest in the space provided.");
		document.register.interest.focus();
		return false;
	}
	return true;
}
function checkNewsAdd()
{
	if (document.addnews.category.value.length == 0)
	{
		alert("Please select a category.");
		document.addnews.category.focus();
		return false;
	}
	if (document.addnews.myTitle.value.length == 0)
	{
		alert("Please enter a title.");
		document.addnews.myTitle.focus();
		return false;
	}
	if (document.addnews.myDate.value.length == 0)
	{
		alert("Please enter a date.");
		document.addnews.myDate.focus();
		return false;
	}
	return true;
}
function checkVehicleAdd()
{
	if (document.addvehicle.categorySelect.value.length == 0)
	{
	    if (document.addvehicle.categoryEnter.value.length == 0)
	    {
		    alert("Please enter or select a category.");
		    document.addvehicle.categoryEnter.focus();
		    return false;
		}
	}
	if (document.addvehicle.subCatSelect.value.length == 0)
	{
	    if (document.addvehicle.subCatEnter.value.length == 0)
	    {
		    alert("Please enter or select a sub category.");
		    document.addvehicle.subCatEnter.focus();
		    return false;
		}
	}
	if (document.addvehicle.model.value.length == 0)
	{
		alert("Please enter the model.");
		document.addvehicle.model.focus();
		return false;
	}
	if (document.addvehicle.myPrice.value.length == 0)
	{
		alert("Please enter a price.");
		document.addvehicle.myPrice.focus();
		return false;
	}
	return true;
}
function checkVehicleMod()
{
	if (document.modvehicle.categorySelect.value.length == 0)
	{
	    if (document.modvehicle.categoryEnter.value.length == 0)
	    {
		    alert("Please enter or select a category.");
		    document.modvehicle.categoryEnter.focus();
		    return false;
		}
	}
	if (document.modvehicle.subCatSelect.value.length == 0)
	{
	    if (document.modvehicle.subCatEnter.value.length == 0)
	    {
		    alert("Please enter or select a sub category.");
		    document.modvehicle.subCatEnter.focus();
		    return false;
		}
	}
	if (document.modvehicle.model.value.length == 0)
	{
		alert("Please enter the model.");
		document.modvehicle.model.focus();
		return false;
	}
	if (document.modvehicle.myPrice.value.length == 0)
	{
		alert("Please enter a price.");
		document.modvehicle.myPrice.focus();
		return false;
	}
	return true;
}
function checkVacAdd()
{
	if (document.addvac.company.value.length == 0)
	{
		alert("Please enter the company name.");
		document.addvac.company.focus();
		return false;
	}
	if (document.addvac.pos.value.length == 0)
	{
		alert("Please enter the position.");
		document.addvac.pos.focus();
		return false;
	}
	return true;
}
function checkVacMod()
{
	if (document.modvac.company.value.length == 0)
	{
		alert("Please enter the company name.");
		document.modvac.company.focus();
		return false;
	}
	if (document.modvac.pos.value.length == 0)
	{
		alert("Please enter the position.");
		document.modvac.pos.focus();
		return false;
	}
	return true;
}
function checkAppAdd()
{
	if (document.addapp.company.value.length == 0)
	{
		alert("Please enter the company name.");
		document.addapp.company.focus();
		return false;
	}
	if (document.addapp.pos.value.length == 0)
	{
		alert("Please enter the position.");
		document.addapp.pos.focus();
		return false;
	}
	if (document.addapp.name.value.length == 0)
	{
		alert("Please enter the appointed person name.");
		document.addapp.name.focus();
		return false;
	}
	return true;
}
function checkAppMod()
{
	if (document.modapp.company.value.length == 0)
	{
		alert("Please enter the company name.");
		document.modapp.company.focus();
		return false;
	}
	if (document.modapp.pos.value.length == 0)
	{
		alert("Please enter the position.");
		document.modapp.pos.focus();
		return false;
	}
	if (document.modapp.name.value.length == 0)
	{
		alert("Please enter the appointed person name.");
		document.modapp.name.focus();
		return false;
	}
	return true;
}
function checkNewsMod()
{
	if (document.modnews.category.value.length == 0)
	{
		alert("Please select a category.");
		document.modnews.category.focus();
		return false;
	}
	if (document.modnews.myTitle.value.length == 0)
	{
		alert("Please enter a title.");
		document.modnews.myTitle.focus();
		return false;
	}
	if (document.modnews.myDate.value.length == 0)
	{
		alert("Please enter a date.");
		document.modnews.myDate.focus();
		return false;
	}
	return true;
}
function checkspecial()
{
	if (document.modspec.myTitle.value.length == 0)
	{
		alert("Please enter a title.");
		document.modspec.myTitle.focus();
		return false;
	}
	return true;
}
function checkfleet()
{
	if (document.modfleet.myTitle.value.length == 0)
	{
		alert("Please enter a title.");
		document.modfleet.myTitle.focus();
		return false;
	}
	return true;
}
function checkperson()
{
	if (document.modperson.myTitle.value.length == 0)
	{
		alert("Please enter a title.");
		document.modperson.myTitle.focus();
		return false;
	}
	return true;
}
function ConfirmCatDelete()
{
    var conf = confirm("Are you sure want to Delete this Category and ALL the articles in it?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmNewsDelete()
{
    var conf = confirm("Are you sure want to Delete this Article?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmVehicleDelete()
{
    var conf = confirm("Are you sure want to Delete this Vehicle?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmWhoswhoDelete()
{
    var conf = confirm("Are you sure want to Delete this Who's Who Result?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmVehicleAdDelete()
{
    var conf = confirm("Are you sure want to Delete this Advertisement?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmVacDelete()
{
    var conf = confirm("Are you sure want to Delete this Vacancy?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmAppDelete()
{
    var conf = confirm("Are you sure want to Delete this Appointment?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmNewsTop()
{
    var conf = confirm("Are you sure want to make this Article the Top Story?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function ConfirmMemDelete()
{
    var conf = confirm("Are you sure want to Delete this Member / Client?");
    if(true == conf){
        return true;
    }else if(false == conf){
        return false;
    }
}
function checkContact()
{
	if (document.contact.name.value.length == 0)	{		alert("Please enter your name in the space provided.");		document.contact.name.focus();
		return false;	}
	
	if (document.contact.tele.value.length == 0)	{		alert("Please enter your contact tel number in the space provided.");		document.contact.tele.focus();
		return false;	}
	
	if (document.contact.email.value.length == 0)	{		alert("Please enter your email address in the space provided.");		document.contact.email.focus();
		return false;	}		if ((document.contact.email.value).indexOf("@") == -1)	{		alert("The email address entered was not valid.  Please re-enter your email address.");		document.contact.email.focus();
		return false;	}
	
	return true;}function checkContactAd()
{
	if (document.contact_add.name.value.length == 0)	{		alert("Please enter your name in the space provided.");		document.contact_add.name.focus();
		return false;	}
	
	if (document.contact_add.company.value.length == 0)	{		alert("Please enter your company name in the space provided.");		document.contact_add.company.focus();
		return false;	}
	
	if (document.contact_add.pos.value.length == 0)	{		alert("Please enter your position in the space provided.");		document.contact_add.pos.focus();
		return false;	}
	
	if (document.contact_add.tele.value.length == 0)	{		alert("Please enter your contact tel number in the space provided.");		document.contact_add.tele.focus();
		return false;	}
	
	if (document.contact_add.email.value.length == 0)	{		alert("Please enter your email address in the space provided.");		document.contact_add.email.focus();
		return false;	}		if ((document.contact_add.email.value).indexOf("@") == -1)	{		alert("The email address entered was not valid.  Please re-enter your email address.");		document.contact_add.email.focus();
		return false;	}
	
	return true;}function checkKWsearch(form){    if (form.kw.value.length <= 2)    {        alert('Has to be at least 3 characters!');        form.kw.focus();        return false;    }}
