
function OpenCloseDiv(aLink,aDiv)
{
	var LastOpenDiv;
	var LastOpenLink;
	if ((LastOpenDiv != null) && (LastOpenDiv != aDiv))
	{
		document.getElementById(LastOpenDiv).style.display = "none";
	}

	if (document.getElementById(aDiv).style.display == "")
	{
		document.getElementById(aDiv).style.display = "none";
	}
	else
	{
		document.getElementById(aDiv).style.display = "";
	}
	
	LastOpenDiv = aDiv;
	LastOpenLink = aLink;
	
	return false;
}
var mouseX, mouseY; 


function getMousePos(e) 
{ 
 if (!e) 
  var e = window.event||window.Event; 


 if('undefined'!=typeof e.pageX) 
 { 
  mouseX = e.pageX; 
  mouseY = e.pageY; 
  if('undefined'!=typeof e.clientY)  
	mouseY = e.clientY;
 } 
 else 
  { 
   mouseX = e.clientX; 
   mouseY = e.clientY; 
  } 



} 

// You need to tell Mozilla to start listening: 

if(window.Event && document.captureEvents) 
 document.captureEvents(Event.MOUSEMOVE); 


// Then assign the mouse handler 


document.onmousemove = getMousePos; 



function OpenDivPlanning(aLink,aDiv)
{
	
	var YScroll =0;
	if (document.documentElement && !document.documentElement.scrollTop)
		YScroll = 0
	else if (document.documentElement && document.documentElement.scrollTop)
	// IE6 +4.01 and user has scrolled
		YScroll = document.documentElement.scrollTop
	else if (document.body && document.body.scrollTop)
		document.body.scrollTop;
	
	
	
	document.getElementById(aDiv).style.display = "";
	document.getElementById(aDiv).style.left = (mouseX+60).toString() + "px";
	document.getElementById(aDiv).style.top = (YScroll + mouseY).toString() + "px";
	//document.getElementById("event_detail_explication").style.display = "none";
	
	
	return false;
}

function CloseDivPlanning(aLink,aDiv)
{
	
	//document.getElementById("event_detail_explication").style.display = "";
	document.getElementById(aDiv).style.display = "none";
	return false;
}

function pop_GetBidders(EbayItemId)
{
	
	var PopBidders = window.open('/popup_get_bidders.aspx?ebay_item_id=' + EbayItemId,'','location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=500,status=yes');
	PopBidders.focus();
}


function pop_annonce_mixad(mynum)
	{
	strURL = "/preview_vente.aspx?DETAIl_COMPLET=1&NUM_ANNONCE=" + mynum + "&FROM_MIXAD=1&SITE_PROV=1";
	strName = "detail" + mynum;
	strConfig = "location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,height=450,width=690,status=yes";
	
	windowPopupAnnonce = window.open(strURL,strName,strConfig);
	}
	
function CkeckPrixFixe()
{
	var PrixFixe = document.getElementById("CtrlGestionEbayAuto_opt_fixed_price");
	if (PrixFixe.checked)
	{
		document.getElementById("CtrlGestionEbayAuto_txt_prix_immediat").style.background= "#CCCCCC";
		document.getElementById("CtrlGestionEbayAuto_txt_prix_reserve").style.background= "#CCCCCC";
		document.getElementById("CtrlGestionEbayAuto_txt_prix_immediat").disabled = true;
		document.getElementById("CtrlGestionEbayAuto_txt_prix_reserve").disabled = true;
	}
	else
	{
		document.getElementById("CtrlGestionEbayAuto_txt_prix_immediat").style.background= "#FFFFFF";
		document.getElementById("CtrlGestionEbayAuto_txt_prix_reserve").style.background= "#FFFFFF";
		document.getElementById("CtrlGestionEbayAuto_txt_prix_immediat").disabled = false;
		document.getElementById("CtrlGestionEbayAuto_txt_prix_reserve").disabled = false;
	}
}

function RedirectCompte(liste)
{
	document.location.href = liste.options[liste.selectedIndex].value;
}

function OpenCloseDivBis(aDiv)
{
	if (document.getElementById(aDiv).style.display == "")
	{
		document.getElementById(aDiv).style.display = "none";
	}
	else
	{
		document.getElementById(aDiv).style.display = "";
	}
	
	
}
