
/*function submitForm(){
            if(CheckGuideMeQuestion())
            {
                 document.planform.submit();
                return true;
            }
            else
                return false;
}*/

function buttonIsset(targ){
	
}

function activateForm(){
	var contentRight=document.getElementById('content_right');
	var ul=contentRight.getElementsByTagName('ul');
	var li=contentRight.getElementsByTagName('li');
	var submitButton=document.getElementById('submit');
	
	submitButton.onmouseover=function(){
		this.style.backgroundPosition='0px -31px';
	}
	submitButton.onmouseout=function(){
		this.style.backgroundPosition='0px 0px';
	}
	submitButton.onmouseup=function(){
		//submitForm();
	}
	
	for(i=0;i<li.length;i++){
		li[i].onmouseover=function(){
			//this.style.backgroundImage='url(images/toggle_btn_on.gif)';
			this.style.backgroundPosition='0px -'+this.offsetHeight+'px';
			this.style.color='#ffffff';
		}
		li[i].onmouseout=function(){
//set individal values in hidden field
//if that value matches this value - button_on:button_off
			set=eval('document.planform.'+this.parentNode.id);
			if(set.value!=this.firstChild.innerHTML){
				//this.style.backgroundImage='url(images/toggle_btn_off.gif)';
				this.style.backgroundPosition='0px 0px';
				this.style.color='#666666';	
			}
		}
		li[i].onmouseup=function(){
			set=eval('document.planform.'+this.parentNode.id);
			newVal=this.firstChild.innerHTML;
			set.value=newVal;

			buttonGroup=this.parentNode.getElementsByTagName('li');
			for(i=0;i<buttonGroup.length;i++){
				if(buttonGroup[i]==this)
					//buttonGroup[i].style.backgroundImage='url(images/toggle_btn_on.gif)';
					buttonGroup[i].style.backgroundPosition='0px -'+this.offsetHeight+'px';
				else
					//buttonGroup[i].style.backgroundImage='url(images/toggle_btn_off.gif)';
					buttonGroup[i].style.backgroundPosition='0px 0px';
					buttonGroup[i].style.color='#666666';
			}
			this.style.color='#ffffff';
		}
	}
}

function addEvent(elm, evType, fn, useCapture){
	if(elm.addEventListener){//firefox, safari, chrome, opera
		elm.addEventListener(evType, fn, useCapture);
		return true;
	}else if(elm.attachEvent){//ie
		var r = elm.attachEvent('on' + evType, fn);
		return r;
	}else{
		elm['on' + evType] = fn;
	}
}
addEvent(window, 'load', activateForm, false);
