function Bookmark(lnk, title) {
var browser = (/msie/i.test(navigator.userAgent) && parseInt(navigator.appVersion) >= 4) ? 'msie' : 
              (/firefox/i.test(navigator.userAgent) ? 'firefox' : 'manual');
	
var mark = {
'msie': function(l, t) { if(window.external) window.external.AddFavorite(decodeURIComponent(l), decodeURIComponent(t)); },
'firefox': function(l, t) { if(window.sidebar) window.sidebar.addPanel(decodeURIComponent(t), decodeURIComponent(l), ""); },
'manual': function() { alert('Seu navegador não oferece suporte para adicionar automaticamente.\n'+
														 'Pressione Ctrl+D para adicionar aos seus favoritos manualmente.'); }
};
return mark[browser](lnk || location.href, title || document.title);
}

// do afilio antigo
function abreChat(){ window.open("http://www.eroticad.com.br/suporte/livehelp.php",'','width=550, height=600'); }
function abreChatMer(){ window.open("http://www.eroticad.com.br/suporte/livehelp.php?department=1",'','width=550, height=600'); }
function submitLogin(){
	f = document.loginForm;
	switch(f.auth_type.value){
//		case "aff" :
//		case "mer" :
//      return true;
		case "w" :
			f.action = "http://ct2.comclick.com/ihm3/editeur/connexion.php";
			break;
		case "a" :
			f.action = "http://ct2.comclick.com/ihm3/annonceur/connexion.php";
			break;
	}
	f.auth_login.name = "login";
	f.auth_pass.name = "pass";
	f.method = "get";
  return true;
}
function abrePass(){
  window.open('http://v2.eroticad.com.br/password.php','','width=404, height=430');
}

function openDownWindow(typ) {
var e = _get('dld_div');
e.style.display = '';
e.style.visibility = 'hidden';
center(e);
e.style.display = 'none';
e.style.visibility = 'visible';
_get('dld_type').value = typ; 
  try { jQuery('#dld_div').eq(0).fadeIn(300); } 
	catch(e) { e.style.display = ''; } 
}

function closeDownWindow() {
  try { jQuery('#dld_div').eq(0).fadeOut(300); } 
	catch(e) { _get('dld_div').style.display = 'none'; } 
}
