﻿
// copyright 1999-2001 Idocs, Inc. http://www.idocs.com/tags/
// Distribute this script freely, but keep this 
// notice with the code.
var resetRolls = new Object();

function resetimage(src)
{
this.src=src;
this.confirm=true;
this.alt="Reset";
this.write=resetimage_write;
}

function resetimage_write()
{
document.write('<A ');
if (this.rollover)
    {
    
    resetRolls[this.name] = new Object();
    resetRolls[this.name].over = new Image();
    resetRolls[this.name].over.src=this.rollover;
    resetRolls[this.name].out = new Image();
    resetRolls[this.name].out.src=this.src;
    document.write(
        ' onMouseOver="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].over.src"' + 
        ' onMouseOut="if (document.images)document.images[\'' + 
        this.name + '\'].src=resetRolls[\'' + this.name + '\'].out.src"'
        );
    }
document.write(' HREF="javascript:');
document.write(
    'formReset(document.forms[' + 
    (document.forms.length - 1) + ']);void(0);">');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '"');
document.write(' BORDER=0');
if (this.name)document.write(' NAME="' + this.name + '"');
if (this.height)document.write(' HEIGHT=' + this.height);
if (this.width)document.write(' WIDTH=' + this.width);
if (this.otheratts)document.write(' '+ this.otheratts);
document.write('></A>');
}

var masterId='ctl00_PageContent_';
//Dinesh Babu ,Kanagaraj (Cognizant) on Aug 4,2009: TT : 03403: Validation summary control has cleared
function clearSummary()
{
    document.getElementById(masterId+'ValidationSummary1').innerText='';
}
function formReset(form)
{
 //Dinesh Babu ,Kanagaraj (Cognizant) on Aug 4,2009: TT : 03403: Validation summary control has cleared
    clearSummary();
    var frm_elements = form.elements;
    for(i=0; i<frm_elements.length; i++) {
        var field_name = frm_elements[i].name;
        var fieldNameStartIndex = field_name.lastIndexOf("$") + 1;
        if(fieldNameStartIndex != -1) {
            field_name = field_name.substring(fieldNameStartIndex);
        }
        
        switch(field_name) {
            // Contact Us Form
            case "tbFirstName":
            case "tbLastName":
            case "tbAddress":
            case "tbCity":
            case "tbZip":
            case "tbPhone":
            case "tbEmail":
            case "tbInquiry":
                frm_elements[i].value = "";
                break;
            case "ddlCountry":
            case "ddlStates":
                frm_elements[i].selectedIndex = "0";
                break;
        
            // Customer Support Form    
            case "tbJobTitle":
            case "tbHelp":
                frm_elements[i].value = "";
                break;
            case "ddlTopic":
            case "ddlSubTopic":
            case "casDdlTopic":
            case "casDdlSubTopic":
            case "ddlUSstates":
            case "ddlReachTime":
            case "ddlTimeZone":
                frm_elements[i].selectedIndex = "0";
                break;
            case "radbtnIsAttorney":
                frm_elements[i].checked = false;
            
            default:
                break;
        }
    }
}