function Start(page)
{ 
	OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,width=330,height=500,scrollbars=yes,resizable=no"); 
}

function abrirventana(url,vwidth,vheight)
{
        LeftPosition = (screen.width) ? (screen.width-vwidth)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-vheight)/2 : 0;
        var win_param;
        win_param="top="+TopPosition+",left="+LeftPosition+",width="+vwidth+",height="+vheight+"channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=no,status=0,toolbar=0,screenX=0,screenY=0";
		msgWindow=open(url,"smallWindow",win_param);
        msgWindow.focus();
        msgWindow.opener= self;
        return false;
}

var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
}
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}