//tipus: tipus de tag a incloure (IFR-->IFRAME,JSC-->JavaScript,PRO-->Propi)
//identificador: 
//  IFR/JSC id de la unitat de contingut 
//  PRO link (http://www......)
//amplada i alcada: tamanys del banner
//objectiu: a on s'ha d'obrir al fer click en el banner (_top, _blank,...)
//magic: tipus de banner 
// IFR/JSC	1	468x60
// IFR/JSC	16	popup
// IFR/JSC	24	90x90
// IFR/JSC	47	86x58
// IFR/JSC	220	140x400
// PRO		url de l'imatge (http://www.....)

function pinta(tipus,identificador,amplada,alcada,magic,objectiu)
{
//  log per saber quins html ho fan servir	
//  stats = "referrer=" + escape(window.document.referrer);
//  stats += "&agent=" + escape(navigator.userAgent);
//  document.write('<img border="0" height="10" width="10" src="http://php.ccrtvi.com/control/control.php?siteid=noticies&' + stats +'" style="visibility:hidden;display:none">');
//	

 var rndURL = 10000000000000000*Math.random();

 switch (tipus)
 {
  case "IFR" :
   document.write('<IFRAME WIDTH='+amplada+' HEIGHT='+alcada+' NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC="http://adserver.adtech.de/?adiframe|2.0|39|'+identificador+'|1|'+magic+'|target='+objectiu+'&rndURL='+rndURL+';">');
   document.write('<script language=javascript src="http://adserver.adtech.de/?addyn|2.0|39|'+identificador+'|1|'+magic+'|target='+objectiu+'&rndURL='+rndURL+';loc=700;"></script>');
   document.write('<noscript><a href="http://adserver.adtech.de/?adlink|2.0|39|'+identificador+'|1|'+magic+'|ADTECH&rndURL='+rndURL+';loc=300;" target='+objectiu+'><img src="http://adserver.adtech.de/?adserv|2.0|39|'+identificador+'|1|'+magic+'|ADTECH&rndURL='+rndURL+';loc=300;" border=0 width='+amplada+' height='+alcada+'></a></noscript></IFRAME>');
   return;
  case "JSC" :
    cadena1="<";
    cadena20="script";
    cadena21="/script";
    cadena3=">";
    document.write(''+cadena1+''+cadena20+' language=javascript src="http://adserver.adtech.de/?addyn|2.0|39|'+identificador+'|1|'+magic+'|target='+objectiu+'&rndURL='+rndURL+';loc=100;"><!--');
    document.write('var a ="|2.0|39|'+identificador+'|1|'+magic+'|target='+objectiu+'&rndURL='+rndURL+';loc=200;"; var h = "http://adserver.adtech.de/?"; var u = navigator.userAgent; ');
    document.write('if (u.indexOf("Mozilla/2.") != 0 || u.indexOf("MSIE") >= 0) document.write("<a href=\""+h+"adlink"+a+"\" target='+objectiu+'><img src=\""+ h+"adserv"+a+"\" border=0 width='+amplada+' height='+alcada+'></a>"); ');
    document.write('//-->'+cadena1+''+cadena21+''+cadena3+'');
    document.write('<noscript><a href="http://adserver.adtech.de/?adlink|2.0|39|'+identificador+'|1|'+magic+'|ADTECH;loc=300;" target='+objectiu+'><img src="http://adserver.adtech.de/?adserv|2.0|39|'+identificador+'|1|'+magic+'|ADTECH;loc=300;" border=0 width='+amplada+' height='+alcada+'></a></noscript>');
   return;
  case "PRO" :
   document.write('<a href="'+identificador+'" target='+objectiu+'><img src="'+magic+'" border=0 width='+amplada+' height='+alcada+'></a>');
   return;
  default :
   document.write('');
   return;

 }
}

function nopinta()
{
//no hi ha tag definit
document.write('');
}

