﻿// -- get all the input elements in the document

function DisableAllButtons()
{
   var x=document.getElementsByTagName('input')           
    for (i=0; i<x.length;i++)
     {
    	if (x[i].getAttribute('type')=='button' || x[i].getAttribute('type')=='submit' || x[i].getAttribute('type')=='reset') 
    	{
		    x[i].className='myButtonOtherDisabled';
		    x[i].disabled = true;
        }
                
	    if (x[i].getAttribute('type')=='text' || x[i].getAttribute('type')=='password') 
	    {
		   x[i].classname = 'myTextDisabled';
	    }
    }
}

function ConvertStyle() 
{
    var x=document.getElementsByTagName('input')           

    for (i=0; i<x.length;i++) {
	
	if (x[i].getAttribute('type')=='checkbox') {
		
		x[i].className='myCheck';

	}

	if (x[i].getAttribute('type')=='radio') {

		x[i].className='myRadio';

	}

	if (x[i].getAttribute('type')=='text') {

		x[i].className='myText';

	}

	if (x[i].getAttribute('type')=='submit') {

		x[i].className='mySubmit';

	}

	if (x[i].getAttribute('type')=='reset') {

		x[i].className='myReset';

	}

	if (x[i].getAttribute('type')=='button') {

		x[i].className='myButton';

	}

}

}
