//Fonction qui se lance toute seule pour faire apparaître un msg dans la bar des Status
var msgbar="  www.ActiveService.Com  ";
var next;
var loop=3;
var count=-1;
function scrolling(string)
{
	if(count==-1) count=string.length*loop;
	window.status=string;
	next=string.substring(1,string.length)+string.charAt(0);
	count--;
	if(count>0) setTimeout('scrolling(next)',100);
}
scrolling(msgbar);


// Modifie l'aspect d'un lien (onMouseOver)
function setLinkOnOver(obj){
	setTextColor('#0000FF',obj);
	setTextDecoration('underline',obj);
}
// Modifie l'aspect d'un lien (onMouseOut)
function setLinkOnOut(obj){
	setTextColor('#FFFFFF',obj);
	setTextDecoration('none',obj);
}


/* Retourne la width en tenant compte de la résolution pour afficher la résolution WIDTH */
function getWidthWithJSResolution(w) {
	return screen.width*w/1440; // Résolution du PC lors des devs (1440X900)
}

/* Retourne la heigth en tenant compte de la résolution pour afficher la résolution HEIGHT */
function getHeightWithJSResolution(h) {
	return screen.height*h/900; // Résolution du PC lors des devs (1440X900)
}

// Check the data filled when the creation and the edition of a category
function checkCategory(catlabelFr, catdescFr){
	if(!isEmpty(catlabelFr)){
		alert('Le label catégorie FR est obligatoire!');
		return false;
	}
	return true;
}

// Check the data filled when the creation and the edition of a category
function checkPostCost(amountTTC, bdcAmountTTC){
	if(!isEmpty(amountTTC)){
		alert('Le prix TTC des frais de port est obligatoire!');
		return false;
	}
	if(!isEmpty(bdcAmountTTC)){
		alert('Le prix TTC de la commande est obligatoire!');
		return false;
	}
	
	var result = isValidAmount(amountTTC);
	if(result == true){
		result = isValidAmount(bdcAmountTTC);
	}
	return result;
}

