function favoritos(dominio, titulo){
	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=4)) {
		window.external.AddFavorite("http://"+dominio,titulo);
	} else {
		if(navigator.appName == "Netscape") 
			window.sidebar.addPanel(titulo, "http://"+dominio, "");
	}
}

function writeLayer(layerID,txt){
	if(document.getElementById){
		document.getElementById(layerID).innerHTML=txt;
	}else if(document.all){
		document.all[layerID].innerHTML=txt;
	}else if(document.layers){
		with(document.layers[layerID].document){
	 		open();
			write(txt);
			close();
		}
	}
}

function foco() {
	// Pone el focus en el primer elemento del formulario
	if (document.forms.length > 0) {
		var field = document.forms[0];
		for (i = 0; i < field.length; i++) {
			if ((field.elements[i].type == "text") || (field.elements[i].type == "password") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
				document.forms[0].elements[i].focus();
				break;
			}
		}
	}
}

function checkMaxSelected (select, maxSelected) {
  if (!select.storeSelections) {
    select.storeSelections = new Array(select.options.length);
    select.selectedOptions = 0;
  }
  for (var i = 0; i < select.options.length; i++) {
    if (select.options[i].selected && 
        !select.storeSelections[i]) {
      if (select.selectedOptions < maxSelected) {
        select.storeSelections[i] = true;
        select.selectedOptions++;
      }
      else {
        alert('Se pueden seleccionar como m?ximo ' + maxSelected + ' tem?ticas.');
        select.options[i].selected = false;
      }
    }
    else if (!select.options[i].selected &&
             select.storeSelections[i]) {
      select.storeSelections[i] = false;
      select.selectedOptions--;
    }
  }
} 

function setIndexes(sObjeto,valores){
	var objeto;
	if (document.getElementById) objeto=document.getElementById(sObjeto);
	else objeto=document.forms["formulario"][sObjeto];
	for(i=0;i<objeto.length;i++){
		objeto[i].selected = false; 
		for(j=0;j<valores.length;j++){
			objeto[i].selected = objeto[i].selected || (objeto[i].value == valores[j]);
		}
	}
}
function insertarOtro(){
	var fOtro = getElement("otro");
	fOtro.value="true";
	if (document.getElementById) document.getElementById("formulario").submit();
	else document.forms["formulario"].submit();
}

function ir(destino){
	getElement("fDestino").value=destino;
	submitar();
}

function getElement(name){
	if (document.getElementById) return document.getElementById(name);
	else return document.forms["formulario"][name];
}

function submitar(form){
	form = form?form:'formulario';
	if (document.getElementById) document.getElementById(form).submit();
	else document.forms[form].submit();
}

function comprobarTematicas(texto,id,form) {
	form = form?form:"formulario";
	var input;
	if (document.getElementById) input = document.getElementById(id);
	else input = document.forms[form][id];
	if (input.length==0) {
		if (texto!='') alert (texto);
		return false;
	}
	return true;
}

function comprobarMail(texto,id,form) {
	form = form?form:"formulario";
	var input;
	if (document.getElementById) input = document.getElementById(id);
	else input = document.forms[form][id];
	var x = input.value;
	//var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	var filter  = /^([a-zA-Z0-9_\.\-\?])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(x)) {
		if (texto!='') alert(texto);
		input.focus();
		return false;
	} else {
		return true;
	}
	return false;
}

function comprobarCampo(texto,id,form) {
	form = form?form:"formulario";
	var input;
	if (document.getElementById) input = document.getElementById(id);
	else input = document.forms[form][id];
	if (id.indexOf('fIdiomas')!=-1 || id.indexOf('fTematicas')!=-1 || id.indexOf('fCargoGenericoSeccion')!=-1 || id.indexOf('fCargoGenericoArea')!=-1) {
		for(i=0;i<input.length;i++){
			if(input[i].selected) return true;
		}
		if (texto!='') alert(texto);
		return false;
	} else if (input && input.options) {
		if (input.selectedIndex==-1 || input.options[input.selectedIndex].value==-1) {
			if (texto!='') alert(texto);
			return false;
		} else {
			return true;
		}
	} else {
		if (input && input.value==-1){alert(texto);input.focus();return false;}
		else if (id.indexOf('Difusion')!=-1 || id.indexOf('Tirada')!=-1 || id.indexOf('Ojd')!=-1) {
			input.value = sinPuntos(input.value);
			if (isNaN(input.value) || parseInt(input.value)<0) {
				if (texto!='') alert(texto);
				input.focus();
				return false;
			} else return true;
		} else if(input && trim(input.value)=='') {
			if (texto!='') alert(texto);
			input.focus();
			return false;
		}else return true;
	}
}

