var versao = "1.07";
var m0 = "pedidos";
var m1 = "faleconosco";
var m2 = "beautylife.com.br";
var m3 = "hotmail.com";
var cont = m1+"@"+m2;
var pedi = m0+"@"+m2;
var pres = "presidente"+"@"+m2;
var ms1 = "beautylife";
var ms2 = "pedidos.beautylife";
var tel1 = "(11) 3992-2215";
var tel2 = "0800-772-8474";
var defaultX = 0;
var idX = 0;
var Ccode = "";
var shortname = "Beauty Life";
var longname = shortname + " Cosméticos";
var legalname = "Cosméticos Bio Phito Terápicos Ltda.";
var fullname = longname + " (" + legalname + ")";
var copyyear = "2007-2010";

var _camp  = "";
var _pcode = "";
var _dom   = "beautylifecosmeticos.com.br";
var _home  = "http://www."+_dom+"/home.htm";
var _ctrl  = "info";
var _ctdom = _dom;
var _emct  = _ctrl + "@" + _ctdom;
var _emlf  = _emct;
var _ret1 = "http://www."+_ctdom+"/enviado.htm"
var _ret2 = "http://www."+_ctdom+"/final.htm"
var _ret3 = "http://www."+_ctdom+"/erro.htm"

var theArgs = document.location.search;
var thePage = fullcut(theArgs.substring(1,theArgs.length));
idX = thePage;

function deframer()
{
	if(top.location != self.location) { top.location = document.location; }
}

function frM()
{
	return;
if(top.location == self.location || frames.name != 'bmain')
	{
			self.location = "index2.htm?"+document.location;
	}
}

function NSmenu()
{
//if(isNS)
// document.write('<p align=center class=stext><a href="batomll.htm">Batom Longa Duração</a> | <a href="batom3d.htm">Batom 3D</a> | <a href="lapisdel.htm">Delineador</a> | <a href="lapis3d.htm">Delineador 3D</a> | <a href="bases.htm">Bases/Compactos</a> | <a href="perfumes.htm">Perfumes</a> | <a href="cosmeceutica.htm">Cosmecêuticos</a></p><P class=pline></P>');
//document.write('<p align=center class=stext><a href="batomll.htm">Batom Longa Duração</a> | <a href="batom3d.htm">Batom 3D</a> | <a href="lapisdel.htm">Delineadores</a> | <a href="bases.htm">Bases/Compactos</a> | <a href="perfumes.htm">Perfumes</a> | <a href="cosmeceutica.htm">Cosmecêuticos</a> | <a href="lancamentos.htm"><font color=red>Lançamento!</font></a></p><P class=pline></P>');
//document.write('<p align=center class=stext><a href="perfumes.htm">Perfumes</a> | <a href="batomll.htm">Batom Longa Duração</a> | <a href="batom3d.htm">Batom 3D</a> | <a href="lapisdel.htm">Delineadores</a> | <a href="bases.htm">Bases/Compactos</a> | <a href="cosmeceutica.htm">Cosmecêuticos</a> | <a href="lancamentos.htm"><font color=red>Lançamento!</font></a></p><P class=pline></P>');
document.write('<p align=center class=stext>Atalho para outros produtos: &nbsp;<a href="perfumes.htm">Perfumes Longa Duração</a> | <a href="batomll.htm">Batom Longa Duração</a> | <a href="batom3d.htm">Batom Efeito 3D</a> | <a href="lapisdel.htm">Delineadores</a><BR><a href="bases.htm">Bases e Pós Compactos</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="cosmeceutica.htm">Linha Cosmecêutica</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="makeup.htm">Linha Make-up</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="lift.htm"><font color=red>Lançamento:</font> Derma-Beauty Anti-idade</a></p><P class=pline></P>');
}

function NSmenu2()
{
//if(isNS)
document.write('<p align=center class=stext><a href="novidades.htm">Últimas Notícias e Novidades</a> | <a href="eventos.htm">Galeria de Eventos</a> | <a href="midia.htm">Vídeos da Mídia</a> | <a href="institucional.htm">Vídeos Institucionais e Apresentações</a></p><P class=pline></P>');
}

function fullcut(qual)
{
	if(qual.substring(0,3) == "id=" || qual.substring(0,3) == "ID=") qual = qual.substring(3,12);
	var numero = 1*(qual);
	qual = numero;
	if(isNaN(qual) || qual == "" || qual == null) qual = 0;
	//alert(qual);
	return qual;
}

