/* taken from songfestival.nl */
function makePopup(url, popupname, width, height, havescroll) {
	newWidth = parseInt(width);
	newHeight = parseInt(height);
	popParams= 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+havescroll+',resizable=no,width='+newWidth+',height='+newHeight;
	popup = window.open(url,popupname,popParams);
	popup.focus();
}

function gotoURL(url){
	if (url != ''){
		location.href = url;
	}
}

function openVideo( url ) {
	window.open(url,'videoWin','toolbar=no,status=yes,scrollbars=no,location=no,menubar=no,resizable=no,directories=no,width=730,height=510')
}

function setInnerSize(xsize, ysize) {
    if (window.innerWidth){
        iWidth = window.innerWidth;
        iHeight = window.innerHeight;
    }else{
        iWidth = document.body.clientWidth;
        iHeight =document.body.clientHeight;
    }
    iWidth = xsize - iWidth;
    iHeight = ysize - iHeight;
    window.resizeBy(iWidth, iHeight);
};

function checkMp3Ext(formObj) {
     var filename = formObj.elements['upload_0'].value;
     var filelength = parseInt(filename.length) - 3;
     var fileext = filename.substring(filelength,filelength + 3);

      // Check file extenstion
      if (fileext == "mp3" || fileext == "MP3"){
          formObj.submit();
      } else {
          alert ("U kunt alleen mp3 bestanden uploaden");
          formObj.elements['upload_0'].focus();
          return false;
      }

}
