function checkDayInput(form) {
	var form = document.newAgenda;
	if(form.beginMonth.value && form.beginDay.value && form.beginYear.value) {
		//myMonth = getMonthF(form.beginMonth.value);
		myInput = "Create agenda: " + form.title.value + "\nDay 1: " + 
				form.beginMonth.value + "-" + form.beginDay.value + "-" + form.beginYear.value +
		 		"\nYou can add more days later";
		return confirm(myInput);
	} else {
		alert("Please select \"MONTH\" and \"DAY\" and \"YEAR\" for day 1");
		return false;
	}
}

var ee = "";
var eee = ""; 
var firstTime = 0;
function getInputValue(inputValue, lastValue, oldValue) {
	//var oldValue = document.editMyDay.oldValue.value; 
	//alert(oldValue);
	if(firstTime > 0) {
		eee = ee;
		
	} else {
		ee = oldValue;
		eee = oldValue;
	}
	msg = "conflict order #" + inputValue; 
	if(eee.match(inputValue) && firstTime > 0) {
		alert(msg);
	} else {
		
		if(eee.match(inputValue)) {
			//msg = "order conflict:  " + inputValue; 
			alert(msg);
		} 
	}
	if(!(ee.match(inputValue))) {
		if(lastValue != inputValue) {
			var temp = "" + lastValue + "";
			pos = ee.search(lastValue);
			mySize = temp.length;
			
			ee = ee.substring(0, pos) + ee.substring(pos+1);
			ee += inputValue + " ";
		} else {
			ee += inputValue + " ";	
		}
	}
	firstTime++;
}

function visi(nr) {
	if (document.layers) {
		vista = (document.layers[nr].visibility == 'hide') ? 'show' : 'hide'
		document.layers[nr].visibility = vista;
	} else if (document.all) {
		vista = (document.all[nr].style.visibility == 'hidden') ? 'visible'     : 'hidden';
		document.all[nr].style.visibility = vista;
	} else if (document.getElementById) {
		vista = (document.getElementById(nr).style.visibility == 'hidden') ? 'visible' : 'hidden';
		document.getElementById(nr).style.visibility = vista;
	}
}
    
function blocking(nr) {
	if (document.layers) {
		current = (document.layers[nr].display == 'none') ? 'block' : 'none';
		document.layers[nr].display = current;
	} else if (document.all) {
		current = (document.all[nr].style.display == 'none') ? 'block' : 'none';
		document.all[nr].style.display = current;
	} else if (document.getElementById) {
		vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
		document.getElementById(nr).style.display = vista;
	}
}

function view(url)
{
    newwindow=window.open(url,'BSAC','height=350,width=420');
	if (window.focus) {newwindow.focus()}
}
  