function sinPuntos(num){
	var tmp = num;
	while (tmp.indexOf(',')!=-1 || tmp.indexOf('.')!=-1) {
		tmp = tmp.replace(',','');
		tmp = tmp.replace('.','');
	}
	return tmp;
}

function recargarText(stext, valor, fo) {
	valor = ((valor==null)||(valor=="null")||(valor=="-1"))?"":valor;
	var texto;
	if (document.getElementById) texto = document.getElementById(stext);
	else {
		if (fo) texto = document.forms[fo][stext];
		else texto = document.forms["formulario"][stext];
	}
	texto.value=valor;
}

function recargarSelect(ssel,valor,fo) {
	var sel;
	if (document.getElementById) sel = document.getElementById(ssel);
	else {
		if (fo) sel = document.forms[fo][ssel];
		else sel = document.forms["formulario"][ssel];
	}
	// if (sel==null) alert(ssel+' nulo');
	for (i=0;i<sel.length;i++) {
		if(sel[i].value==valor) {
			sel[i].selected=true;
			break;
		}
	}
}

function recargarRadio(sradio,valor) {
	var radio = document.forms["formulario"][sradio];
	for (i=0;i<radio.length;i++) 
		if (radio[i].value==valor) {radio[i].checked=true;return;}
}
function recargarCheckBox(stext,valor){
	var checker;
	if (document.getElementById) checker = document.getElementById(stext);
	else checker = document.forms["formulario"][stext];
	checker.checked = eval(valor);
}

function recargarCheckBoxMultiple(stext,valor) {
	var checker;
	checker = document.forms["formulario"][stext];
	for (i=0;i<checker.length;i++)
		if (checker[i].value == valor) checker[i].checked=true;
}

function activarCheckBoxes(stext) {
	var checker;
	checker = document.forms["formulario"][stext];
	for (i=0;i<checker.length;i++)
		checker[i].disabled=false;
}

function cambiarSeccion(ssel,nSubsec,fo) {
	nSubsec = (nSubsec)?nSubsec:"fSubseccionDircom";
	var sel;
	if (document.getElementById) sel = document.getElementById(ssel);
	else {
		if (fo) sel = fo[ssel];
		else sel = document.forms["formulario"][ssel];
	}
	var index=sel.selectedIndex;
   var fSubsec;
   if (document.getElementById) fSubsec=document.getElementById(nSubsec);
   else {
	if (fo) fSubsec = fo[nSubsec];
	else fSubsec=document.forms["formulario"][nSubsec];
   }
   fSubsec.length=0;
   fSubsec.options[0]=new Option(a[index][0],v[index][0],'defauldSelected');
   for (i=1; i < a[index].length; i++) {
		fSubsec.options[i]=new Option(a[index][i],v[index][i]);
	}
}

function cambiarTematica(ssel,nSubsec,fo) {
	nSubsec = (nSubsec)?nSubsec:"fSubtematica";
	var sel;
	if (document.getElementById) sel = document.getElementById(ssel);
	else {
		if (fo) sel = fo[ssel];
		else sel = document.forms["formulario"][ssel];
	}
	var index=sel.selectedIndex;
   var fSubsec;
   if (document.getElementById) fSubsec=document.getElementById(nSubsec);
   else {
   	if (fo) fSubsec = fo[nSubsec];
   	else fSubsec=document.forms["formulario"][nSubsec];
   }
   fSubsec.length=0;
   fSubsec.options[0]=new Option(tem[index][0],idTem[index][0],'defauldSelected');
   for (i=1; i < tem[index].length; i++) {
		fSubsec.options[i]=new Option(tem[index][i],idTem[index][i]);
	}
}

