// JavaScript Document

function FormCheck(t, dsName) {
	t.__Application.value = "Form Values";
	for (var kj=0; kj<dsName.length; kj+=1) 
	{
		var allData = dsName[kj].getData();
		var length = dsName[kj].getData(true).length;
		var looplength = length-1;
		for (qw=0;qw<=looplength;qw++)
			{
			var type = allData[qw]["type"];
			var name = allData[qw]["name"];
			var title = allData[qw]["title"];
			var value = allData[qw]["value"];
			if (type=="radioButton"){
				var valueExisting = allData[qw]["value"];
				var radioGroup=document.getElementsByName(name);
				var radioGroupLength = radioGroup.length -1;
				var radioItem = document.getElementById(value);
				for (var j=0; j < radioGroupLength; j++)
				{
				   	if (radioItem.checked)
					{
						t.__Application.value += "\n"+title+":"+valueExisting;
					}
				}
			}
			else if (type=="checkBox"){
				var formName = document.getElementById(name);
				if (formName.checked==true) 
					{
						t.__Application.value+= "\n"+title;
				}
			}
			else if (type=="dropDownMenu"){
				var formValue = document.getElementById(name).value;
				var myArr = value.split(',');
				if (myArr[0]!=formValue){
					t.__Application.value += "\n"+title+":"+formValue;
				}
			}
			else {
				var formValue = document.getElementById(name).value;
				if (formValue != "" && formValue != value){
				t.__Application.value += "\n"+title+":"+formValue;
				}
			}
		}
	}
		//alert(t.__Application.value);
}





