// JScript File
var xmlHttp

function CardAjaxValidate()
{
	//is it landing page or QS results
	var isQSResults = (document.getElementById("StandardSearch")) ? false : true;
	var isValid;
	
	if (isQSResults == true)
	{
	    isValid = (checkSpecific());
	}
	else
	{
	    isValid = (ModifyForm() && checkSpecific());
	}

	if (isValid)  
	{
	    SubmitF();
	}
	else
	{
	    return false;
	}
}

function SubmitF() // cannot use the name of submitForm as this is used in FIS template
{
    if (document.getElementById('OvertureAds'))
    {
        document.getElementById('OvertureAds').innerHTML = '';
    }
    document.CardsForm.submit();
}

function cycle() {
    var answer = '';
    for (var i = 0; i<document.CardsForm.elements.length; i++)
    {
        if ((document.formName.elements[i].type == 'text'))
        {
            answer += document.formName.elements[i].value + ' ';
        }
    }
    document.formName.answer.value = answer;
}