var banner_escolhido=0;
      var s;

  function Clique(){
            window.open( s ,"_blank");
  }

   function infoquestgif(ativo,site,pos) {
	var r=Math.random();
	if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo -1) {
		document.write('<a href="http://'+site+'/?event=ClicarBanner&code='+r+'" target="_blank">');
		document.write('<img src="http://'+site+'/?event=MostrarBanner&pos='+pos+'&code='+r+'" border="0">');
		document.write('</a>');
	}
   }


   function infoquestflash(ativo,site,pos,largura,altura) {
	var r=Math.random();
	s = "http://"+site+"/?event=ClicarBanner&code="+r;
	if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo -1) {
	document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+largura+'" height="'+altura+'">');
  	document.write ('<param name=movie value="http://'+site+'/?event=MostrarBanner&pos='+pos+'&code='+r+'">');
  	document.write ('<param name=menu value=false>');
 	document.write ('<param name="wmode" value="transparent">');
 	document.write ('<param name=quality value=high>');
  	document.write ('<embed src="http://'+site+'/?event=MostrarBanner&pos='+pos+'&code='+r+'" menu=false quality=high bgcolor=#FFFFFF  width="'+largura+'" height="'+altura+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
  	document.write ('</embed>');
  	document.write ('</object>');
	}
   }

  function infoquestgenerica(ativo,site,pos,largura,altura) {
	var r=Math.random();
	if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo -1) {
              document.write('<iframe src="http://'+site+'/?event=MostrarBanner&pos='+pos+'&code='+r+'" width="'+largura+'" height="'+altura+'" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>');

	}
   }

 

   function wban(ativo,imagem,link){
	var r=Math.random();     /* Numero entre 0 e 1 */
//	alert('asdasda');
	if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo-1){	
	   // By Ricardo em 10/08/2001 para retirar o code do link document.write('<a href="'+link+'?code='+r+'" target="_blank">'); 
	   document.write('<a href="'+link+'" target="_blank">');
	   document.write('<img src="'+imagem+'?rnd='+r+'" border="0" >');
	   document.write('</a>');
	}
   }

   function wbanpopup(ativo,imagem,link,largura,altura){
	var r=Math.random();     /* Numero entre 0 e 1 */
	if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo-1){	
	   document.write('<a href="#" ');
	   document.write('onCLick="window.open(\'');
	   // by Ricardo em 08/10/2001 para retirar o code do link document.write(link+'?code='+r);
	   document.write(link);
	   document.write('\',\'\',\'');
	   document.write('top=0, left=0, toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,');
	   document.write('width='+largura+',height='+altura+'\'); return false;" >');
	   document.write('<img src="'+imagem+'?rnd='+r+'" border="0" >');
	   document.write('</a>');
	}
   }

   function wbanflash(ativo,flash,largura,altura){
	var r=Math.random();         /* Numero entre 0 e 1  */

	if (ativo ==0 || banner_escolhido <= ativo && banner_escolhido > ativo-1){	
	   document.write ('<param name=wmode value=transparent>');
           document.write('<param name=quality value=high> ');
	   document.write('<embed src="'+flash+'?rnd='+r+'" quality=high   ');
	   document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"      ');
	   document.write(' type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed> \n');
	   document.write('');
	}

   }

   function adclick(){
/*	****************************************************************
	parametros fornecidos pela DoubleClick	
	****************************************************************
*/
	document.write('<A HREF="http://ad.br.doubleclick.net/jump/N1658.correioweb/B37025;sz=468x60;ord=[timestamp]?">\n');
	document.write('<IMG SRC="http://ad.br.doubleclick.net/ad/N1658.correioweb/B37025;sz=468x60;ord=[timestamp]?" BORDER=0 WIDTH=468 HEIGHT=60 ALT="Clique Aqui!"></A>');
   }

   function flashdivirtase(flash,largura,altura){

	   document.write('<embed src="'+flash+'" quality=high   ');
	   document.write(' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"      ');
	   document.write(' type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed> \n');
	   document.write('');

   }

   function dart(ativo,canal,w,h,d){
     var r=Math.random();         /* Numero entre 0 e 1  */
     var a,b,c;

     if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo-1){	
	a= '<IFRAME SRC="http://ad.br.doubleclick.net/adi/'+canal+';'+d+';sz='+w+'x'+h+';ord='+r+'?" width="'+w+'" height="'+h+'" frameborder="no" border="0" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="no">';
	b='<A HREF="http://ad.br.doubleclick.net/jump/'+canal+';'+d+';abr=!ie;sz='+w+'x'+h+';ord='+r+'?">';
	c='<IMG SRC="http://ad.br.doubleclick.net/ad/'+canal+';'+d+';abr=!ie;sz='+w+'x'+h+';ord='+r+'?" border=0 height="'+h+'" width="'+w+'"></A></IFRAME>';
	document.write(a);
	document.write(b);
	document.write(c);
     }


   }   

   function wbangenerico(ativo,tag){
     if (ativo == 0 || banner_escolhido <= ativo && banner_escolhido > ativo-1){	
	document.write(tag);
     }
	
	
   }

   function desativar(){
       banner_escolhido = 1000;
   }

   function randomico(num){

        var ran = Math.random()*num;
	while (ran == 0){
           ran = Math.random()*num;
	}
	banner_escolhido = ran;
   }
   
