function ajax_bus(MOD,FUNC,ID){
	//alert('Activated with '+MOD+' '+FUNC+' '+ID);
	url = 'ajax.php';
	pack = "mode=bus&mod="+MOD+"&func="+FUNC+"&id="+ID;
	/*JQUERY WAY*/

	$.ajax({
		type: "POST",
		url: url,
		data: pack,
		success: function(msg){
		temp = msg.split('@@');
		eval(temp[0]) (temp[1]);
		}
	});
}


function change_div(source){
	//alert(source);
	temp = source.split('||');
	//Fix the error
	target = temp[0];
	rest = '';
	for(i=1;i<temp.length;i++){
		if(i!=1) rest = rest+"||";
		rest = rest+temp[i];
	}

	$("#"+target).html(rest);
}

function replace_content2(source){
	temp = source.split('||');
	//Fix the error
	target = temp[0];
	rest = '';
	for(i=1;i<temp.length;i++){
		if(i!=1) rest = rest+"||";
		rest = rest+temp[i];
	}

	$("#"+target).html(rest);
	jQuery('#list1a').accordion();
}


function make_payment(id){
	document.location = 'payments.php?id='+id;
}

function multi_actions(actions){
	multi_temp = actions.split('^^');
	for(p=0;p<multi_temp.length;p++){
		vnew = multi_temp[p];
		t = vnew.split('++');
		eval(t[0]) (t[1]);
	}
	//alert("We found "+actions);
}


function selected_date(date){
	if((document.getElementById('service')) || (document.getElementById('voucher_num'))){
		$('#picked_date').val(date);
		dis_date = date.split("-");
		dis_date = dis_date[2]+"-"+dis_date[1]+"-"+dis_date[0];
		document.getElementById('display_date').innerHTML = "Selected Date: "+dis_date;
		check_for_times();
	}else{
		$('#mydate').val(date);
		document.booking.submit();
	}
}
