/*!
**********************************************************************
@file WizardRadioButton1.js

Copyright 2003-2008 Adobe Systems Incorporated.                     
All Rights Reserved.                                                
                                                                    
NOTICE: All information contained herein is the property of Adobe   
Systems Incorporated.                                                                                                                    

***********************************************************************
*/
/**
WizardRadioButton1 widget for handling image based radio button
*/

function WizardRadioButton1(inId, inClName, addToContainer, onClickFunc, inState)
{
	this.base=WizardImage1;
	
	this.base(kImgRadioButtonOff, inId, inClName, addToContainer, onClickFunc);
	//this.prototype = new WizardImage1(kImgRadioButtonOff, inId, inClName, addToContainer, onClickFunc);
	
	//default state
	if(inState)//should be on
	{
		this.SetSrc(kImgRadioButtonOn);
	}
	else//should be off
	{
		this.SetSrc(kImgRadioButtonOff);
	}
}

//WizardRadioButton1.prototype = new WizardImage1;
WizardRadioButton1.prototype = WizardImage1.prototype;

WizardRadioButton1.prototype.SetRadioState = function(inState)
{
	var thisCB = this;
    if(inState)//should be on
	{
		this.SetSrc(kImgRadioButtonOn);
		if(this.WizardRadioButtonSet)
		{
			this.WizardRadioButtonSet.updateAllRadioButtons(thisCB);
		}
	}
	else//should be off
	{
		this.SetSrc(kImgRadioButtonOff);
	}
}

WizardRadioButton1.prototype.GetRadioState = function()
{
	if(this.GetSrc().indexOf(kImgRadioButtonOn) != -1)
		return true;
	else
		return false;
}
