function mostrar_publicidad(hueco,num_ord,aWidth,aHeight){
	// Agilbanner
	//document.write('<SCR'+'IPT language="JavaScript" type="text/javascript" src="http://ad-creatividades.infojobs.net/agilbanner?hueco='+ hueco +'&tipo_peticion=1&ord='+num_ord+'"></SCR'+'IPT>');
	// DoubleClick
	var sMedidas="sz=";
	if(aWidth.length == aHeight.length){
		for(i=0;i<aWidth.length;i++){
			sMedidas+=((i>0)?",":"")+aWidth[i]+"x"+aHeight[i];
		}
		document.write('<scr'+'ipt language="JavaScript" src="http://ad.doubleclick.net/adj/mailxmail/'+hueco+';'+sMedidas+';ord='+num_ord+'?" type="text/javascript"></scr' + 'ipt>');
	}
}

// Smart AdServer
sas_tmstp=Math.round(Math.random()*10000000000);sas_masterflag=1;
function SmartAdServer(sas_pageid,sas_formatid,sas_target) {
 if (sas_masterflag==1) {sas_masterflag=0;sas_master='M';} else {sas_master='S';};
 document.write('<SCR'+'IPT SRC="http://www2.smartadserver.com/call/pubj/' + sas_pageid + '/' + sas_formatid + '/'+sas_master + '/' + sas_tmstp + '/' + escape(sas_target) + '?"></SCR'+'IPT>');
}

