<!--
var showCaddy = function(obj) {
	IreturnObject('panelCaddy').innerHTML = obj.responseText;
}

function getCaddy(pstrDirToRoot) {
	var IHTTP = new InternimHTTP();		

	IHTTP.appendData('dir', pstrDirToRoot);

	IHTTP.LoadURL(pstrDirToRoot + 'dynamic/get_caddy.php', 'GET', showCaddy);

	return true;
}

function getCaddyToPay(pstrDirToRoot) {
	var IHTTP = new InternimHTTP();		

	IHTTP.appendData('dir', pstrDirToRoot);

	IHTTP.LoadURL(pstrDirToRoot + 'dynamic/get_caddy_finish.php', 'GET', showCaddy);

	return true;
}

function addCaddy(pstrDirToRoot, pintProductId, intId) {
	var intQuantity = IreturnObject('quantity_' + intId).value;
	
	var IHTTP = new InternimHTTP();		

	IHTTP.appendData('id', pintProductId);
	IHTTP.appendData('qty', intQuantity);
	IHTTP.appendData('dir', pstrDirToRoot);

	IHTTP.LoadURL(pstrDirToRoot + 'dynamic/add_caddy.php', 'POST', showCaddy);
}

function deleteCaddy(pstrDirToRoot, pintProductId) {
	var IHTTP = new InternimHTTP();		

	IHTTP.appendData('id', pintProductId);
	IHTTP.appendData('dir', pstrDirToRoot);

	IHTTP.LoadURL(pstrDirToRoot + 'dynamic/delete_caddy.php', 'POST', showCaddy);
}

function PopupImage(img) {
	titre="Chateau Real Martin";
	w=open("",'image','width=640,height=480,toolbar=no,scrollbars=no,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>Chateau Real Martin</TITLE></HEAD>");
	w.document.write("<SCRIPT language=javascript>function checksize()  { if (document.images[0].complete) {  window.resizeTo(document.images[0].width+2,document.images[0].height+90); window.focus();} else { setTimeout('check()',250) } }</"+"SCRIPT>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
	w.document.write("");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function getCookie(name) {
	var ToExec = new RegExp(name + "=([^;]+)");
	var valeur = ToExec.exec(document.cookie);
	return (valeur != null) ? valeur[1] : null;
}

function setCookie(name, value) {
	document.cookie=  name + "=" + value + "; path=/";
}
function deleteCookie(name){
	setCookie(name,"");
}
//-->