function quitarTematica(sel){
	var fRolesAsignados = getElement(sel);
	if(fRolesAsignados.length>0 && fRolesAsignados.selectedIndex!=-1)
		fRolesAsignados[fRolesAsignados.selectedIndex]=null;
}

function anadirTematica(sel,tem,subtem,tipo){
	var fTematicas = getElement(sel);
	if(tem!='-1')
		var tem = getElement(tem);
	var subtem = getElement(subtem);
	var nom;
	var val;
	val = subtem[subtem.selectedIndex].value;
	if (val==-1) {
		if(tem!='-1') {
			val = tem[tem.selectedIndex].value;
			nom = tem[tem.selectedIndex].text;
		} else {
			val = -1;
			nom = '';
		}
	} else {
		if(tem!='-1')
			nom = tem[tem.selectedIndex].text + '>' + subtem[subtem.selectedIndex].text;
		else
			nom = subtem[subtem.selectedIndex].text;
	}
	if (val==-1) {
		if(tipo=='temaSeccion') alert('Selecciona el tema o subtema informativo de la secci?n o programa antes de a?adir');
		else if(tipo=='temaAreaR')	alert('Selecciona el tema o subtema del ?rea de redacci?n antes de a?adir');
		else if (tipo=='temaAreaG') alert('Selecciona el tema o subtema del ?rea antes de a?adir');
		else if (tipo=='tematica') alert('Selecciona la tem?tica o subtem?tica antes de a?adir');
		return;
	}
	for(i=0;i<fTematicas.length;i++) {
		if(fTematicas[i].value==val) {
			if(tipo=='temaSeccion') alert ('Ya has a?adido este tema informativo');
			else if(tipo=='temaAreaR') alert ('Ya has a?adido este tema de ?rea de redacci?n');
			else if (tipo=='temaAreaG') alert ('Ya has a?adido este tema de ?rea');
			else if (tipo=='tematica') alert ('Ya has a?adido esta tem?tica');
			return;
		}
	}
	fTematicas[fTematicas.length] = (new Option(nom,val));
	//fTematicas.onchange();
}

function cambiarAutonomia(nPais,nAuto,todas,fo) {
   nAuto = (nAuto)?nAuto:"fAutonomia";
   todas = (todas)?todas:"Todas";
   var fPais;
	if (document.getElementById) fPais = document.getElementById(nPais);
	else {
		if (fo) fPais=document.forms[fo][nPais];
		else fPais = document.forms['formulario'][nPais];
	}
   var fAuto;
   if (document.getElementById) fAuto=document.getElementById(nAuto);
   else {
   	if (fo) fAuto=document.forms[fo][nAuto];
   	else fAuto=document.forms['formulario'][nAuto];
   }
   fAuto.options.length=0;
   if (fPais[fPais.selectedIndex].value=='1') {
	   fAuto.options[0]=new Option(aut[0],idAut[0],'defaultSelected');
	   for (i=1; i < aut.length; i++) {
			fAuto.options[i]=new Option(aut[i],idAut[i]);
		}
	} else {
		if (fPais.selectedIndex==0) fAuto.options[0]=new Option('-','-1','defaultSelected');
		else fAuto.options[0]=new Option(todas,'-1','defaultSelected');
	}
}
function cambiarCargos(tipo,nSel,fo) {
   var sel;
   if (document.getElementById) sel=document.getElementById(nSel);
   else {
   	if (fo) sel=document.forms[fo][nSel];
   	else sel=document.forms['formulario'][nSel];
   }
   sel.options.length=0;
   if (tipo=='seccion') {
   	sel.options[0]=new Option(cgs[0],idCgs[0],'defaultSelected');
   	for (i=1; i < cgs.length; i++) sel.options[i]=new Option(cgs[i],idCgs[i]);
   } else if (tipo=='areaG') {
   	sel.options[0]=new Option(cgag[0],idCgag[0],'defaultSelected');
   	for (i=1; i < cgag.length; i++) sel.options[i]=new Option(cgag[i],idCgag[i]);
   } else if (tipo=='areaR') {
   	sel.options[0]=new Option(cgar[0],idCgar[0],'defaultSelected');
   	for (i=1; i < cgar.length; i++) sel.options[i]=new Option(cgar[i],idCgar[i]);
   }
}
function cambiarProvincia(nPais,nProv,fo) {
   nProv = (nProv)?nProv:"fProvincia";
   var sel;
	if (document.getElementById) sel = document.getElementById(nPais);
	else {
		if (fo) sel=document.forms[fo][nPais];
		else sel = document.forms['formulario'][nPais];
	}
   var index=sel.selectedIndex;
   var fProv;
   if (document.getElementById) fProv=document.getElementById(nProv);
   else {
   	if (fo) fProv=document.forms[fo][nProv];
   	else fProv=document.forms['formulario'][nProv];
   }
   fProv.options.length=0;
   fProv.options[0]=new Option(pr[index][0],idPr[index][0],'defaultSelected');
   for (i=1; i < pr[index].length; i++) {
		fProv.options[i]=new Option(pr[index][i],idPr[index][i]);
	}
}

