<!-- hide


// used where a table row is clickable - to cancel any events after a normal link inside a table cell
function cancelEvents(e)
{
	if (!e) var e = window.event;
	try {
		e.stopPropagation();
	}
	catch(er){
		e.cancelBubble = true;
	}
} 


function printPage(){
   browserVersion = parseInt(navigator.appVersion)
   if (browserVersion >= 4) window.print()
}

function openTerms()
{
	sPageURL = "terms_print.php";
	termsWindow=window.open(sPageURL,"termsWindow","toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,top=10,left=10,width=600,height=500");
}

function trim(strText) 
{
    // get rid of leading spaces
    while (strText.substring(0,1) == ' ')
        strText = strText.substring(1, strText.length);

    // get rid of trailing spaces
    while (strText.substring(strText.length-1,strText.length) == ' ')
        strText = strText.substring(0, strText.length-1);

    return strText;
}

// jumps to a category page, based on the user selection in header
function jumpToCategory()
{
	if ( document.formSearch.category.value == "Select" )
	{
		return false;
	}
	else	//get value of browse drop-down and jump to new page
	{
		window.location="category_view.php?id=" + document.formSearch.category.options[document.formSearch.category.selectedIndex].value;

	}
}

function stripSpaces(x) {
    while (x.substring(0,1) == ' ') x = x.substring(1);
    return x;
}

function empty(x) { if (x.length > 0) return false; else return true; }



ns4 = document.layers
ie4 = document.all 
nn6 = document.getElementById && !document.all 


function hideObject(objectName) {
  
  /*if (ns4) {
      document.n1.visibility = "hide";
   }
   else if (ie4) {
      document.all['n1'].style.visibility = "hidden";
   }
   else if (nn6) {
      document.getElementById('n1').style.visibility = "hidden";
   }*/
   
   
   if (ie4) {
         document.all[objectName].style.visibility = "hidden";
      }
      else if (nn6) {
         document.getElementById(objectName).style.visibility = "hidden";
   }
     //return false;

}

// Show/Hide functions for pointer objects

function showObject(objectName, e) { 
   
/*  if (ns4) { 
     document.n1.visibility = "show"; 
     document.n1.left = e.pageX; 
     document.n1.top = e.pageY; 
  } 
  else if (ie4) { 
     document.all['n1'].style.visibility = "visible"; 
     document.all['n1'].style.left = e.clientX; 
     document.all['n1'].style.top = e.clientY; 
  } 
  else if (nn6) { 
     document.getElementById('n1').style.visibility = "visible"; 
     document.getElementById('n1').style.left = e.clientX; 
     docume.getElementById('n1').style.top = e.clientY; 
  } */
  
  
  if (ie4) { 
       
       
       document.all[objectName].style.left = e.clientX + document.body.scrollLeft; 
       document.all[objectName].style.top = e.clientY + document.body.scrollTop; 
       document.all[objectName].style.visibility = "visible"; 
       //window.scrollTo(e.clientX + document.body.scrollLeft,e.clientY + document.body.scrollTop);
    } 
    else if (nn6) { 
       document.getElementById(objectName).style.visibility = "visible"; 
       document.getElementById(objectName).style.left = e.clientX; 
       docume.getElementById(objectName).style.top = e.clientY; 
  }
  return false;
}



function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function show(DOM_Item)
{
	if (document.getElementById) // netscape 6+   IE 5+  - make IE 4 compatible
	{
		thisItem = document.getElementById(DOM_Item).style;
		thisItem.display = "block";
	}
}

function hide(DOM_Item)
{
	if (document.getElementById) 
	{
		thisItem = document.getElementById(DOM_Item).style;
		thisItem.display = "none";
	}
}


//-- END -->
