var optionNo = 0

function vision() {
	STOP_RP();
	document.getElementById("loading").style.visibility="hidden";
	document.getElementById("loaded").style.visibility="visible";
}

function fileLoaded() {
	//alert("File caricato!");
	//document.location.href='fine.cfm?t='+token;
	document.Gui_RP.submit();
}

function report_RP(s,num) {
	alert(s);
}

function setRecordLevel(num){}

function setStatus_RP(str,num) {
	document.Gui_RP.Status.value = str;
	if(num==7) fileLoaded();
}

function setTimer_RP(s)	{
	document.Gui_RP.Timer.value = s;
}

function confirmRecord(s, num)	{
	if(confirm(s))
		RECORD_RP();
	else
		STOP_RP();
}

function addName(s)	{
	//var newOpt  = new Option(String(s),String(s));
	//var VILength = document.Gui_RP.VoiceItems.length;
	//document.Gui_RP.VoiceItems.options[VILength] = newOpt;
	document.Gui_RP.FileName.value = FileName;
}

function RECORD_RP() {
	document.RPApplet.RECORD();
}

function setparameter()	{
	document.RPApplet.SETPARAMETER(String("bla"),String("BLABLA"));
}

function PLAYBACK_RP()	{
	document.RPApplet.PLAYBACK();
}

function PAUSE_RP()	{
	document.RPApplet.PAUSE();
}

function STOP_RP()	{
	document.RPApplet.STOP_RP();
}

function UPLOAD_RP() {
	/*
	document.RPApplet.SETPARAMETER(String("nome"),document.Gui_RP.vp__nome.value);
	document.RPApplet.SETPARAMETER(String("cognome"),document.Gui_RP.vp__cogn.value);
	document.RPApplet.SETPARAMETER(String("email"),document.Gui_RP.vp_email.value);
	document.RPApplet.SETPARAMETER(String("nomefile"),document.Gui_RP.FileName.value);
	*/
	document.RPApplet.UPLOAD(String(document.Gui_RP.FileName.value));
}

function WEBPLAY_RP()	{
	document.RPApplet.WEBPLAY(UserServerFolder + "/" + document.Gui_RP.VoiceItems.value);
}

