
	function Confirm(){
		return confirm("Are you sure to delete this record?");
	}
	
	function NewWindow(name, ref, w, h){
		win = window.open(ref, name, "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width="+w+",height="+h);
	}

	function Submit(fname, act, loc){
	    var target = eval('document.'+fname);
		target.action = loc+'&'+act;
		target.submit();
	}
	
    function clearSelectBox(field){
	  for(var i=0;i<field.options.length;i++){
	  	field.options[i].selected = false;
	  }
	}
	
	function testForExtension(formObj){ 
	 ext = formObj.value.substr((formObj.value.length - 3),3).toLowerCase();
	 if(ext == 'csv' || ext == 'xml'){
		document.uploadForm.submit();
	   return true;
	 }
	 else {
	   alert("Warning: Only csv and xml files are allowed to upload!");
	   return false;
	 }
	}	
	
	var days = new Array("zo","ma","di","wo","do","vr","za");
	var now, nowHours, nowMinutes, nowSeconds, nowDayOfWeek, nowDay, nowMonth, nowYear

	function showNow()
	{
		document.write('<div id="nowDiv" class="clock" name="nowDiv"></div>');
		loopNow();
	}
	
	function loopNow()
	{
		now = new Date();
		//Get values
		nowHours = '' + now.getHours();
		nowMinutes = '' + now.getMinutes();
		nowSeconds = '' + now.getSeconds();
		nowDayOfWeek = now.getDay();
		nowDay = '' + now.getDate();
		nowMonth = '' + (now.getMonth()+1);
		nowYear = '' + now.getYear();
		nowYear = nowYear.substring(nowYear.length-2, nowYear.length);
	
		//Adapt values
		if (nowHours.length == 1) nowHours = '0' + nowHours;
		if (nowMinutes.length == 1) nowMinutes = '0' + nowMinutes;
		if (nowSeconds.length == 1) nowSeconds = '0' + nowSeconds;
	
		if (nowDay.length == 1) nowDay = '0' + nowDay;
		if (nowMonth.length == 1) nowMonth = '0' + nowMonth;
	
		var strNow = days[nowDayOfWeek] + ' ' + nowDay + '/' + nowMonth + '/' + nowYear + '&nbsp;,&nbsp;&nbsp;&nbsp;' + nowHours + ':' + nowMinutes + ':' + nowSeconds;
		document.getElementById('nowDiv').innerHTML = strNow;
	
		setTimeout('loopNow()', 1000);
	}

	function popfoto(foto) {
		pop=open (foto, "foto", "toolbar=no, scrollbars=yes, directories=no, newbar=no, resizable=yes, status=no, width=620, height=520");
	}

