// JavaScript Document



var mousex = 0;

var mousey = 0;



function DiscoverMouse() {

	var event = window.event;

	mousex = event.x;

	mousey = event.y;

}



function CreateToolTip() {

	ToolTip = document.getElementById('tooltiptext');

	ToolTip.style.visibility = 'visible';

	ToolTip.style.left = mousex + 'px';

	ToolTip.style.top = mousey  + 'px';

	ToolTip.innerHTML = 'teste de tooltip';

}

	

function txtboxFocus(objTgt) {

	//DiscoverMouse();

	Tgt = document.getElementById(objTgt);

	Tgt.style.border = '1px solid #333333';

	Tgt.style.backgroundColor = '#CCCCCC'; 

	//CreateToolTip();

}



function txtboxLFocus(objTgt) {

	lTgt = document.getElementById(objTgt);

	lTgt.style.border = '1px solid #dedede';

	Tgt.style.backgroundColor = '#FFFFFF';	

}



function WhatBox(objTgt, lang) {

	var vcontent = '';

	var footer = '';



	if (lang == 'ing') { 

		vcontent = 'This packtet contains:<br>';

		footer = 'Packed with Winrar<br>';	

	}

	if (lang == 'por') { 

		vcontent = 'Esse pacote contém:<br>';

		footer = 'Compactado com Winrar<br>';		

	}

	if (lang == 'esp') { 

		vcontent = 'Este paquete contiene<br>';

		footer = 'Compactado con Winrar<br>';		

	}

	

	tgt = document.getElementById('whatsinthebox');

	document.getElementById(objTgt).style.color='#000000';

	

	if (objTgt == 'ie_p') {

		vcontent += '<B>ImageExplorer DICOM</b><br><br>';

		vcontent += 'ie_dicom_P.jpg<br>';

		vcontent += 'ie_dicom_P.gif<br>';		

		vcontent += 'ie_dicom_P_negativo.jpg<br>';		

		vcontent += 'ie_dicom_P_negativo.gif<br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ie_m') {

		vcontent += '<B>ImageExplorer DICOM</b><br><br>';

		vcontent += 'ie_dicom_M.jpg<br>';		

		vcontent += 'ie_dicom_M.gif<br>';

		vcontent += 'ie_dicom_M_negativo.jpg<br>';

		vcontent += 'ie_dicom_M_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ie_g') {

		vcontent += '<B>ImageExplorer DICOM</b><br><br>';

		vcontent += 'ie_dicom_G.jpg<br>';

		vcontent += 'ie_dicom_G.gif<br>';

		vcontent += 'ie_dicom_G_negativo.jpg<br>';

		vcontent += 'ie_dicom_G_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'iep_p') {

		vcontent += '<B>ImageExplorer PACS</b><br><br>';

		vcontent += 'ie_pacs_P.jpg<br>';

		vcontent += 'ie_pacs_P.gif<br>';

		vcontent += 'ie_pacs_P_negativo.jpg<br>';

		vcontent += 'ie_pacs_P_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



if (objTgt == 'iep_m') {

		vcontent += '<B>ImageExplorer PACS</b><br><br>';

		vcontent += 'ie_pacs_M.jpg<br>';

		vcontent += 'ie_pacs_M.gif<br>';

		vcontent += 'ie_pacs_M_negativo.jpg<br>';

		vcontent += 'ie_pacs_M_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'iep_g') {

		vcontent += '<B>ImageExplorer PACS</b><br><br>';

		vcontent += 'ie_pacs_G.jpg<br>';

		vcontent += 'ie_pacs_G.gif<br>';

		vcontent += 'ie_pacs_G_negativo.jpg<br>';

		vcontent += 'ie_pacs_G_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 've_p') {

		vcontent += 'null';

		vcontent += '<B>VoiceExplorer</b><br><br>';

		vcontent += 'voice_P.jpg<br>';

		vcontent += 'voice_P.gif<br>';		

		vcontent += 'voice_P_negativo.jpg<br>';

		vcontent += 'voice_P_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;		

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 've_m') {

		vcontent += 'null';

		vcontent += '<B>VoiceExplorer</b><br><br>';

		vcontent += 'voice_M.jpg<br>';

		vcontent += 'voice_M.gif<br>';		

		vcontent += 'voice_M_negativo.jpg<br>';

		vcontent += 'voice_M_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 've_g') {

		vcontent += 'null';

		vcontent += '<B>VoiceExplorer</b><br><br>';

		vcontent += 'voice_G.jpg<br>';

		vcontent += 'voice_G.gif<br>';		

		vcontent += 'voice_G_negativo.jpg<br>';

		vcontent += 'voice_G_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;	

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'ld_p') {

		if (lang == 'ing') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		if (lang == 'por') { 

			vcontent += '<b>Laudos.Net</b><br><br>';

		}

		if (lang == 'esp') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		vcontent += 'Logo_320x34_Black_EPS.eps<br>';

		vcontent += 'Logo_320x34_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_320x34_Transparent_PNG.png<br>';		

		vcontent += 'Logo_320x34_White_EPS.eps<br>';

		vcontent += 'Logo_320x34_White_JPEG.jpg<br>';		

		vcontent += 'Logo_320x34_Black_GIF.gif<br>';

		vcontent += 'Logo_320x34_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ld_m') {

		if (lang == 'ing') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		if (lang == 'por') { 

			vcontent += '<b>Laudos.Net</b><br><br>';

		}

		if (lang == 'esp') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		vcontent += 'Logo_640x68_Black_EPS.eps<br>';

		vcontent += 'Logo_640x68_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_640x68_Transparent_PNG.png<br>';		

		vcontent += 'Logo_640x68_White_EPS.eps<br>';

		vcontent += 'Logo_640x68_White_JPEG.jpg<br>';		

		vcontent += 'Logo_640x68_Black_GIF.gif<br>';

		vcontent += 'Logo_640x68_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ld_g') {

		if (lang == 'ing') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		if (lang == 'por') { 

			vcontent += '<b>Laudos.Net</b><br><br>';

		}

		if (lang == 'esp') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		vcontent += 'Logo_800x85_Black_EPS.eps<br>';

		vcontent += 'Logo_800x85_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_800x85_Transparent_PNG.png<br>';		

		vcontent += 'Logo_800x85_White_EPS.eps<br>';

		vcontent += 'Logo_800x85_White_JPEG.jpg<br>';		

		vcontent += 'Logo_800x85_Black_GIF.gif<br>';

		vcontent += 'Logo_800x85_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'ld_xg') {

		if (lang == 'ing') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		if (lang == 'por') { 

			vcontent += '<b>Laudos.Net</b><br><br>';

		}

		if (lang == 'esp') { 

			vcontent += '<b>e-Results.Net</b><br><br>';

		}

		vcontent += 'Logo_1024x109_Black_EPS.eps<br>';

		vcontent += 'Logo_1024x109_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_1024x109_Transparent_PNG.png<br>';		

		vcontent += 'Logo_1024x109_White_EPS.eps<br>';

		vcontent += 'Logo_1024x109_White_JPEG.jpg<br>';		

		vcontent += 'Logo_1024x109_Black_GIF.gif<br>';

		vcontent += 'Logo_1024x109_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}	

	

	if (objTgt == 'xh_p') {

		vcontent += '<B>XClinicHurricane</b><br><br>';

		vcontent += 'hurricane_P.jpg<br>';

		vcontent += 'hurricane_P.gif<br>';		

		vcontent += 'hurricane_P_negativo.jpg<br>';		

		vcontent += 'hurricane_P_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'xh_m') {

		vcontent += '<B>XClinicHurricane</b><br><br>';

		vcontent += 'hurricane_M.jpg<br>';

		vcontent += 'hurricane_M.gif<br>';		

		vcontent += 'hurricane_M_negativo.jpg<br>';		

		vcontent += 'hurricane_M_negativo.gif<br><br>';		

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'xh_g') {

		vcontent += '<B>XClinicHurricane</b><br><br>';

		vcontent += 'hurricane_G.jpg<br>';

		vcontent += 'hurricane_G.gif<br>';		

		vcontent += 'hurricane_G_negativo.jpg<br>';		

		vcontent += 'hurricane_G_negativo.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}	

	

	if (objTgt == 'xt_p') {

		vcontent += '<B>XClinicTitanium</b><br><br>';

		vcontent += 'titanium_P.jpg<br>';

		vcontent += 'titanium_P.gif<br>';	

		vcontent += 'titanium_P_negativo.jpg';

		vcontent += 'titanium_P_negativo.gif<br><br>';		

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'xt_m') {

		vcontent += '<B>XClinicTitanium</b><br><br>';

		vcontent += 'titanium_M.jpg<br>';

		vcontent += 'titanium_M.gif<br>';	

		vcontent += 'titanium_M_negativo.jpg';

		vcontent += 'titanium_M_negativo.gif<br><br>';	

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'xt_g') {

		vcontent += '<B>XClinicTitanium</b><br><br>';

		vcontent += 'titanium_G.jpg<br>';

		vcontent += 'titanium_G.gif<br>';	

		vcontent += 'titanium_G_negativo.jpg';

		vcontent += 'titanium_G_negativo.gif<br><br>';	

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ms_p') {

		vcontent += '<B>MedicalSystems</b><br><br>';

		vcontent += 'Logo_320x142_Black_EPS.eps<br>';

		vcontent += 'Logo_320x142_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_320x142_Transparent_PNG.png<br>';		

		vcontent += 'Logo_320x142_White_EPS.eps<br>';

		vcontent += 'Logo_320x142_White_JPEG.jpg<br>';		

		vcontent += 'Logo_320x142_Black_GIF.gif<br>';

		vcontent += 'Logo_320x142_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ms_m') {

		vcontent += '<B>MedicalSystems</b><br><br>';

		vcontent += 'Logo_640x284_Black_EPS.eps<br>';

		vcontent += 'Logo_640x284_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_640x284_Transparent_PNG.png<br>';		

		vcontent += 'Logo_640x284_White_EPS.eps<br>';

		vcontent += 'Logo_640x284_White_JPEG.jpg<br>';		

		vcontent += 'Logo_640x284_Black_GIF.gif<br>';

		vcontent += 'Logo_640x284_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

		tgt.innerHTML = vcontent;

	}



	if (objTgt == 'ms_g') {

		vcontent += 'null';

/*		vcontent += '<B>XClinicTitanium</b><br><br>';

		vcontent += 'Logo_800x440_Black_EPS.eps<br>';

		vcontent += 'Logo_800x440_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_800x440_Transparent_PNG.png<br>';		

		vcontent += 'Logo_800x440_White_EPS.eps<br>';

		vcontent += 'Logo_800x440_White_JPEG.jpg<br>';		

		vcontent += 'Logo_800x440_Black_GIF.gif<br>';

		vcontent += 'Logo_800x440_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

*/		

		tgt.innerHTML = vcontent;

	}

	

	if (objTgt == 'ms_xg') {

		vcontent += 'null';

/*		vcontent += '<B>XClinicTitanium</b><br><br>';

		vcontent += 'Logo_1024x563_Black_EPS.eps<br>';

		vcontent += 'Logo_1024x563_Black_JPEG.jpg<br>';		

		vcontent += 'Logo_1024x563_Transparent_PNG.png<br>';		

		vcontent += 'Logo_1024x563_White_EPS.eps<br>';

		vcontent += 'Logo_1024x563_White_JPEG.jpg<br>';		

		vcontent += 'Logo_1024x563_Black_GIF.gif<br>';

		vcontent += 'Logo_1024x563_Black_GIF.gif<br><br>';

		vcontent += '</span>';

		vcontent += footer;

*/

		tgt.innerHTML = vcontent;

	}		

}



function WhatClean(objTgt) {

	document.getElementById('whatsinthebox').innerHTML = ' ';

	document.getElementById(objTgt).style.color='#999999';	

}



var btnlocked = '';



function updatemenu(objTgt,lang) {

	imsource = 'img/menu_' + objTgt + '_' + lang + '_active.jpg';

	document.getElementById(objTgt).src = imsource;

	btnlocked = objTgt;

}

	

function alertaja() {

	alert('teste');

}



function closeAlert() {

	document.getElementById('alertwindow').style.visibility = 'hidden';

	document.getElementById('alertbox').style.visibility = 'hidden';

}





function sameuser_alert(typelang) {

	objMaxWidth = document.body.scrollWidth;

	objMaxHeight = document.body.scrollHeight + 80;

//	alert('width: '+ objMaxWidth + ' height: '+objMaxHeight);

	document.getElementById('alertwindow').style.visibility = 'visible'; 

	document.getElementById('alertwindow').style.width = objMaxWidth + 'px';

	document.getElementById('alertwindow').style.height = objMaxHeight + 'px';	

	

	document.getElementById('alertbox').style.left = ((objMaxWidth / 2) - 200) + 'px';

	document.getElementById('alertbox').style.top = ((document.documentElement.clientHeight / 2) - 90) + 'px';

	document.getElementById('alertbox').style.visibility = 'visible';

	document.getElementById('usuario').style.backgroundColor = '#FFCCCC';	

	document.getElementById('senha').style.backgroundColor = '#FFCCCC';		

	document.getElementById('senha2').style.backgroundColor = '#FFCCCC';		

	



	varHTML = '<table border="0" cellpadding="0" cellspacing ="0" width="100%">';

	varHTML += '<tr>';

	varHTML += '<td colspan="3" align="center" style="font-family: Verdana; font-size: 11px;"><br>';	

	

	if (typelang == 'por') {

		varHTML += '<strong> Erro no formulário </strong>';	

	}

	if (typelang == 'ing') {

		varHTML += '<strong> Form error </strong>';	

	}	

	if (typelang == 'esp') {

		varHTML += '<strong> Error en el formulario </strong>';	

	}	

	

	varHTML += '<br><br><br></td>';

	varHTML += '</tr><tr>';

	varHTML += '<td align="center" width="110">';

	varHTML += '<img src="img/img_cone.jpg" border="0">';

	varHTML += '</td>';	

	varHTML += '<td width="50" valign="top">';	

	varHTML += '&nbsp;';				

	varHTML += '</td>';

	varHTML += '<td align="left">';	



	if (typelang == 'por') {

		varHTML += 'Esse usuário já existe, por favor <BR>escolha outro.<Br><BR><BR><BR>';	

		varHTML += '<a href="#" onClick="closeAlert()"> [Fechar Janela] </a>';

	}

	if (typelang == 'ing') {

		varHTML += 'This username already exists, please <BR>choose another one.<Br><BR><BR><BR>';	

		varHTML += '<a href="#" onClick="closeAlert()"> [Close Window] </a>';

	}	

	if (typelang == 'esp') {

		varHTML += 'Este nombre de usuário ya fue creado, por<Br> favor escoja outro.<Br><BR><BR><BR>';	

		varHTML += '<a href="#" onClick="closeAlert()"> [Cierrar pantalla] </a>';

	}	

	

	varHTML += '</td>';	

	varHTML += '</tr>';	

	varHTML += '</table>';	

	

	document.getElementById('alertbox').innerHTML = varHTML;

}





function open_alert(typelang) {

	objMaxWidth = document.body.scrollWidth;

	objMaxHeight = document.body.scrollHeight + 80;

	document.getElementById('alertwindow').style.visibility = 'visible'; 

	document.getElementById('alertwindow').style.width = objMaxWidth + 'px';

	document.getElementById('alertwindow').style.height = objMaxHeight + 'px';	

	

	document.getElementById('alertbox').style.left = ((objMaxWidth / 2) - 200) + 'px';

	document.getElementById('alertbox').style.top = ((document.documentElement.clientHeight / 2) - 90) + 'px';

	document.getElementById('alertbox').style.visibility = 'visible';

	



	varHTML = '<table border="0" cellpadding="0" cellspacing ="0" width="100%">';

	varHTML += '<tr>';

	varHTML += '<td colspan="3" align="center" style="font-family: Verdana; font-size: 11px;"><br>';	

	

	if (typelang == 'por') {

		varHTML += '<strong> Erro no formulário </strong>';	

	}

	if (typelang == 'ing') {

		varHTML += '<strong> Form error </strong>';	

	}	

	if (typelang == 'esp') {

		varHTML += '<strong> Error en el formulario </strong>';	

	}	

	

	varHTML += '<br><br><br></td>';

	varHTML += '</tr><tr>';

	varHTML += '<td align="center" width="110">';

	varHTML += '<img src="img/img_cone.jpg" border="0">';

	varHTML += '</td>';	

	varHTML += '<td width="50" valign="top">';	

	varHTML += '&nbsp;';				

	varHTML += '</td>';

	varHTML += '<td align="left">';	



	if (typelang == 'por') {

		varHTML += 'Alguns campos do formulário estăo <br>incorretos ou em branco.<Br><BR>';	

		varHTML += 'Os campos incorretos estăo marcados em vermelho.<br><BR>';			

		varHTML += '<a href="#" onClick="closeAlert()"> [Fechar Janela] </a>';

	}

	if (typelang == 'ing') {

		varHTML += 'Some fields are incorrects or empty<br><br>';	

		varHTML += 'The wrong fields are red.<br><BR>';			

		varHTML += '<a href="#" onClick="closeAlert()"> [Close Window] </a>';	

	}	

	

	if (typelang == 'esp') {

		varHTML += 'Algunos campos del formulario están <br>incorrectos o en blanco.<Br><BR>';	

		varHTML += 'Los campos incorrectos están marcados<Br> en rojo.<br><BR>';			

		varHTML += '<a href="#" onClick="closeAlert()"> [Cierrar pantalla] </a>';

	}	

	

	varHTML += '</td>';	

	varHTML += '</tr>';	

	varHTML += '</table>';	

	

	document.getElementById('alertbox').innerHTML = varHTML;

}





function trabalhe_conosco(lang) {

	valida = true;



	nome			= document.getElementById('nome');

	nascimento		= document.getElementById('nascimento');

	sexo			= document.getElementById('sexo');

	civil			= document.getElementById('civil');

	endereco		= document.getElementById('endereco');

	complemento		= document.getElementById('complemento');

	pais 			= document.getElementById('pais');	

	cidade  		= document.getElementById('cidade');	

	estado 			= document.getElementById('estado');

	cep 			= document.getElementById('cep');

	bairro 			= document.getElementById('bairro');	

	telefone		= document.getElementById('telefone');	

	celular			= document.getElementById('celular');		

	area 			= document.getElementById('area');		

	cargo 			= document.getElementById('cargo');		

	conheceu		= document.getElementById('conheceu');		

	email			= document.getElementById('email');

	

	if (nome.value.length <= 2 ) {

		valida = false;

		nome.style.backgroundColor = '#FFCCCC';

	}

	

	if (nascimento.value.length <= 0 ) {

		valida = false;

		nascimento.style.backgroundColor = '#FFCCCC';

	}	



	if (sexo.value.length <= 0 ) {

		valida = false;

		sexo.style.backgroundColor = '#FFCCCC';

	}

	

	if (civil.value.length <= 1 ) {

		valida = false;

		civil.style.backgroundColor = '#FFCCCC';

	}	



	if (endereco.value.length <= 2 ) {

		valida = false;

		endereco.style.backgroundColor = '#FFCCCC';

	}



	if (complemento.value.length <= 2 ) {

		valida = false;

		complemento.style.backgroundColor = '#FFCCCC';

	}



	if (pais.value.length <= 2 ) {

		valida = false;

		pais.style.backgroundColor = '#FFCCCC';

	}

	

	if (cidade.value.length <= 2 ) {

		valida = false;

		cidade.style.backgroundColor = '#FFCCCC';

	}	



	if (estado.value.length <= 1 ) {

		valida = false;

		estado.style.backgroundColor = '#FFCCCC';

	}



	if (cep.value.length <= 2 ) {

		valida = false;

		cep.style.backgroundColor = '#FFCCCC';

	}

	

	if (bairro.value.length <= 2 ) {

		valida = false;

		bairro.style.backgroundColor = '#FFCCCC';

	}	

	

	if (telefone.value.length <= 2 ) {

		valida = false;

		telefone.style.backgroundColor = '#FFCCCC';

	}	

	

	if (celular.value.length <= 2 ) {

		valida = false;

		celular.style.backgroundColor = '#FFCCCC';

	}	



	if (area.value.length <= 2 ) {

		valida = false;

		area.style.backgroundColor = '#FFCCCC';

	}





	if (cargo.value.length <= 2 ) {

		valida = false;

		cargo.style.backgroundColor = '#FFCCCC';

	}





	if (conheceu.value.length <= 2 ) {

		valida = false;

		conheceu.style.backgroundColor = '#FFCCCC';

	}



	if (email.value.length <= 2 ) {

		valida = false;

		email.style.backgroundColor = '#FFCCCC';

	}

	

	if (valida == false) {

		open_alert(lang);

	} else {

		document.getElementById('trabalhe_conosco').submit();		

	}

}





function usuario_cadastra(lang) {

	valida = true;



	nome = document.getElementById('nome');

	dnasc = document.getElementById('dia_nasc');

	mnasc = document.getElementById('mes_nasc');

	anasc = document.getElementById('ano_nasc');

	email = document.getElementById('email');

	pais = document.getElementById('pais');

	cidade = document.getElementById('cidade');	

	endereco = document.getElementById('endereco');	

	estado = document.getElementById('estado');

	bairro = document.getElementById('bairro');	

	cep = document.getElementById('cep');

	usuario = document.getElementById('usuario');

	senha = document.getElementById('senha');

	senha2 = document.getElementById('senha2');

	

	if (nome.value.length <= 2 ) {

		valida = false;

		nome.style.backgroundColor = '#FFCCCC';

	}

	

	if (dnasc.value.length <= 0 ) {

		valida = false;

		dnasc.style.backgroundColor = '#FFCCCC';

	}	



	if (mnasc.value.length <= 0 ) {

		valida = false;

		mnasc.style.backgroundColor = '#FFCCCC';

	}

	

	if (anasc.value.length <= 1 ) {

		valida = false;

		anasc.style.backgroundColor = '#FFCCCC';

	}	



	if (email.value.length <= 2 ) {

		valida = false;

		email.style.backgroundColor = '#FFCCCC';

	}



	if (pais.value.length <= 2 ) {

		valida = false;

		pais.style.backgroundColor = '#FFCCCC';

	}



	if (cidade.value.length <= 2 ) {

		valida = false;

		cidade.style.backgroundColor = '#FFCCCC';

	}

	

	if (endereco.value.length <= 2 ) {

		valida = false;

		endereco.style.backgroundColor = '#FFCCCC';

	}	



	if (estado.value.length <= 1 ) {

		valida = false;

		estado.style.backgroundColor = '#FFCCCC';

	}



	if (bairro.value.length <= 2 ) {

		valida = false;

		bairro.style.backgroundColor = '#FFCCCC';

	}

	

	if (cep.value.length <= 2 ) {

		valida = false;

		cep.style.backgroundColor = '#FFCCCC';

	}	

	

	if (usuario.value.length <= 2 ) {

		valida = false;

		usuario.style.backgroundColor = '#FFCCCC';

	}	

	

	if (senha.value.length <= 2 ) {

		valida = false;

		senha.style.backgroundColor = '#FFCCCC';

	}	



	if (senha2.value.length <= 2 ) {

		valida = false;

		senha2.style.backgroundColor = '#FFCCCC';

	}

	

	if (senha.value != senha2.value) {

		valida = false;

		senha.style.backgroundColor = '#FFCCCC';

		senha2.style.backgroundColor = '#FFCCCC';

		senha.value = '';

		senha2.value = '';

	}

	

	if (valida == false) {

		open_alert(lang);

	} else {

		document.getElementById('usuario_cadastra').submit();		

	}

}





function parceiro_cadastro(lang) {

	valida = true;



	nome = document.getElementById('nome');

	razao = document.getElementById('razao');

	cnpj = document.getElementById('cnpj');

	endereco = document.getElementById('endereco');

	pais = document.getElementById('pais');

	estado = document.getElementById('estado');

	cidade = document.getElementById('cidade');	

	bairro = document.getElementById('bairro');	

	cep = document.getElementById('cep');

	telefone = document.getElementById('telefone');	

	fundacao = document.getElementById('fundacao');

	marcas = document.getElementById('marcas');

	certifica = document.getElementById('certifica');

	colaboradores = document.getElementById('colaboradores');

	segmento = document.getElementById('segmento');	

	contato = document.getElementById('contatow');		

	

	if (nome.value.length <= 2 ) {

		valida = false;

		nome.style.backgroundColor = '#FFCCCC';

	}

	

	if (razao.value.length <= 0 ) {

		valida = false;

		razao.style.backgroundColor = '#FFCCCC';

	}	



	if (cnpj.value.length <= 0 ) {

		valida = false;

		cnpj.style.backgroundColor = '#FFCCCC';

	}

	

	if (endereco.value.length <= 1 ) {

		valida = false;

		endereco.style.backgroundColor = '#FFCCCC';

	}	



	if (pais.value.length <= 2 ) {

		valida = false;

		pais.style.backgroundColor = '#FFCCCC';

	}



	if (estado.value.length <= 1 ) {

		valida = false;

		estado.style.backgroundColor = '#FFCCCC';

	}



	if (cidade.value.length <= 2 ) {

		valida = false;

		cidade.style.backgroundColor = '#FFCCCC';

	}

	

	if (bairro.value.length <= 2 ) {

		valida = false;

		bairro.style.backgroundColor = '#FFCCCC';

	}	



	if (cep.value.length <= 1 ) {

		valida = false;

		cep.style.backgroundColor = '#FFCCCC';

	}



	if (telefone.value.length <= 2 ) {

		valida = false;

		telefone.style.backgroundColor = '#FFCCCC';

	}

	

	if (fundacao.value.length <= 2 ) {

		valida = false;

		fundacao.style.backgroundColor = '#FFCCCC';

	}	

	

	if (marcas.value.length <= 2 ) {

		valida = false;

		marcas.style.backgroundColor = '#FFCCCC';

	}	

	

	if (certifica.value.length <= 2 ) {

		valida = false;

		certifica.style.backgroundColor = '#FFCCCC';

	}	



	if (colaboradores.value.length <= 0 ) {

		valida = false;

		colaboradores.style.backgroundColor = '#FFCCCC';

	}

	

	if (segmento.value.length <= 2 ) {

		valida = false;

		segmento.style.backgroundColor = '#FFCCCC';

	}	



	if (contato.value.length <= 2 ) {

		valida = false;

		contato.style.backgroundColor = '#FFCCCC';

	}

	

	

	if (valida == false) {

		open_alert(lang);

	} else {

		document.getElementById('cadastra_parceiro').submit();		

	}

}









function noticias_envia(lang) {

	valida = true;



	nome = document.getElementById('nome');

	remetente = document.getElementById('remetente');

	destinatario = document.getElementById('destinatario');

	

	if (nome.value.length <= 2 ) {

		valida = false;

		nome.style.backgroundColor = '#FFCCCC';

	}

	

	if (remetente.value.length <= 0 ) {

		valida = false;

		remetente.style.backgroundColor = '#FFCCCC';

	}	



	if (destinatario.value.length <= 0 ) {

		valida = false;

		destinatario.style.backgroundColor = '#FFCCCC';

	}

	



	if (valida == false) {

		open_alert(lang);

	} else {

		document.getElementById('envia_noticias').submit();		

	}

}



function showUserPanel() {

	document.getElementById("imgbanner").style.visibility = 'hidden';

	document.getElementById("upanel").style.visibility = 'visible';

	document.getElementById("upanel").style.border = '1px solid #000000';	

}



function checkRes(target) {

/*	alert('entrei');

	alert(screen.width);

	alert(screen.height);			

*/	

	if (screen.width < 1280) {

		document.getElementById(target).href = 'img/minres.gif';

		document.getElementById(target).rel = 'lightbox';



	}

	if (screen.height < 800) { 

		document.getElementById(target).href = 'img/minres.gif';

		document.getElementById(target).rel = 'lightbox';		

	}

}



function overTd(target) {

	document.getElementById(target).style.backgroundColor = '#666666';

	document.getElementById(target).style.color = '#FFFFFF';	



}



function outTd(target) {

	document.getElementById(target).style.backgroundColor = '#FFFFFF';	

	document.getElementById(target).style.color = '#000000';		

}





