var VitesseOuvertureSM	= 20;
var IncrementationSM		= 30;
var leLienSM						= 'spedisci';
var NomDivSM						= 'DivSpedisci';
var PropRightSM					= 430;
var PropBottomSM				= 250;

//clip: rect(top right bottom left)

var ouvertureSM;
function CloseBoxSM(){
	window.document.getElementById(NomDivSM).style.display	= 'none'; 
	window.document.getElementById(leLienSM).onclick				= ouvrirSM; 
}

function EnregistreSM() { 
	window.document.getElementById(leLienSM).onclick = ouvrirSM; 
}

function ouvrirSM() { 
	window.document.getElementById(leLienSM).onclick=''; 
	window.document.getElementById(NomDivSM).style.clip = "rect(auto, 0px, 0px, auto)"; 
	window.document.getElementById(NomDivSM).style.display = 'block'; 
	ouvertureSM = window.setInterval("aggrandissementSM()",VitesseOuvertureSM);
}

function aggrandissementSM() { 
	clipPropSM = (window.document.getElementById(NomDivSM).style.clip).split(" "); 
	pixelSM		 = "px"; if(!document.all)	pixelSM+=","; 
	theRightSM  = new Number(clipPropSM[1].replace(new RegExp(pixelSM), '')); 
	theBottomSM = new Number(clipPropSM[2].replace(new RegExp(pixelSM), '')); 
	if(theBottomSM<PropBottomSM) theBottomSM = theBottomSM+IncrementationSM; 
	if(theRightSM<PropRightSM)   theRightSM  = theRightSM+IncrementationSM; 
	else {	
		window.clearInterval(ouvertureSM); window.document.getElementById(leLienSM).onclick=cacheBlocSM;
	} 
	window.document.getElementById(NomDivSM).style.clip="rect(auto, "+theRightSM+"px, "+theBottomSM+"px, auto)";
}

function cacheBlocSM() { 
	window.document.getElementById(NomDivSM).style.display = 'none'; 
	window.document.getElementById(leLienSM).onclick = ouvrirSM;
}
