<!--
var sizeSelected = 'none';
function changeSize(image) {
	if (sizeSelected!='none') {
		if (document.all) {
			document.all(sizeSelected).className='';
			document.all(image).className='selected';
			sizeSelected = image;
		} else if (document.getElementById) {
			document.getElementById(sizeSelected).className='';
			document.getElementById(image).className='selected';
			sizeSelected = image;
		}
	} else {
		if (document.all) {
			document.all(image).className='selected';
			sizeSelected = image;
		} else if (document.getElementById) {
			document.getElementById(image).className='selected';
			sizeSelected = image;
		}
	}
}

function popUpWindow(URLStr, windowSettings) 
{
var popUpWin;
if (windowSettings=='') {windowSettings='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=420,height=320,top=100,left=100,screenX=100,screenY=100'}
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', windowSettings);
}

function doSubmit(page) {
	document.forms[0].action=page;
	document.forms[0].submit();
}

var interval;
var counter;
var previousitem;
var thisitem
counter=0;
startSlideShow();
function startSlideShow(){
	interval = setInterval('nextSlide()',6000);
}
function nextSlide() {
	previousitem = 'focus' + (counter-1);
	thisitem = 'focus' + counter;
	if (document.all) {
		if (document.all(thisitem)) {
			if (document.all(previousitem)){document.all(previousitem).style.zIndex='-1';}
			document.all(thisitem).style.zIndex='1';
			counter=counter+1;
		} else {
			resetSildeShow();
		}
	} else if (document.getElementById) {
		if (document.getElementById(thisitem)) {
			if (document.getElementById(previousitem)){document.getElementById(previousitem).style.zIndex='-1';}
			document.getElementById(thisitem).style.zIndex='1';
			counter=counter+1;
		} else {
			resetSildeShow();
		}
	}
}
function resetSildeShow() {
counter = 0;
	if (document.all) {
		if (document.all(previousitem)){document.all(previousitem).style.zIndex='-1';}
		if (document.all('focus0')){document.all('focus0').style.zIndex='1';}
	} else if (document.getElementById) {
		if (document.getElementById(previousitem)){document.getElementById(previousitem).style.zIndex='-1';}
		if (document.getElementById('focus0')){document.getElementById('focus0').style.zIndex='1';}
	}
}
function pauseSlideShow(){
	clearInterval(interval);
}
		

function login(id,action) {
	if (document.all) {
		if (id=='userid') {
			if (document.all(id).value=='') {
				document.all(id).value='userID'
				document.all(id).style.color='#999999'
			} else if (document.all(id).value=='userID') {
				if (action=='focus') {
				document.all(id).value=''
				document.all(id).style.color='#000000'
				} else {
				document.all(id).style.color='#999999'
				}
			} else {
				document.all(id).style.color='#000000'
			}
		} else {
			if (document.all(id).value=='') {
				document.all(id).value='password'
				document.all(id).style.color='#999999'
			} else if (document.all(id).value=='password') {
				if (action=='focus') {
				document.all(id).value=''
				document.all(id).style.color='#000000'
				} else {
				document.all(id).style.color='#999999'
				}
			} else {
				document.all(id).style.color='#000000'
			}
		}
	} else if (document.getElementById) {
		if (id=='userid') {
			if (document.getElementById(id).value=='') {
				document.getElementById(id).value='userID'
				document.getElementById(id).style.color='#999999'
			} else if (document.getElementById(id).value=='userID') {
				if (action=='focus') {
				document.getElementById(id).value=''
				document.getElementById(id).style.color='#000000'
				} else {
				document.getElementById(id).style.color='#999999'
				}
			} else {
				document.getElementById(id).style.color='#000000'
			}
		} else if (id=='password') {
			if (document.getElementById(id).value=='') {
				document.getElementById(id).value='password'
				document.getElementById(id).style.color='#999999'
			} else if (document.getElementById(id).value=='password') {
				if (action=='focus') {
				document.getElementById(id).value=''
				document.getElementById(id).style.color='#000000'
				} else {
				document.getElementById(id).style.color='#999999'
				}
			} else {
				document.getElementById(id).style.color='#000000'
			}
		}
	}
}

function signup(id,action) {
	if (document.all) {
		if (document.all(id).value=='') {
			document.all(id).value='your email'
			document.all(id).style.color='#999999'
		} else if (document.all(id).value=='your email') {
			if (action=='focus') {
			document.all(id).value=''
			document.all(id).style.color='#000000'
			} else {
			document.all(id).style.color='#999999'
			}
		} else {
			document.all(id).style.color='#000000'
		}
	} else if (document.getElementById) {
		if (document.getElementById(id).value=='') {
			document.getElementById(id).value='your email'
			document.getElementById(id).style.color='#999999'
		} else if (document.getElementById(id).value=='your email') {
			if (action=='focus') {
			document.getElementById(id).value=''
			document.getElementById(id).style.color='#000000'
			} else {
			document.getElementById(id).style.color='#999999'
			}
		} else {
			document.getElementById(id).style.color='#000000'
		}
	}
}

var button;
function KeyDownHandler()
{
    // process only the Enter key
    if (event.keyCode == 13)
    {
        if (button) {
			// cancel the default submit
			event.returnValue=false;
			event.cancel = true;
			// submit the form by programmatically clicking the specified button
			button.click();
        } else {
			// cancel the default submit
			event.returnValue=false;
			event.cancel = true;
        }
    }
}
function setButton(id) {
	button = document.getElementById(id)
}

function showOutros() {
	if (document.getElementById('forma_juridica').value == 'Outra') {
	document.getElementById('outra_forma').disabled = '';
	document.getElementById('outra_forma').className = 'fld';
	document.getElementById('td_outra_forma').className = 'label';
	//alert('ola');
	}
	else {
	document.getElementById('outra_forma').disabled = 'true';
	document.getElementById('outra_forma').className = 'fld_disabled';
	document.getElementById('td_outra_forma').className = 'label_disabled';
	}
}
//-->