function setCookie(name, value)
{
	//alert('Set cookie:'+name+':'+value+':');
	var days = 180;
	var date = new Date();
	date.setTime(date.getTime()+(days*24*60*60*1000));
	var expires = "; expires="+date.toGMTString();
	document.cookie = name + "=" + escape(value) + expires + "; path=/"
}

function getCookie(name)
{
	//alert('Get cookie:'+name+':');
	var cname = name + "=";
	var dc = document.cookie;
	if (dc.length > 0)
	{
		begin = dc.indexOf(cname);
		if (begin != -1)
		{
			begin += cname.length;
			end = dc.indexOf(";", begin);
			if (end == -1) end = dc.length;
			return unescape(dc.substring(begin, end));
		}
	}
    return null;
}

function getLocalID(name)
{
var beginindex, endindex, result
beginindex=document.cookie.indexOf(name)+9
endindex=beginindex
while (document.cookie.charAt(endindex)!=";"&&
endindex<=document.cookie.length)
endindex++
return result;
}

function putName()
{
	setCookie("_bsid", idX);
	ret = true
	return ret;
}

function checkID()
{
	if(idX == 999999) { idX = 0; putName(); return; }
	if(idX != 0) { putName(); return; }
	idX = getCookie("_bsid");
	//alert(idX);
	if(idX == null || idX == "") userX = getLocalID("idX");
	if(idX == null || idX == "") idX = 0;
}

function contato()
{
	document.write('<A href="mailto:'+cont+'?subject='+shortname+' - via site">E-mail</A>');
}

function contato_ico()
{
	document.write('<A href="mailto:'+cont+'?subject='+shortname+' - via site"><img src="imagens/mail.gif" heigth=20 width=12 border=0>&nbsp;E-mail</A>');
}

function home_ico()
{
	document.write('<A href="home.htm"><img src="imagens/home.gif" heigth=20 width=12 border=0>&nbsp;Início</A>');
}

function emailadd(usr,dom)
{
	var addr = usr+"@"+dom;
	mailadd(addr);
}

function mailadd(addr)
{
	document.write('<B><A href="mailto:'+addr+'?subject='+shortname+' - via site">'+addr+'</A></B>');
}

function ph1()
{
	document.write(tel1);
}

function ph2()
{
	document.write(tel2);
}

function telefones()
{
	document.write(tel1+'&nbsp;&nbsp;&nbsp;Fax: '+tel2);
}

function flutuante()
{
	if(idX == 0) { document.write('<BR>&nbsp;'); return; }
	document.write('<BR>Você é um convidado especial do distribuidor '+shortname+' código<font class=name> '+idX+'</font></b>&nbsp;&nbsp;&nbsp;');
	document.write('<a href="javascript:janelam(\'indicante.htm\');">[o que isso significa?]</a>');
	//document.write('<HR width=100% color=silver noShade SIZE=1>');
}

function janelap(nome)
{
		verjanela = window.open(nome,'verjanela','resizable=no,history=no,menubar=no,status=no,directories=no,scrollbars=no,width=370,height=220,top=170,left=130');
		verjanela.focus();
}

function janelam(nome)
{
		verjanela = window.open(nome,'outrajanela','resizable=no,history=no,menubar=no,status=no,directories=no,scrollbars=no,width=560,height=438,top=142,left=130');
		verjanela.focus();
}

function filiada()
{
	document.write('<DIV class=formt align=center><BR><BR><BR>');
	document.write('<a href="http://www.abevd.org.br/htdocs/index.php?secao=associados&pagina=detalhes_associado&associados_id=999" target=abevd><img src="imagens/abevd_t.gif" width=120 height=50 border=0></a>');
	document.write('&nbsp;&nbsp;<img src="imagens/anvisa_t.gif" width=60 height=58 border=0><BR><BR></DIV>');
}

function item_left(titulo,texto,url,imagem,alt)
{
document.write('\
	<TD vAlign=top width="50%">\
	<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=8 border=0 background="imagens/bg_item3.jpg"><TR>\
	 <TD valign=top><A href="'+url+'">\
	 <IMG height=74 alt="'+alt+'" src="imagens/'+imagem+'" width=90 vspace=5 border=0></A></TD>\
	 <TD><DIV align=left><B><A href="'+url+'">'+titulo+'</A></B></DIV><DIV align=left>'+texto+'<BR></DIV>\
	 <DIV align=right><B>... <A href="'+url+'">saiba mais</A></B></DIV></TD></TR>\
	</TABLE></TD>\
');
}

