
function goToURL(url, param, value) {
	//alert(url + "?" + param + "=" + value);
	location = url + "?" + param + "=" + value;
}

function validate_disco(nome, comentario) {
	if (nome=='' || comentario=='') {
		alert("Tem de preencher o campo Nome e Música desejada");
		 return false;
	}
	return true;
}

function validate_com(nome, comentario) {
	if (nome=='' || comentario=='') {
		alert("Tem de preencher o campo Nome e Comentario");
		 return false;
	}
	return true;
}


function setFieldValue(field, value1) {
	field.value = value1;
}

function playRba() {
	openWindow('rbaemissao', 'emissao.php', '605', '265', 'no');
}

function openWindow(name, url, w, h, scroll) {
	x = window.open(url, name,"width="+w+",height="+h+",status=no,toolbar=no,menubar=no,location=no,resizable=no,directories=no,scrollbars="+scroll);
}




// SLIDE IMAGES
var img = new Array(10);
var start = 1;
var counter = 1;
var delayTime = 1000;

if(document.images) {
   for(i = 1; i <= 10; i++) {
     img[i] = new Image();
     img[i].src = "images-galeria/thumbs/gal_" + i + ".jpg";
   }
 }

 function anim() {
   counter++;
   document.gal.src = img[counter].src;
   if(counter == 10)
    	counter = 0; //sets the counter value to 0
 }

 //function for starting the slide show
 function slide() {
     start = setInterval("anim()", delayTime);
     stShow.disabled = true;
     spShow.disabled = false;
 }

 //function to stop the slide show
 function stopSlide() {
   clearInterval(start);
 }