function posicio(website,seccio,tipus,localitzacio)
{
 switch (website)
 {
  case "noticies_r" :
     switch (tipus)
     {
      case "button" :
        switch (localitzacio)
        {
          case "left_1" :	 
           //pinta("IFR","62896","90","90","24","_blank"); 
//           pinta("PRO","http://www.catalunyainformacio.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
           return;
          default :	 
           nopinta(); 
           return;           
        }
        return;
      default :
       nopinta();
       return;
     } 
     return;
   return;


  case "noticies" :





   switch (seccio)
	   {
	    case "comarques" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62895","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62896","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62897","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          
			   return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62898","140","400","220","_blank"); 
	       return;
	      case "popup" :
	       //pinta("IFR","101014","1","1","16","_blank"); 
	       pinta("JSC","101014","1","1","16","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "cultura" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62911","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62912","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62913","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          
			   return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","62914","140","400","220","_blank"); 
	       pinta("JSC","62914","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "economia" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62903","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62904","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/especials/maratotv3/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_self");  
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
			   return;
	          case "left_2" :	 
	           //pinta("IFR","62905","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          
			   return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","62906","140","400","220","_blank"); 
	       pinta("JSC","62906","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "esports" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62915","468","60","1","_blank"); 
	       //pinta("IFR","62915","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62916","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62917","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          
			   return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62918","140","400","220","_blank"); 
	       return;
	      case "popup" :
	       //pinta("IFR","62919","1","1","16","_blank"); 
	       pinta("JSC","62919","1","1","16","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	     
	    case "esports#travessa" :
	    	switch (tipus)
	    	{
		 case "banner" :
	       	   //pinta("IFR","118117","468","60","1","_blank"); 
	       	   pinta("JSC","118117","468","60","1","_blank"); 
	       	   return;	
	    	}  
	    	return;
	     
	    case "extras" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62927","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62928","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62929","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","62930","140","400","220","_blank"); 
	       pinta("JSC","62930","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "forums" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62931","468","60","1","_blank"); 
	       //pinta("IFR","62931","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62932","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62933","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62934","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "home" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62883","468","60","1","_blank"); 
	       //pinta("IFR","62883","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62884","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62885","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "popup" :
		//window.open('http://www.telenoticies.com/especials/iraq/popup.htm','resum','width=325,height=450,top=250,left=100,scrollbars')
	       pinta("JSC","62886","1","1","16","_blank"); 
	       //pinta("IFR","62886","1","1","16","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "internac" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62887","468","60","1","_blank"); 
	       //pinta("IFR","62887","468","60","1","_blank"); 
	       return;
	      case "button" :
	      
	      
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62888","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62889","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	          return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	        
	      case "popup" :
	      //window.open('http://www.telenoticies.com/especials/iraq/popup.htm','resum','width=325,height=450,top=250,left=100,scrollbars')
		//pinta("IFR","79476","1","1","16","_blank"); 
		pinta("JSC","79476","1","1","16","_blank"); 
	       return;
	      case "sky" :
	       pinta("JSC","62890","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	       
	
	 
	     } 
	     return;
	    case "newsletter" :
	     switch (tipus)
	     {
	      case "banner" :
	       nopinta(); 
	       //pinta("IFR","","468","60","1","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "ainternet" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62907","468","60","1","_blank"); 
	       //pinta("IFR","62907","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62908","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62909","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62910","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "politica" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62891","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62892","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62893","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	          pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","62894","140","400","220","_blank");  
	       pinta("JSC","62894","140","400","220","_blank");  
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "societat" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62899","468","60","1","_blank"); 
	       //pinta("IFR","62899","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62900","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62901","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62902","140","400","220","_blank");  
	       return;
	      case "popup" :
	      pinta("JSC","72024","1","1","16","_blank"); 
	       //pinta("IFR","72024","1","1","16","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "eltemps" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62920","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62921","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62922","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "popup" :
	       pinta("JSC","101010","1","1","16","_blank");
	       return; 
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "videoaudio" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62923","468","60","1","_blank"); 
	       //pinta("IFR","62923","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62924","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62925","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	            return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","62926","140","400","220","_blank");  
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "comunica" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","71141","468","60","1","_blank"); 
	       //pinta("IFR","71141","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","71142","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","71143","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	            return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       pinta("JSC","71144","140","400","220","_blank");  
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;    
	     
	     case "eleccions" :
	     switch (tipus)
	     {
	      case "sky" :
	       pinta("JSC","81114","140","400","220","_blank");  
	       //pinta("IFR","81114","140","400","220","_blank");  
	       return;
	      case "roba" :
	       //pinta("IFR","103682","180","190","313","_top"); 
	       pinta("JSC","103682","180","190","313","_top"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	     
	     case "streaming" :
	     switch (tipus)
	     {
	      case "sky" :
	       pinta("JSC","86529","140","400","220","_blank");  
	       //pinta("IFR","86529","140","400","220","_blank");  
	       return;
	      case "roba" :
	       //pinta("IFR","106418","180","190","313","_top");
	       pinta("JSC","106418","180","190","313","_top"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	
	     return;
	     
	     case "especial" :
	     switch (tipus)
	     {
	      case "sky" :
	       pinta("JSC","79477","140","400","220","_blank");  
	       //pinta("IFR","79477","140","400","220","_blank");  
	       return;
	      
	      case "roba" :
	       //pinta("IFR","102530","180","190","313","_top"); 
	       pinta("JSC","102530","180","190","313","_top"); 
	       return;
	      case "banner" :
	       //pinta("IFR","107355","468","60","1","_blank"); 
	       pinta("JSC","107355","468","60","1","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	    case "canalamena" :
	     switch (tipus)
	     {
	      case "banner" :
	       //pinta("IFR","88792","468","60","1","_blank"); 
	       pinta("JSC","88792","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","71142","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","71143","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	            return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","88793","140","400","220","_blank");  
	       pinta("JSC","88793","140","400","220","_blank");  
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;    
	    case "fotos" :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","90649","468","60","1","_blank"); 
	       //pinta("IFR","90649","468","60","1","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;    
	     
	     
	     case "jocs" :
	     switch (tipus)
	     {
	      case "sky" :
	       pinta("JSC","132354","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	     	     
	     
	     case "galeriafotos" :
	     switch (tipus)
	     {
	      case "banner" :
	       //pinta("IFR","102954","468","60","1","_blank"); 
	       pinta("JSC","102954","468","60","1","_blank"); 
	       //pinta("IFR","71141","468","60","1","_blank"); 
	       return;
	      
	      case "sky" :
	       //pinta("IFR","102953","140","400","220","_blank");  
	       pinta("JSC","102953","140","400","220","_blank");  
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;       
	    
	       
	///////////////agafem les comarques com a default (CGC)
	    default :
	     switch (tipus)
	     {
	      case "banner" :
	       pinta("JSC","62895","468","60","1","_blank"); 
	       //pinta("IFR","62895","468","60","1","_blank"); 
	       return;
	      case "button" :
	        switch (localitzacio)
	        {
	          case "left_1" :	 
	           //pinta("IFR","62896","90","90","24","_blank"); 
	           //pinta("PRO","http://www.telenoticies.com/seccio/esports.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies1_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/resum2002/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botoESP2002.gif","_self");
	           return;
	          case "left_2" :	 
	           //pinta("IFR","62897","90","90","24","_blank"); 
	           //pinta("PRO","http://www.tvcatalunya.com/cuines","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/noticies2_90x90.gif","_blank"); 
	           pinta("PRO","http://www.telenoticies.com/especials/angelsfeliu/index.htm","90","90","http://www.tvcatalunya.com/banner/noticies/estatiques/botofeliu.gif","_blank"); 
	           return;
	          default :	 
	           nopinta(); 
	           return;           
	        }
	        return;
	      case "sky" :
	       //pinta("IFR","62898","140","400","220","_blank"); 
	       pinta("JSC","62898","140","400","220","_blank"); 
	       return;
	      default :
	       nopinta();
	       return;
	     } 
	     return;
	   } 
   return;
  default :
   nopinta();
   return; 
 }
}