function item_right(titulo,texto,url,imagem,alt)
{
document.write('\
	<TD vAlign=top width="50%">\
	<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=8 border=0 background="imagens/bg_item3.jpg"><TR>\
	 <TD><DIV align=left><B><A href="'+url+'">'+titulo+'</A></B></DIV><DIV align=left>'+texto+'</DIV>\
	 <DIV align=right><B>... <A href="'+url+'">saiba mais</A></B></DIV></TD>\
	 <TD valign=top><A href="'+url+'">\
	 <IMG height=74 alt="'+alt+'" src="imagens/'+imagem+'" width=90 vspace=5 border=0></A></TD></TR>\
	</TABLE></TD>\
');
}

function link_slide()
{
	var slideurl = 'http://www.beautylife.com.br/material/beauty_life_6_1.exe';
	document.write('<a href="'+slideurl+'"><img src="imagens/bt_present.gif" width=470 heigth=60 border=0 alt="Clique aqui para baixar e assistir uma apresentação completa sobre a Beauty Life. A apresentação é auto-executável e não requer o Power Point. Você pode salvá-la para assistir depois ou executá-la imediatamente."></a>');
}

function footer()
{
document.write('<DIV id=footmenu><UL><LI><A href="empresa.htm">A EMPRESA</A>|</LI><LI><A href="produtos.htm">OS PRODUTOS</A>|</LI><LI><A href="oportunidade.htm">A OPORTUNIDADE</A>|</LI><LI><A href="cadastro.htm">SEJA UM DISTRIBUIDOR</A>|</LI><LI><A href="novidades.htm">NOTÍCIAS E NOVIDADES</A>|</LI><LI><A href="fale.htm">FALE CONOSCO</A></LI></UL></DIV>');
document.write('<DIV id=foot><ADDRESS><STRONG><B>'+fullname+'&nbsp;&nbsp;-&nbsp;&nbsp;São Paulo&nbsp;&nbsp;-&nbsp;&nbsp;SP</B></STRONG><BR><STRONG>TEL</STRONG>: <SCRIPT language=JavaScript> ph1(); </SCRIPT><SPAN> </SPAN><STRONG>FAX</STRONG>: <SCRIPT language=JavaScript> ph2(); </SCRIPT><SPAN> </SPAN><STRONG>E-mail</STRONG>: <SCRIPT language=JavaScript> mailadd(cont) </SCRIPT></ADDRESS>');
document.write('<DIV id=Copyright_main>Versão '+versao+' - Copyright &copy; '+copyyear+' '+longname+'</DIV></DIV></DIV>');

// Google Analytics Part 2 Start
try{
var pageTracker = _gat._getTracker("UA-4641466-1");
pageTracker._initData();
pageTracker._trackPageview();
}
catch(error) { return null; }
// Google Analytics Part 2 End
}

function TbMOver(tbcolor){tbcolor.style.backgroundColor='#EDFAFF';}
function TbMOut(tbcolor){tbcolor.style.backgroundColor='';}

function boxOver(box){box.style.border ='1px solid  #26ABF8';}
function boxOut(box){box.style.border ='1px solid  #D6D6D6';}

function gth()
{
	var dh1 =document.getElementById('warpmain2').offsetHeight;
	var dh2 =document.getElementById('warpmain1').offsetHeight;
	if(dh1>dh2){
		document.getElementById('warpmain1').style.height=dh1+"px";
	}else{
		document.getElementById('warpmain1').style.height=dh2+"px";
	}
	//alert(dh1+":"+dh2);
}

function gth2()
{
	var dh1 =document.getElementById('warpmain2').offsetHeight;
	var dh2 =document.getElementById('warpmain1b').offsetHeight;
	if(dh1>dh2){
		document.getElementById('warpmain1b').style.height=dh1+"px";
	}else{
		document.getElementById('warpmain1b').style.height=dh2+"px";
	}
	//alert(dh1+":"+dh2);
}

checkID();
//frM();

// Google Analytics Part 1 Start
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
// Google Analytics Part 1 End
