function home(){
	window.location.href ='index.php?ap=home';
}
function prezentare(){
	window.location.href ='index.php?ap=prezentare';
}
function parc(){
	window.location.href ='index.php?ap=parc';
}
function program(){
	window.location.href ='index.php?ap=program';
}
function inchirieri(){
	window.location.href ='index.php?ap=inchirieri';
}
function contact(){
	window.location.href ='index.php?ap=contact';
}
function rezervari(){
	window.location.href ='index.php?ap=rezervari';
}

function getXMLHttpObj(){
	if(typeof(XMLHttpRequest)!='undefined')
	return new XMLHttpRequest();
	
	var axO=['Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.4.0',
		'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'], i;
	for(i=0;i<axO.length;i++)
		try{
			return new ActiveXObject(axO[i]);
		}catch(e){}
	return null;
}
	
function getcurse(){
	var x= document.getElementById('cursee');
	var y= document.getElementById('dus');
	var z= document.getElementById('intors');
		
	var data='data='+y.checked+'|'+z.checked;
		
	var oXML=getXMLHttpObj();

	oXML.open('POST', 'php/getDusIntors.php', false);
	oXML.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	oXML.send(data);
	var drps = oXML.responseText;
	x.innerHTML=drps;
}

function gettime(t){
	
	if (t==1){
		var x= document.getElementById('tdus');
		var y= document.getElementById('dd_dus');
	}else{
		var x= document.getElementById('tintors');
		var y= document.getElementById('dd_intors');
	};
	
	var data='data='+t+'|'+y.value;
	var oXML=getXMLHttpObj();

	oXML.open('POST', 'php/getTime.php', false);
	oXML.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	oXML.send(data);
	var drps = oXML.responseText;
	x.innerHTML=drps;
}

function sendmail(){
		
	if(document.getElementById('nume').value == ''){
		alert('Va rog sa completati numele!');			
	}else
	if(document.getElementById('prenume').value == ''){
		alert('Va rog sa completati prenumele!');			
	}else
	if(document.getElementById('telefon').value == ''){
		alert('Va rog sa completati numarul de telefon!');			
	}else
	if(document.getElementById('data').value == ''){
		alert('Va rog sa completati data!');			
	}else
	if(document.getElementById('dus').checked == false && document.getElementById('intors').checked == false){
		alert('Va rog sa completati: DUS, INTORS!');			
	}else{
		document.getElementById('rezfrm').submit();
	}
}
