number_of_sponsors_=4;

var sctr_=0;
var halt_=0;
var isn_=new Array();
for (i_=0;i_<number_of_sponsors_;i_++){
 isn_[i_]=new Image();
}
// archivos de BANNERS
isn_[0].src="images/cuadro/G_soja.jpg";
isn_[1].src="images/cuadro/G_maiz.jpg";
isn_[2].src="images/cuadro/G_trigo.jpg";
isn_[3].src="images/cuadro/G_girasol.jpg";

// URLs de links
var durl_=new Array();

durl_[0]="soja";
durl_[1]="maiz";
durl_[2]="trigo";
durl_[3]="girasol";

function rotateIt_(){
    if (halt_!=1){
        sctr_++;
        if (sctr_>number_of_sponsors_-1){
            sctr_=0;
        }
        document.sponsor_.src=isn_[sctr_].src;
        document.sponsor_.alt="Haga click para Ampliar";
        setTimeout("rotateIt_()",2000);
    }
}

function doIt_(){
//   window.open(durl[sctr],'_blank','menubar=0,scrollbars=no,toolbar=0,status=0,location=0,resizable=0,top=0,left=0,height=334,width=520');
//   popImage('http://192.168.1.78/Graficos/WebForm4.aspx?id=32&amp;prod='+durl_[sctr_]+'&amp;fecha_d=01/01/04&amp;fecha_h=01/01/06&amp;w='+window.screen.width+'&amp;h=600','Mercados');
   popImage('http://trantor.webserver.com.ar/Graficos/Mercado_Graf.aspx?id=38&amp;prod='+durl_[sctr_]+'&amp;w='+window.screen.width+'&amp;h=600','Mercados');
}

function dispIt_(){
   parent.window.status=durl_[sctr_];
 }
function dispnotIt_(){
   parent.window.status="";
 }

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 50;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');
writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');
writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');
writeln('if (isIE){');
writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');
writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');
writeln('window.innerHeight=document.images["George"].height;}');
writeln('window.moveTo((window.screen.width-window.document.body.offsetWidth)/2, (window.screen.height-window.document.body.offsetHeight-20)/2);}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');
writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body oncontextmenu="return false" bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body oncontextmenu="return false" bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">');
// onblur="self.close()"
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}

