// JavaScript Document

function isnum(vFieldValue)
{
    var icnt;
	icnt = 0;
	var icode;
	icode = 0;
	var str = vFieldValue.value;
	
	    for (icnt=0;icnt < str.length; icnt++)
	    {
		    icode = str.charCodeAt(icnt)
	 	    if (!((icode >= 48) && (icode<=57)))
		    {
			    alert("Enter numerics only");
			    vFieldValue.focus();
			    return false;
		    }
	    }
	    return true;
}
// Polling place form JS

function submitfrmPP()
{
	var PPZip;
	PPZip= document.vtPollingPlace.txtzipcode;
	  
	if((PPZip.value) == null || (PPZip.value) != "")
	{
			if (isnum(PPZip))
			{
				document.vtPollingPlace.submit();
			}
	}
	else
	{
		alert('Please enter 5 digit Zipcode');
		return false;
	} 
}

function vtSubmitfrm()
{
	document.vtwebstick.action =  "http://www.statedemocracy.org/abDefault.aspx";
	document.vtwebstick.MType.value = 'VT'
	document.vtwebstick.method = "get";
	document.vtwebstick.submit(); 
}

function abSubmitfrm()
{
	document.abwebstick.action =  "http://www.statedemocracy.org/abDefault.aspx";
	document.abwebstick.MType.value = 'AB'
	document.abwebstick.method = "get";
	document.abwebstick.submit(); 
}