function change(script,element) {
   var ajax = new Ajax.Updater({success: element},script,{method: 'get',evalScripts:true});
}

function toggleplace(operator,num){

	var startit = $('pstart').value;
	startit = Number(startit);
	num = Number(num);
	if(operator == "next")
	{
	var next = startit + num;
	}
	else
	{
	var next = startit - num;
	}
	$('pstart').value = next;
	change('nextplace.php?start='+next,'placeblock');
	placestrans.custom(0,1.0);
}

function toggleplace_all(operator,num){

	var startit = $('pstart').value;
	startit = Number(startit);
	num = Number(num);
	if(operator == "next")
	{
	var next = startit + num;
	}
	else
	{
	var next = startit - num;
	}
	$('pstart').value = next;
	change('nextplace_all.php?start='+next,'placeblock');
	placestrans.custom(0,1.0);
}


function toggleuser(operator,num){
	var startit = $('ustart').value;
	startit = Number(startit);
	num = Number(num);
	if(operator == "next")
	{
	var next = startit + num;
	}
	else
	{
	var next = startit - num;
	}
	$('pstart').value = next;
	change('usertoggle.php?start='+next,'userblock');
	//usertrans.custom(0,1.0);
}
function toggleuser_all(operator,num){
	var startit = $('ustart').value;
	startit = Number(startit);
	num = Number(num);
	if(operator == "next")
	{
	var next = startit + num;
	}
	else
	{
	var next = startit - num;
	}
	$('pstart').value = next;
	change('usertoggle_all.php?start='+next,'userblock');
	//usertrans.custom(0,1.0);
}
function changeMyOrt()
{
	var newort = $('myplaces').value;
	change('changeplace.php?place='+newort,'placeline');
}

function checkname(name)
{
	var name = $('name').value;
	if(name)
	{
	change('checkname.php?name='+name,'namechk');
	}
}