function cambiarProvinciasDeAutonomia(nPais,nAut,nProv,fo) {
   nProv = (nProv)?nProv:"fProvincia";
   var sel;
	if (document.getElementById) sel = document.getElementById(nAut);
	else {
		if (fo) sel=document.forms[fo][nAut];
		else sel = document.forms['formulario'][nAut];
	}
   var index=sel.selectedIndex;
   if (index==0) {
   	if (fo) cambiarProvincia(nPais,nProv,fo);
   	else cambiarProvincia(nPais,nProv);
   } else {
	   var fProv;
	   if (document.getElementById) fProv=document.getElementById(nProv);
	   else {
	   	if (fo) fProv=document.forms[fo][nProv];
	   	else fProv=document.forms['formulario'][nProv];
	   }
	   fProv.options.length=0;
	   fProv.options[0]=new Option(prA[index][0],idPrA[index][0],'defaultSelected');
	   for (i=1; i < prA[index].length; i++) {
			fProv.options[i]=new Option(prA[index][i],idPrA[index][i]);
		}
	}
}
/*function cambiarComarca(nPro,nCom,fo) {
   nCom = (nCom)?nCom:"fComarca";
   var sel;
	if (document.getElementById) sel = document.getElementById(nPro);
	else {
		if (fo) sel=fo[nPro];
		else sel = document.forms['formulario'][nPro];
	}
   var index=sel.selectedIndex;
   var fCom;
   if (document.getElementById) fCom=document.getElementById(nCom);
   else {
   	if (fo) fCom=fo[nCom];
   	else fCom=document.forms['formulario'][nCom];
   }
   fCom.options.length=0;
   fCom.options[0]=new Option(co[index][0],idCo[index][0],'defaultSelected');
   for (i=1; i < co[index].length; i++) {
		fCom.options[i]=new Option(co[index][i],idCo[index][i]);
	}
}*/
function trim(inputString) {
   if (typeof inputString != "string") { return inputString; }
   var retValue = inputString;
   var ch = retValue.substring(0, 1);
   while (ch == " ") {
      retValue = retValue.substring(1, retValue.length);
      ch = retValue.substring(0, 1);
   }
   ch = retValue.substring(retValue.length-1, retValue.length);
   while (ch == " ") {
      retValue = retValue.substring(0, retValue.length-1);
      ch = retValue.substring(retValue.length-1, retValue.length);
   }
   while (retValue.indexOf("  ") != -1) {
      retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length);
   }
   return retValue;
}
function ventana(direccion,tipo) {
	
	var ancho;
	var alto;
	var ven;
		
	if (tipo=="medio"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="empresa"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="seccion"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="persona"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="vermas"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="trayectoria"){
		/*ancho = 534;
		alto = 500;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="listado"){
		ancho = 700;
		alto = 570;
	} else if (tipo=="lista") {
		/*ancho=550;
		alto = 595;*/
		ancho = 700;
		alto = 570;
	} else if (tipo=="imprimir") {
		ancho=0;
		alto = 0;
	} else if (tipo=="ayudadetallada") {
		ancho = 730;
		alto = 600;
	} else if (tipo=="especiales") {
		ancho= 400;
		alto = 300;
	} else if (tipo=="ayuda"){
		ancho= 600;
		alto = 400; 
	} else if (tipo=="mailingsuscriptor") {
		ancho= 950;
		alto = 600;
	} else if (tipo=="grupos") {
		ancho= 550;
		alto = 450;
	}
	if (tipo=="ayudadetallada"){
		//abrir ventana con otro nombre
		ven=window.open(direccion,'ayudadetallada','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left='+(screen.availWidth-ancho)/2+', top='+(screen.availHeight-alto)/2+',width='+ancho+',height='+alto);
		ven.focus();
	} else if (tipo=="imprimir") {
		ven=window.open(direccion,'imprimir','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left='+(screen.availWidth+3)+', top='+(screen.availHeight+3)+',width='+ancho+',height='+alto);
	} else if (tipo == "ayuda") {
		ven=window.open('/ayudadetallada/'+direccion+'.jsp',tipo,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left='+(screen.availWidth-ancho)/2+', top='+(screen.availHeight-alto)/2+',width='+ancho+',height='+alto);
		ven.focus();
	} else if (tipo == "grupos") {
		ven=window.open(direccion,'ventana','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left='+(screen.availWidth-ancho)/2+', top='+(screen.availHeight-alto)/2+',width='+ancho+',height='+alto);
		ven.focus();
	} else if (tipo == "listado") {
		ven=window.open(direccion,'ventana','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left='+(screen.availWidth-ancho)/2+', top='+(screen.availHeight-alto)/2+',width='+ancho+',height='+alto);
		ven.focus();
	} else {
		ven=window.open(direccion,'ventana','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left='+(screen.availWidth-ancho)/2+', top='+(screen.availHeight-alto)/2+',width='+ancho+',height='+alto);
		ven.focus();
	}
}

function reemplazarAcentos(s) {
	var l = trim(s);
	l = l.replace("%","%25");
	l = l.replace("?","%FA");
	l = l.replace("?","%B7");
	l = l.replace("'","%27");
	l = l.replace('"',"%22");
	l = l.replace("<","%3C");
	l = l.replace(">","%3E");
	l = l.replace("&","%26");
	l = l.replace("=","%3D");
	l = l.replace("\\","%5C");
	l = l.replace("$","%24");
	l = l.replace("[","%5B");
	l = l.replace("]","%5D");
	l = l.replace("{","%7B");
	l = l.replace("}","%7D");
	l = l.replace(";","%3B");
	l = l.replace("?","%3F");
	l = l.replace("/","%2F");
	l = l.replace("#","%23");
	l = l.replace("!","%21");
	l = l.replace(":","%3A");
	l = l.replace(",","%2C");
	l = l.replace("?","%E1");
	l = l.replace("?","%E9");
	l = l.replace("?","%ED");
	l = l.replace("?","%F3");
	l = l.replace("?","%E0");
	l = l.replace("?","%E8");
	l = l.replace("?","%F2");
	l = l.replace("?","%FC");
	l = l.replace("?","%E7");
	l = l.replace("?","%C1");
	l = l.replace("?","%C9");
	l = l.replace("?","%CD");
	l = l.replace("?","%D3");
	l = l.replace("?","%DA");
	l = l.replace("?","%C0");
	l = l.replace("?","%C8");
	l = l.replace("?","%D2");
	l = l.replace("?","%DC");
	l = l.replace("?","%C7");
	l = l.replace("?","%F1");
	l = l.replace("?","%D1");
	return l;
}
function actualizarPadre(forzar) {
	if ((forzar || event.clientY < 0) && window.opener)
		window.opener.location.reload();
	if (forzar) window.close();
}

function openNewWindow(URLtoOpen, windowName, windowFeatures) { 
  newWindow=window.open(URLtoOpen, windowName, windowFeatures);
}

function imprimirDiv(elDiv, css) {
	var doc = document.getElementById(elDiv);
    var win = window.open('', 'TrackHistoryData','width=740,height=325,top=200,left=250,toolbars=no,scrollbars=yes,status=no,resizable=no');
    win.document.writeln('<html><head><link rel="stylesheet" href="../../estilos/'+css+'" type="text/css"></head><body><br>');
    win.document.writeln(doc.innerHTML);
    win.document.writeln('</body></html>');
    win.document.close();
    win.focus();
    win.print();
    win.close();
}

function imprimirFicha(elDiv, css) {
	var doc = document.getElementById(elDiv);
    var win = window.open('', 'TrackHistoryData','width=740,height=600,top=100,left=250,toolbars=no,scrollbars=yes,status=no,resizable=no');
    win.document.writeln('<html><head><link rel="stylesheet" href="../../estilos/'+css+'" type="text/css"></head><body style="background-color:white"><br>');
    win.document.writeln('<div align="right"><img src="http://www.infoperiodistas.info/estilos/infoperiodistas5/img/logo273_es.gif"></div><br>');
    win.document.writeln('<div align="center">');
    win.document.writeln(doc.innerHTML);
    win.document.writeln('</div>');
    win.document.writeln('</body></html>');
    win.document.close();
    win.focus();
    win.print();
    win.close();
}

function ajustarTextArea(ta, tipo,min) {
var cols;
if (tipo=='ancho') cols = 112;
else cols = ta.cols;
//alert('cols='+cols);
	var a, i, c = 0;
	a = ta.value.split('\n');
	for (i = 0; i < a.length; i++) {
    	if (a[i].length > cols) {
	    	// find number of wrapped lines
    	    c += Math.floor(a[i].length / cols);
      	}
    }
    if (min)
    	ta.rows = Math.max(min,1 + c + a.length);
    else
	    ta.rows = 1 + c + a.length; // add number of wrapped lines to number of lines + 1
}
function share(site){
	var enlace="";
	var url=window.document.location.href;
	if(url.charAt(url.length-1)=="#") url=url.substring(0,url.length-1);
	var titulo=encodeURIComponent(window.document.title);
	if(site=="meneame") enlace="http://meneame.net/submit.php?url="+url;
	else if(site=="del.icio.us") enlace="http://del.icio.us/post?title="+titulo+"&url="+url;
	else if(site=="digg") enlace="http://digg.com/submit?phase=2&url="+url+"&title="+titulo;
	else if(site=="facebook") enlace="http://www.facebook.com/sharer.php?u="+url;
	else if(site=="yahoo") enlace="http://myweb2.search.yahoo.com/myresults/bookmarklet?u="+url+"&t="+titulo;
	else if(site=="fresqui") enlace="http://fresqui.com/enviar?url="+encodeURIComponent(url)+"&titulo="+titulo;
	else if(site=="technorati")	enlace="http://www.technorati.com/";
	else if(site=="myspace") enlace="http://www.myspace.com/Modules/PostTo/Pages/?u="+url;
	else if (site=="friendfeed") enlace="http://friendfeed.com/share?url="+url;
	else if (site=="twitter") enlace="http://twitter.com/home?status=Leyendo: "+titulo+" ("+url+")";
	else if (site=="linkedin") enlace="http://www.linkedin.com/shareArticle?mini=true&url="+url+"&title="+titulo+"&summary=";
	else if (site=="google") enlace="http://www.google.com/bookmarks/mark?op=edit&bkmk="+url+"&title="+titulo+"&annotation=";
	else if (site=="stumbleupon") enlace="http://www.stumbleupon.com/submit?url="+url;
	else if (site=="posterous") enlace="http://posterous.com/share?linkto="+url;
	//else if (site=="livejournal") enlace="";
	
	
	if(enlace!="") window.open(enlace);
	//return false
}