  function func_nav(ipages, iid)
  {
  
	var strTableID;
	var strSpanID;
	var strTablePopupID;
	
	if(document.getElementById("txtChoose").title == "CHOOSE YOUR MODEL")
	{
		strTableID = "tabPopup_links_";
		strSpanID = "spanPopup_1";
		strTablePopupID = "tabPopup_1";
	}
	else
	{
		strTableID = "tabPopup_links_c";
		strSpanID = "spanPopup_c1";
		strTablePopupID = "tabPopup_c1";
	}
  
    for(var i=0; i<(ipages+5); ++i)
    {
      var objTabPopupLinks = document.getElementById(strTableID + i);
      if(objTabPopupLinks)
      {
        objTabPopupLinks.style.display = "none";
      }
    }
    var spanPopup = document.getElementById(strSpanID);
    var tabPopup = document.getElementById(strTablePopupID);
    objTabPopupLinks = document.getElementById(strTableID + iid);
    if(objTabPopupLinks)
    {
      objTabPopupLinks.style.display = isIE ? "block" : "table";
      if(window.opera)
      {
        objTabPopupLinks.style.display = "table";
      }
      if(spanPopup && tabPopup)
      {
        spanPopup.style.display = "inline";
        var iCurrentHeightC = isNaN(tabPopup.style.height) ? parseInt(tabPopup.style.height) : 0;
        var iCurrentWidthC = isNaN(tabPopup.style.width) ? parseInt(tabPopup.style.width) : 0;
        iCurrentHeightC = (tabPopup.scrollHeight > iCurrentHeightC) ? tabPopup.scrollHeight : iCurrentHeightC;
        iCurrentWidthC = (tabPopup.scrollWidth > iCurrentWidthC) ? tabPopup.scrollWidth : iCurrentWidthC;
        iCurrentHeightC = (isIE && !window.opera) ? tabPopup.scrollHeight+2 : tabPopup.scrollHeight;
        iCurrentWidthC = (isIE && !window.opera) ? tabPopup.scrollWidth+2 : tabPopup.scrollWidth;
        spanPopup.style.height = iCurrentHeightC;
        spanPopup.style.width = iCurrentWidthC;
        tabPopup.style.height = iCurrentHeightC;
        tabPopup.style.width = iCurrentWidthC;
        if(window.opera)
        {
          spanPopup.style.border = "none";
          spanPopup.scrollWidth = 700;
        }
      }
    }
  }

  function func_close()
  {
  
	var strSpanID
	var strTablePopupID
	
	if(document.getElementById("txtChoose").title == "CHOOSE YOUR MODEL")
	{
		strSpanID = "spanPopup_1";
		strTablePopupID = "tabPopup_1";
	}
	else
	{
		strSpanID = "spanPopup_c1";
		strTablePopupID = "tabPopup_c1";
	}
  
  
    var objSpanPopup = document.getElementById(strSpanID);
    var objTabPopup = document.getElementById(strTablePopupID);
    if(objSpanPopup && objTabPopup)
    {
      objSpanPopup.style.visibility = "hidden";
      objTabPopup.style.visibility = "hidden";
      func_mouseout();
      hidePopup();
    }
  }


function ShowButton ()
						  {
							if(document.getElementById("hlnSort").innerHTML == "Sort by Model")
							{
								document.getElementById("hlnChoose").innerHTML = "<font class='grey1'>CHOOSE YOUR MODEL ></font>";
								document.getElementById("txtChoose").title = "CHOOSE YOUR MODEL";
								document.getElementById("hlnSort").innerHTML = "Sort by Color";

								
							}
							else
							{
								document.getElementById("hlnChoose").innerHTML = "<font class='grey1'>CHOOSE YOUR COLOR ></font>";
								document.getElementById("txtChoose").title = "CHOOSE YOUR COLOR";
								document.getElementById("hlnSort").innerHTML = "Sort by Model";
							}
							
							return false;
						  }



function showSortPopup(iSpanId, iHeight, iWidth, iLength, iMenuTypeId, iPopupDelay, objLink, e)
{
	

  objCurrentLink = objLink;
  objCurrentEvent = e;
  if(timer_showPopup == null)
  {
    bDelaySuccess = true;


    if(document.getElementById("txtChoose").title == "CHOOSE YOUR MODEL")
      {

    	timer_showPopup = setTimeout("showPopup(" + iSpanId + ", " + iHeight + ", " + iWidth + ", " + iLength + ", " + iMenuTypeId + ", " + iPopupDelay + ", objCurrentLink, objCurrentEvent)", 500);
      }
      else
      {
        timer_showPopup = setTimeout("showPopupColorSort(" + iSpanId + ", " + iHeight + ", " + iWidth + ", " + iLength + ", " + iMenuTypeId + ", " + iPopupDelay + ", objCurrentLink, objCurrentEvent)", 500);

      }
   

    return;
  }

  if(!bDelaySuccess)
  {
    return;
  }


      if(document.getElementById("txtChoose").title == "CHOOSE YOUR MODEL")
	{
		showPopup(iSpanId , iHeight , iWidth , iLength , iMenuTypeId , iPopupDelay , objCurrentLink, objCurrentEvent);
        	return;
	}
	else
      {
	showPopupColorSort(iSpanId , iHeight , iWidth , iLength , iMenuTypeId , iPopupDelay , objCurrentLink, objCurrentEvent);
        return;

      }


        

}



function showPopupColorSort(iSpanId, iHeight, iWidth, iLength, iMenuTypeId, iPopupDelay, objLink, e)
{
	
	

  objCurrentLink = objLink;
  objCurrentEvent = e;



   util_clearAllTimers();
  var sarrSpan = document.getElementsByTagName("span");
  var iSpan;
  for(iSpan = 0; iSpan < sarrSpan.length; ++iSpan)
  {

	
	


    var sPopupIdOld = sarrSpan[iSpan].id;
    if(sPopupIdOld.substring(0, 11) == "spanPopup_c")
    {
	
	
      var tabLinksOld = document.getElementById("tabPopup_c" + sPopupIdOld.substr(11));

	
      tabLinksOld.style.visibility = 'hidden';
      sarrSpan[iSpan].style.visibility = 'hidden';
    }
  }

	


  iCurrentSpanId = "c" +  iSpanId;


	



  iCurrentMenuTypeId = iMenuTypeId;
  bPopupOpened = false;
  bMouseEntered = false;
  var objEvent = isIE ? event : e;
  var iclientX = util_getX(objLink);
  var iclientY = util_getY(objLink);
  var iExtraWidth = (iclientX + iWidth) - util_getScreenWidth();
  if( iExtraWidth > 0 )
  {
    iclientX -= (iExtraWidth + 0);
  }
  iCurrentHeight = iHeight;
  iCurrentWidth = iWidth;
  //iCurrentLength = iLength;
  iCurrentLength = objLink.offsetWidth;
  iCurrentPass = 2;
  util_clearTimeout(timer_showWindows);
  timer_showWindows = setTimeout("showWindows(" + iclientX + ", " + iclientY + ")", iPopupDelay);
}

