var myWidth = 0, myHeight = 0, tmp='' ;
var borderleft_div_body=0, borderright_div_body=0, bordertop_div_body=0, borderbottom_div_body=0;
var size_h = 0, size_l = 0;
var myHeight_div_body =0, myWidth_div_body = 0 , myHeight_div_list = 0 , myWidth_div_list = 0, myHeight_iframe = 0, myWidth_iframe = 0;
var decalage_scrollbars=105;
var iframe_prop=0;
var site_url='';
function urlencode(ch) {
ch = ch.replace(/[ ]/g,"+")
return escape(ch)
}
function urldecode(ch) {
var reg=new RegExp("[+]","g");
return unescape(String(ch).replace(reg, " "));
}
function EcrireCookie(nom, valeur)
{
var argv=EcrireCookie.arguments;
var argc=EcrireCookie.arguments.length;
var expires=(argc > 2) ? argv[2] : null;
var path=(argc > 3) ? argv[3] : null;
var domain=(argc > 4) ? argv[4] : null;
var secure=(argc > 5) ? argv[5] : false;
//alert(path);
document.cookie=nom+"="+escape(valeur)+
((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
((path==null) ? "" : ("; path="+path))+
((domain==null) ? "" : ("; domain="+domain))+
((secure==true) ? "; secure" : "");
}
function getCookieVal(offset)
{
var endstr=document.cookie.indexOf (";", offset);
if (endstr==-1) endstr=document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function LireCookie(nom)
{
var arg=nom+"=";
var alen=arg.length;
var clen=document.cookie.length;
var i=0;
while (i
';
connection = new AjaxConnectionLogin(myurl);
if(myurl.indexOf("login") != -1)
login=true;
else
login=false;
connection.connectLogin("callBack",mydest,login);
}
function new_ajaxRegister(myurl,mydest) {
if (myurl.indexOf('?',0)==-1){//pas de ?
myurl=myurl+'?p2='+Math.random();
}else{
myurl=myurl+'&p2='+Math.random();
}
if(document.getElementById(mydest)) document.getElementById(mydest).innerHTML = 'Registrando
';
connection = new AjaxConnectionRegister(myurl);
connection.connectRegister("callBack",mydest);
}
function new_ajax(optionP2,url,target) {
// native XMLHttpRequest object
thechaine=url;
if (url.indexOf('?',0)==-1)
{//pas de ?
url=url+'?p2='+Math.random();
}
else
{
url=url+'&p2='+Math.random();
}
$.get(url,
function(data){
if(document.getElementById(target)) document.getElementById(target).innerHTML =data;
if (thechaine.indexOf('returnTo')>0){
thechaine = thechaine.replace(/(.*)returnTo=/gi,'');
if (thechaine.indexOf('?',0)==-1)
{//pas de ?
thechaine=thechaine+'?p2='+Math.random();
}
else
{
thechaine=thechaine+'&p2='+Math.random();
}
$.get('/vweb/empty/'+thechaine,function(data){document.getElementById(target).innerHTML =data;});
}
});
}
/*
function new_ajax(optionP2,myurl,mydest) {
if (optionP2==1)
{
if (myurl.indexOf('?',0)==-1){//pas de ?
myurl=myurl+'?p2='+Math.random();
}else{
myurl=myurl+'&p2='+Math.random();
}
}
else
{
if (optionP2==0)
{
var date = new Date();
var d = date.getDate();
var h = date.getHours();
if (myurl.indexOf('?',0)==-1){//pas de ?
myurl=myurl+'?p2='+d+h;
}else{
myurl=myurl+'&p2='+d+h;
}
}
}
if(document.getElementById(mydest)) document.getElementById(mydest).innerHTML = '
';
connection = new AjaxConnection(myurl);
connection.connect("callBack",mydest);
}
*/
function callBack(content) {
//document.getElementById('hi').value = content;
//document.getElementById(connection.destination).innerHTML=content;
}
function ltrim(stringToTrim) {
return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
return stringToTrim.replace(/\s+$/,"");
}
function remove_spechar(chaine)
{
//encodeURIComponent
chaine=noaccent(chaine);
chaine=ltrim(chaine);
chaine=rtrim(chaine);
var reg=new RegExp("[^a-zA-Z0-9\-\,\.\%\\s]","gi");
chaine=chaine.replace(reg,"");
chaine=encodeURIComponent(chaine);
return chaine;
}
function checktexte(chaine)
{
if (chaine=='' || chaine==null || chaine.length<2){alert("Es necesario una palabra de 2 caracteres como minimo");return false;}
else return true;
}
function reloadData(pagina)
{
filtros='';
Embarazo='';
if ($("[id=\"A\"]").is(':checked')){Embarazo+=",'A'";}
if ($("[id=\"B\"]").is(':checked')){Embarazo+=",'B'";}
if ($("[id=\"C\"]").is(':checked')){Embarazo+=",'C'";}
if ($("[id=\"D\"]").is(':checked')){Embarazo+=",'D'";}
if ($("[id=\"X\"]").is(':checked')){Embarazo+=",'X'";}
if (Embarazo!=''){Embarazo=Embarazo.substring(1,Embarazo.length);filtros+=':embarazo';}
Lactancia='';
if ($("[id=\"Compatible\"]").is(':checked')){Lactancia+=",'1'";}
if ($("[id=\"Precaución\"]").is(':checked')){Lactancia+=",'2'";}
if ($("[id=\"Evitar\"]").is(':checked')){Lactancia+=",'3'";}
if (Lactancia!=''){Lactancia=Lactancia.substring(1,Lactancia.length);filtros+=':lactancia';}
Fotosensibilidad='';
if ($("[id=\"Produce reacciones de fotosensibilidad\"]").is(':checked')){Fotosensibilidad+=",'1'";}
if ($("[id=\"No produce reacciones de fotosensiblidad\"]").is(':checked')){Fotosensibilidad+=",'0'";}
if ($("[id=\"Z_Z\"]").is(':checked')){Fotosensibilidad+=",'0'";}
if (Fotosensibilidad!=''){Fotosensibilidad=Fotosensibilidad.substring(1,Fotosensibilidad.length);filtros+=':fotosensibilidad';}
Conducir='';
if ($("[id=\"Afecta a la capacidad de conducir\"]").is(':checked')){Conducir+="1";filtros+=':conducir';}
if ($("[id=\"No afecta a la capacidad de conducir\"]").is(':checked')){Conducir+="0";filtros+=':conducir';}
//if (Conducir!='')Conducir=Conducir.substring(1,Conducir.length);
Farmacovigilancia='';
if ($("[id=\"Medicamento autorizado en los últimos 5 años\"]").is(':checked')){Farmacovigilancia+=",'True'";}
if ($("[id=\"Medicamento autorizado hace más de 5 años\"]").is(':checked')){Farmacovigilancia+=",'False'";}
if (Farmacovigilancia!=''){Farmacovigilancia=Farmacovigilancia.substring(1,Farmacovigilancia.length);filtros+=':farmacovigilancia';}
H='';
DH='';
ESTUPEFACIENTE='';
RECETA='';
if ($("[id=\"Uso exclusivo hospitalario\"]").is(':checked')){H="1";filtros+=':H';}
if ($("[id=\"Diagnóstico hospitalario\"]").is(':checked')){DH="1";filtros+=':DH';}
if ($("[id=\"Receta estupefacientes\"]").is(':checked')){ESTUPEFACIENTE="1";filtros+=':estupefaciente';}
if ($("[id=\"Receta médica\"]").is(':checked')){RECETA=",'1'";}
if ($("[id=\"Sin receta\"]").is(':checked')){RECETA=",'0'";}
if (RECETA!=''){RECETA=RECETA.substring(1,RECETA.length);filtros+=':receta';}
Financiacion='';
aportacion='';
if ($("[id=\"Financiación restringida\"]").is(':checked')){Financiacion=",'6'";}
if ($("[id=\"No financiada\"]").is(':checked')){Financiacion+=",'1','2'";}
if ($("[id=\"Aportación reducida por el beneficiario\"]").is(':checked')){aportacion+="1";}
if (Financiacion!=''){Financiacion=Financiacion.substring(1,Financiacion.length);filtros+=':financiacion';}
Dopaje='';
Dhombres='';
Determinados='';
Competicion='';
Siempre='';
if ($("[id=\"Admitido en el deporte\"]").is(':checked')){Dopaje+="0";filtros+=':d_admitido';}
if ($("[id=\"Prohibido en la competición sólo para hombres\"]").is(':checked')){Dhombres="1";filtros+=':d_hombres';}
if ($("[id=\"Prohibido en la competición en ciertos deportes\"]").is(':checked')){Determinados="1";filtros+=':d_determinados';}
if ($("[id=\"Prohibido en la competición\"]").is(':checked')){Competicion="1";filtros+=':d_competicion';}
if ($("[id=\"Prohibido en competición y fuera\"]").is(':checked')){Siempre="1";filtros+=':d_siempre';}
if(document.getElementById('id_ind'))id_ind=document.getElementById('id_ind').value;
else id_ind='';
if(document.getElementById('id_mol'))id_mol=document.getElementById('id_mol').value;
else id_mol='';
if(document.getElementById('id_lab'))id_lab=document.getElementById('id_lab').value;
else id_lab='';
indice=0;
thevalue=remove_spechar(document.getElementById('thename').value);
if (!thevalue){
thevalue=document.getElementById('name').value;
indice=1;
}
$.get('../../emptyNoCache/busqueda/all?prefix=%25&pagina='+pagina+'&id_ind='+id_ind+'&id_mol='+id_mol+'&id_lab='+id_lab+'&ajax=1&in.010=010&in.015=015&name='+thevalue+'&Embarazo='+Embarazo+'&Lactancia='+Lactancia+'&Fotosensibilidad='+Fotosensibilidad+'&Conducir='+Conducir+'&Farmacovigilancia='+Farmacovigilancia+'&Financiacion='+Financiacion+'&Dopaje='+Dopaje+'&H='+H+'&DH='+DH+'&ESTUPEFACIENTE='+ESTUPEFACIENTE+'&RECETA='+RECETA+'&Financiacion='+Financiacion+'&aportacion='+aportacion+'&Dopaje='+Dopaje+'&Dhombres='+Dhombres+'&Determinados='+Determinados+'&Competicion='+Competicion+'&Siempre='+Siempre,
function(data){
document.getElementById('espec').innerHTML = data;
if (document.getElementById('hidden_espec'))
{
document.getElementById('number_espec').innerHTML=document.getElementById('hidden_espec').value;
if (!indice)
{
xx=0;
if (document.getElementById('hidden_espec'))xx+=eval(document.getElementById('hidden_espec').value);
if (document.getElementById('hidden_labo'))xx+=eval(document.getElementById('hidden_labo').value);
if (document.getElementById('hidden_sustancia'))xx+=eval(document.getElementById('hidden_sustancia').value);
if (document.getElementById('hidden_tera'))xx+=eval(document.getElementById('hidden_tera').value);
if (document.getElementById('hidden_noticia'))xx+=eval(document.getElementById('hidden_noticia').value);
document.getElementById('total').innerHTML=xx;
}
else
{
if(document.getElementById('sliderI'))document.getElementById('sliderI').innerHTML=document.getElementById('paginador_tmp').innerHTML;
}
}
else document.getElementById('number_espec').innerHTML='0';
if (filtros!=''){
s.events="event9";
filtros=filtros.substring(1,filtros.length);
s.eVar13=filtros;
void(s.t());
}
});
return true;
}
function reloadData_noticia(pagina)
{
filtros='';
Fechas='';
if ($("[id=\"Todo\"]").is(':checked')){Fechas+="todo";filtros+=':act_fecha_todo';}
if ($("[id=\"Hoy\"]").is(':checked')){Fechas+="0";filtros+=':act_fecha_0';}
if ($("[id=\"Últimos 7 días\"]").is(':checked')){Fechas+="7";filtros+=':act_fecha_7';}
if ($("[id=\"Último mes\"]").is(':checked')){Fechas+="30";filtros+=':act_fecha_30';}
if ($("[id=\"Último año\"]").is(':checked')){Fechas+="365";filtros+=':act_fecha_365';}
//if (Fechas!='')Fechas=Fechas.substring(1,Fechas.length);
NoticiasEspec='';
if ($("[id=\"Especialidades Farmaceúticas\"]").is(':checked')){NoticiasEspec+="true";filtros+=':NoticiasEspec';}
NoticiasPrin='';
if ($("[id=\"Principios Activos\"]").is(':checked')){NoticiasPrin+="true";filtros+=':NoticiasPrin';}
Categorias='';
if ($("[id=\"Legislación\"]").is(':checked')){Categorias+=",'2'";filtros+=':act_cat_2';}
if ($("[id=\"Farmacología\"]").is(':checked')){Categorias+=",'5'";filtros+=':act_cat_5';}
if ($("[id=\"Alertas medicamentos\"]").is(':checked')){Categorias+=",'6'";filtros+=':act_cat_6';}
if ($("[id=\"Congresos / formación\"]").is(':checked')){Categorias+=",'7'";filtros+=':act_cat_7';}
if ($("[id=\"Nuestra compañía\"]").is(':checked')){Categorias+=",'8'";filtros+=':act_cat_8';}
if ($("[id=\"Industria farmacéutica\"]").is(':checked')){Categorias+=",'9'";filtros+=':act_cat_9';}
if ($("[id=\"Publicaciones\"]").is(':checked')){Categorias+=",'10'";filtros+=':act_cat_10';}
if ($("[id=\"Patologías\"]").is(':checked')){Categorias+=",'11'";filtros+=':act_cat_11';}
if ($("[id=\"Convocatorias / concursos\"]").is(':checked')){Categorias+=",'12'";filtros+=':act_cat_12';}
if ($("[id=\"Premios\"]").is(':checked')){Categorias+=",'14'";filtros+=':act_cat_14';}
if ($("[id=\"Asociaciones médicas\"]").is(':checked')){Categorias+=",'15'";filtros+=':act_cat_15';}
if ($("[id=\"Industria médica\"]").is(':checked')){Categorias+=",'16'";filtros+=':act_cat_16';}
if ($("[id=\"Terapias\"]").is(':checked')){Categorias+=",'17'";filtros+=':act_cat_17';}
if (Categorias!='')Categorias=Categorias.substring(1,Categorias.length);
$.get('../../emptyNoCache/busqueda/all?prefix=%25&pagina='+pagina+'&ajax=1&in.050=050&name='+remove_spechar(document.getElementById('thename').value)+'&Fechas='+Fechas+'&Categorias='+Categorias+"&NoticiasEspec="+NoticiasEspec+"&NoticiasPrin="+NoticiasPrin,
function(data){
document.getElementById('noticia').innerHTML = data;
if (document.getElementById('hidden_noticia'))
{
document.getElementById('number_noticia').innerHTML=document.getElementById('hidden_noticia').value;
xx=0;
if (document.getElementById('hidden_espec'))xx+=eval(document.getElementById('hidden_espec').value);
if (document.getElementById('hidden_labo'))xx+=eval(document.getElementById('hidden_labo').value);
if (document.getElementById('hidden_sustancia'))xx+=eval(document.getElementById('hidden_sustancia').value);
if (document.getElementById('hidden_tera'))xx+=eval(document.getElementById('hidden_tera').value);
if (document.getElementById('hidden_noticia'))xx+=eval(document.getElementById('hidden_noticia').value);
document.getElementById('total').innerHTML=xx;
}
else document.getElementById('number_noticia').innerHTML='0';
if (filtros!=''){
s.events="event9";
filtros=filtros.substring(1,filtros.length);
s.eVar13=filtros;
void(s.t());
}
});
return true;
}
function reloadData_labo(pagina)
{
$.get('../../emptyNoCache/busqueda/all?prefix=%25&pagina='+pagina+'&ajax=1&in.040=040&in.045=045&name='+remove_spechar(document.getElementById('thename').value),
function(data){
document.getElementById('labo').innerHTML = data;
if (document.getElementById('hidden_labo'))
{
document.getElementById('number_labo').innerHTML=document.getElementById('hidden_labo').value;
xx=0;
if (document.getElementById('hidden_espec'))xx+=eval(document.getElementById('hidden_espec').value);
if (document.getElementById('hidden_labo'))xx+=eval(document.getElementById('hidden_labo').value);
if (document.getElementById('hidden_sustancia'))xx+=eval(document.getElementById('hidden_sustancia').value);
if (document.getElementById('hidden_tera'))xx+=eval(document.getElementById('hidden_tera').value);
if (document.getElementById('hidden_noticia'))xx+=eval(document.getElementById('hidden_noticia').value);
document.getElementById('total').innerHTML=xx;
}
else document.getElementById('number_labo').innerHTML='0';
});
return true;
}
function reloadData_sustancia(pagina)
{
$.get('../../emptyNoCache/busqueda/all?prefix=%25&pagina='+pagina+'&ajax=1&in.020=020&in.025=025&name='+remove_spechar(document.getElementById('thename').value),
function(data){
document.getElementById('sustancia').innerHTML = data;
if (document.getElementById('hidden_sustancia'))
{
document.getElementById('number_sustancia').innerHTML=document.getElementById('hidden_sustancia').value;
xx=0;
if (document.getElementById('hidden_espec'))xx+=eval(document.getElementById('hidden_espec').value);
if (document.getElementById('hidden_labo'))xx+=eval(document.getElementById('hidden_labo').value);
if (document.getElementById('hidden_sustancia'))xx+=eval(document.getElementById('hidden_sustancia').value);
if (document.getElementById('hidden_tera'))xx+=eval(document.getElementById('hidden_tera').value);
if (document.getElementById('hidden_noticia'))xx+=eval(document.getElementById('hidden_noticia').value);
document.getElementById('total').innerHTML=xx;
}
else document.getElementById('number_sustancia').innerHTML='0';
});
return true;
}
function reloadData_tera(pagina)
{
$.get('../../emptyNoCache/busqueda/all?prefix=%25&pagina='+pagina+'&ajax=1&in.030=030&in.035=035&name='+remove_spechar(document.getElementById('thename').value),
function(data){
document.getElementById('tera').innerHTML = data;
if (document.getElementById('hidden_tera'))
{
document.getElementById('number_tera').innerHTML=document.getElementById('hidden_tera').value;
xx=0;
if (document.getElementById('hidden_espec'))xx+=eval(document.getElementById('hidden_espec').value);
if (document.getElementById('hidden_labo'))xx+=eval(document.getElementById('hidden_labo').value);
if (document.getElementById('hidden_sustancia'))xx+=eval(document.getElementById('hidden_sustancia').value);
if (document.getElementById('hidden_tera'))xx+=eval(document.getElementById('hidden_tera').value);
if (document.getElementById('hidden_noticia'))xx+=eval(document.getElementById('hidden_noticia').value);
document.getElementById('total').innerHTML=xx;
}
else document.getElementById('number_tera').innerHTML='0';
});
return true;
}
function omniture_registration()
{
s.events="event1";
var omn_CO='';
var omn_PRO='';
var omn_SPE='';
if(document.getElementById('Pais'))omn_CO = document.getElementById('Pais').options[document.getElementById('Pais').selectedIndex].text;
if(document.getElementById('Profesiones'))omn_PRO = document.getElementById('Profesiones').options[document.getElementById('Profesiones').selectedIndex].text;
if(document.getElementById('Especialidades'))
{
if(document.getElementById('Especialidades').selectedIndex != -1)
omn_SPE = document.getElementById('Especialidades').options[document.getElementById('Especialidades').selectedIndex].text;
}
s.eVar22=noaccent(omn_CO);
s.eVar23=noaccent(omn_PRO);
s.eVar24=noaccent(omn_SPE);
void(s.t());
return true;
}
function get_rss_feed(flujo,color,id_flujo) {
var title_channel;
var link_channel;
var description_channel;
var i=0;
//clear the content in the div for the next feed.
$("#feedContent").empty();
//use the JQuery get to grab the URL from the selected item, put the results in to an argument for parsing in the inline function called when the feed retrieval is complete
$.get('http://www.vademecum.es/rss/proxy.php?url='+flujo, function(d) {
title_channel = $(d).find('channel').children('title').text();
link_channel = $(d).find('channel').children('link').text();
var html ="
|
" + description + "";
html += "Ver más información |