// Adsense
// This function displays the ad results.
// It must be defined above the script that calls show_ads.js
// to guarantee that it is defined when show_ads.js makes the call-back.
var iNumAds=0;
function google_ad_request_done(google_ads) {
	// Proceed only if we have ads to display!
    if (google_ads.length < 1 ) return;

	var sAds="";
	sTypeAds="IF";
	if(document.channel != 41) sTypeAds="IF";
	else if(document.channel == 41) sTypeAds="JS";
	
	if(document.formato == "250x250"){
	    sAds+="<div class=\"nubeTags\" style=\"width:250px\">";
	    sAds+="<div class=\"tit\">Enlaces patrocinados</div>";
	    sAds+="<div id=\"TambienADS\">";
	    if (google_ads[0].type == 'text') {
			for(i = 0; i < google_ads.length; ++i) {
		      	var sStatus=" onmouseover=\"window.status='Ir a " + google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\"";
			    sAds+="<a class=\"link\" href=\"" + google_ads[i].url + "\"" + sStatus + ">" + google_ads[i].line1 + "</a><br />" +
					"<span class=\"nolink\">" + google_ads[i].line2 + "&nbsp;" + google_ads[i].line3 + "</span><br />" +
					"<span class=\"linkmini\">" + google_ads[i].visible_url + "</span><br />";
				if(i<2) sAds+="<br />";
			}	    	
		}	    
	    sAds+="</div>";
	    sAds+="</div>";
	}else{
	    // Display ads in a table
	    sAds+="<div class=\"adsGoogle"+sTypeAds+"\" style=\"width:"+google_ad_width+"px\">";
	 
	    // Print "Ads By Google"
	    sAds+="<span id=\"tituloAds\">";
		sAds+="Enlaces patrocinados";
	    sAds+="</span><br>";  
	  
	    // For text ads, display each ad in turn.
	    // In this example, each ad goes in a new row in the table.
	    var sClassDiv="";
	    var sLinkBold="";
	    if (google_ads[0].type == 'text') {
			for(i = 0; i < google_ads.length; ++i) {
		      	var sStatus=" onmouseover=\"window.status='Ir a " + google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\"";
		        if(document.channel != 41){
			        sAds+="<div class=\"adsGoogleContent\"" + sStatus + " onclick=\"window.open('" + google_ads[i].url + "');\">" + 
						"<span class=\"link\">" + google_ads[i].line1 + "</span><br />" +
						"<span class=\"nolink\">" + google_ads[i].line2 + "&nbsp;" + google_ads[i].line3 + "</span><br />" +
						"<span class=\"linkmini\">" + google_ads[i].visible_url + "</span></div>";
		        }else{
			        sAds+="<div class=\"adsGoogleContent\"" + sStatus + " onclick=\"window.open('" + google_ads[i].url + "');\">" + 
						"<span class=\"link\">" + google_ads[i].line1 + "</span>" +
						"<span class=\"linkmini\">" + google_ads[i].visible_url + "</span><br />" +
						"<span class=\"nolink\">" + google_ads[i].line2 + "&nbsp;" + google_ads[i].line3 + "</span></div>";
				}
			}
			if(sTypeAds == "IF") sAds+="<br class=\"clear\" />";
			iNumAds+=google_ads.length;
	    }
	
	    // For an image ad, display the image; there will be only one .
	    if (google_ads[0].type == 'image') {
	      sAds+="<tr><td align=\"center\">" +
	        "<a href=\"" + google_ads[0].url + "\">" +
	        "<img src=\"" + google_ads[0].image_url + 
	        "\" height=\"" + google_ads[0].height + 
	        "\" width=\"" + google_ads[0].width +
	        "\" border=\"0\"></a></td></tr>";
	    }
	
	    // Finish up anything that needs finishing up
	    sAds+="</div>";
	  }
	  if(sTypeAds == "IF") $("#afcCh" + document.channel).html(sAds);
	  else document.write(sAds);
  }

  function google_afs_request_done(google_ads) {
    /*
     * Verify that there are actually ads to display.
     */
    var google_num_ads = google_ads.length;
    if (google_num_ads <= 0) {
    	return;
    }
	
	var wideAdsTop = "";   //wide ad unit html text
	var wideAdsBottom = "";   //wide ad unit html text
 
	for(i = 0; i < google_num_ads; i++){
		var sStatus=" onmouseover=\"window.status='Ir a " + google_ads[i].visible_url + "';return true;\" onmouseout=\"window.status='';return true;\" target=\"_blank\"";
		if(i == 0 || i == 3) sTitulo="<div class=\"tituloAdsAFS\"><span>Enlaces patrocinados</span></div>";
		else sTitulo="";
		if(i<3){
			wideAdsTop += "<tr><td colspan=\"2\">" + 
			sTitulo + "<a target=\"_blank\" href=\"" + google_ads[i].url + "\" " + sStatus + ">" + google_ads[i].line1 + "</a><br />" + 
			"<span id=\"grisPeque\">" + google_ads[i].line2 + "</span></td>" + 
			"<td colspan=\"3\"><a target=\"_blank\" href=\"" + google_ads[i].url + "\" " + sStatus + " class=\"linkminiDer\">" + google_ads[i].visible_url + "</a></td></tr>";
		}else{
			if(document.afsZone == "Videos"){
			}else{
				wideAdsBottom += "<tr><td colspan=\"2\">" + 
				sTitulo + "<a target=\"_blank\" href=\"" + google_ads[i].url + "\" " + sStatus + ">" + google_ads[i].line1 + "</a><br />" + 
				"<span id=\"grisPeque\">" + google_ads[i].line2 + "</span></td>" + 
				"<td colspan=\"3\"><a target=\"_blank\" href=\"" + google_ads[i].url + "\" " + sStatus + " class=\"linkminiDer\">" + google_ads[i].visible_url + "</a></td></tr>";
			}
		}
	}
		
	//** Write HTML for wide and narrow ads to the proper <div> elements
	if(document.afsZone == "Videos"){
		$("#tbodyAFSTop").html(wideAdsTop + "<tr><td colspan=\"4\" style=\"height:5px\"></td></tr>");
	    if(document.getElementById("tbodyAFSBottom") != null){
			$("#tbodyAFSBottom").html("<tr><td colspan=\"4\" style=\"height:5px\"></td></tr>" + wideAdsBottom);
		}
	}else{
		$("#tbodyAFSTop").html(wideAdsTop + "<tr><td colspan=\"5\" style=\"height:5px;background-color:#d1d1d1\"></td></tr>");
	    if(document.getElementById("tbodyAFSBottom") != null){
			$("#tbodyAFSBottom").html("<tr><td colspan=\"5\" style=\"height:5px;background-color:#d1d1d1\"></td></tr>" + wideAdsBottom);
		}
	}
  } 
  