// JavaScript Document
<!--*****Trembling text ***********-->

var ns6=document.getElementById&&!document.all
var ie=document.all

var customcollect=new Array()
var i=0

function jiggleit(num){
if ((!document.all&&!document.getElementById)) return;
customcollect[num].style.left=(parseInt(customcollect[num].style.left)==-1)? customcollect[num].style.left=1 : customcollect[num].style.left=-1
}

function init(){
if (ie){
while (eval("document.all.jiggle"+i)!=null){
customcollect[i]= eval("document.all.jiggle"+i)
i++
} 
}
else if (ns6){
while (document.getElementById("jiggle"+i)!=null){
customcollect[i]= document.getElementById("jiggle"+i)
i++
}
}

if (customcollect.length==1)
setInterval("jiggleit(0)",80)
else if (customcollect.length>1)
for (y=0;y<customcollect.length;y++){
var tempvariable='setInterval("jiggleit('+y+')",'+'100)'
eval(tempvariable)
}
}

window.onload=init


<!--end of trembling text*****-->

function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("Name", "LName", "Address", "ContactPhoneNum", "YourComments", "TheHour", "TheMin", "AMPM", "TheMonth", "TheDate", "TheYear", "TheLocation", "Wasted", "ViolationNature");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("Please enter your name", "Your last name", "The street address", "Your contact Phone Number", "Your Comments", "The approximate violation HOUR", "The aproximate MINUTE", "Was it AM or PM", "The violation MONTH", "The DATE", "The year", "Was it a RESIDENCE or BUSINESS location", "Type of Water Wasted", "Please briefly describe the nature of the violation");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}

//* =====================Open new window================================ *//

function open_win()
{
window.open("http://water.cobbcountyga.govimages3/protruding.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

function open_win2()
{
window.open("http://water.cobbcountyga.govimages3/hole.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

function open_win3()
{
window.open("http://water.cobbcountyga.govimages3/crack.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

function open_win4()
{
window.open("http://water.cobbcountyga.govimages3/offset.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

function open_win5()
{
window.open("http://water.cobbcountyga.govimages3/crackRoot.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

function open_win6()
{
window.open("http://water.cobbcountyga.govimages3/rootBlge.htm","_blank","toolbar=yes, location=no, directories=no, status=no, menubar=yes, scrollbars=no, resizable=no, copyhistory=yes, width=400, height=400");
}

//*  Blinking text *//

function blinking_pmtLink()
{
if (!document.getElementById('blink').style.color)
	{
	document.getElementById('blink').style.color="blue";
	}
if (document.getElementById('blink').style.color=="blue")
	{
	document.getElementById('blink').style.color="black";
	}
else
	{
	document.getElementById('blink').style.color="blue";
	}
timer=setTimeout("blinking_pmtLink()",100);
}

function stoptimer()
{
clearTimeout(timer);
}