function assign(client,other)
{
	if(other != undefined){
		price = document.getElementById('priceother').value;
	}else if(client > 0){
		price = document.getElementById('price_'+client).value;
	}
	if(confirm("Are you sure to validate the inserted amount: "+price))
	{
		if(client > 0){
			ordre = document.getElementById('ordre_'+client).value;
			idobjet = document.getElementById('objet_'+client).value;
			currency = document.getElementById('cur_'+client).value;
			client = document.getElementById('client_'+client).value;
			limit = document.getElementById('limits').value;
			cat = document.getElementById('catalogue').value;
			val = document.getElementById('validate').value;
			url  = "main.php?action=listbids&price="+price+"&cat="+cat+"&ordre="+ordre+"&objet="+idobjet+"&currency="+currency+"&client="+client+"&validate="+val+"&limit="+limit;
			
		}else{
			idobjet = document.getElementById('objetother').value;
			client = document.getElementById('clientother').value;
			limit = document.getElementById('limits').value;
			cat = document.getElementById('catalogue').value;
			val = document.getElementById('validate').value;
			url  = "main.php?action=listbids&price="+price+"&cat="+cat+"&objet="+idobjet+"&client="+client+"&validate="+val+"&limit="+limit;
			
		}
		
	}else{
		//document.getElementById('validate').value="";
	}
	document.location = url;
}

function modprice(id_ordre){
	document.location ="main.php?action=listbids&limit=0&change=change&ordre_achat="+id_ordre+"#"+id_ordre;
}

function create_bid(url,nom,largeur,hauteur){
	var haut=(screen.height-hauteur)/2;
	var Gauche=(screen.width-largeur)/2;
	window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+"")
	 
}

