function  hideObject(idObject,hote){
// document.getElementById(idObject).style.display == 'none';

//if(document.getElementById("aff_" + idObject).value == '+'){
//alert(document.images("aff_" + idObject).src);
if(document.getElementById("aff_" + idObject).dir== 'ltr')
{
   document.getElementById(idObject).style.display='Block';
   document.images("aff_" + idObject).src = "/FactoProWeb/images/moins.gif"; 
	document.getElementById("aff_" + idObject).dir = 'rtl';
 }
else
{
 	document.getElementById(idObject).style.display='None';
 	document.images("aff_" + idObject).src = "/FactoProWeb/images/plus.gif"; 
 	document.getElementById("aff_" + idObject).dir = 'ltr';
}	
	
}
function hidecriteria(idObject)
{
	document.getElementById(idObject).style.display='Block';
}
function affcriteria(idobject)
{
	document.getElementById(idObject).style.display='None';
}

function OpenPopup(sURL, sWndName, iWidth, iHeight) 
{
	var WndLeft = ((screen.width-50) - iWidth) / 2;
	var WndTop = ((screen.height-100) - iHeight) / 2;
	
	window.open(sURL, sWndName, 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' + iWidth + ',height=' + iHeight + ',left =' + WndLeft + ',top = ' + WndTop);
}
function OpenPopupScroll(sURL, sWndName, iWidth, iHeight) 
{
	var WndLeft = ((screen.width-50) - iWidth) / 2;
	var WndTop = ((screen.height-100) - iHeight) / 2;
	
	window.open(sURL, sWndName, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + iWidth + ',height=' + iHeight + ',left =' + WndLeft + ',top = ' + WndTop);
}

function GetControlById(Wnd,idControl)
{
	return Wnd.document.getElementById(idControl);
}

function SetControlValue(Wnd, idControl, value) 
{
	GetControlById(Wnd,idControl).value = value;
}
function resizeWindow(width, height)
{
	var WndLeft = ((screen.width-50) - width) / 2;
	var WndTop = ((screen.height-100) - height) / 2;
	window.resizeTo(width, height);
	window.moveTo(WndLeft, WndTop);
}
function setbtnstate(chk, buttonId)
{
	document.getElementById(buttonId).disabled = !chk.checked;
}
