//=======================================================
     //detect browser settings for showing and hiding DIVs
     isNS4 = (document.layers) ? true : false;
     isIE4 = (document.all && !document.getElementById) ? true : false;
     isIE5 = (document.all && document.getElementById) ? true : false;
     isNS6 = (!document.all && document.getElementById) ? true : false;
//=======================================================

function divMenuItem(strDivName,bolVisible) {
	
	if(!bolVisible) {
		switchDivVis(strDivName,bolVisible);
	} else {
		switchDivVis(strDivName,bolVisible);
	}
}

function changeMyVis(strDivName) {

	 objElement = xGetElementById(strDivName);
	 
	 if(objElement.style.display == "none"){
		 moveToPage();
		 objElement.style.display  = "";
		 
	 } else {
		objElement.style.display  = "none";
	 }
}

function moveMe(moveWhat, mX, mY) {
	objElement = xGetElementById(moveWhat);
	xLeft(objElement, mX);
	xTop(objElement, mY);
}

function moveToPage(){
	moveMe('basketDropDown', xPageX('dropBasketButton') - 145, xPageY('dropBasketButton') + 21);
}

function switchDivVis(strDivName,bolVisible){
 //identify the element based on browser type

 objElement = xGetElementById(strDivName);

  if(!bolVisible){
         objElement.style.display = "none";
  } else {
        objElement.style.display = "";
  }
}


function delay(gap){ /* gap is in millisecs */
	var then,now; then=new Date().getTime();
	now=then;
	while((now-then)<gap)
	{now=new Date().getTime();}
}
