<!--
// Popups
var pophandle = '';
function pop_window(url,window_name,features) { //v2.0
  pophandle = window.open(url,window_name,features);
}

// go to Url
function go_to(url) {
  document.location = url;
}

var carthandle='';
function cart_window(url,window_name,features) { //v2.0
  carthandle = window.open(url,'shopcart',features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function clear_feild(which) {
if (which.value=="search...")
	which.value=''
}

// change Product img / text
function changeProduct(grp, pl_id) {
  var product = document.getElementById('my_product_id').value;
  document.location = 'product.php?product=' + product + '&grp=' + grp + '&pl_id=' + pl_id;
}

function checkinfo() {
  if (document.add_to_cart.my_quantity.value<1) {
    alert ("The quantity of products you specify must be more than zero.");
    document.add_to_cart.my_quantity.focus();
    return;
  }
  document.add_to_cart.submit();
}

 var message="This image is not available for download due to copyright restrictions. Thank you - Sax Leather";
 function click(e) {
 if (document.all) {
 if (event.button == 2) {
 alert(message);
 return false;
 }
 }
 if (document.layers) {
 if (e.which == 3) {
 alert(message);
 return false;
 }
 }
 }
 if (document.layers) {
 document.captureEvents(Event.MOUSEDOWN);
 }
 document.onmousedown=click;


// Toggle divs
function toggle(div,nest){
  obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
  var the_style = getStyleObject(div);
  if (obj.visibility=='visible') {
	obj.visibility='hidden'
	the_style.display = 'none';
  } else {
	obj.visibility='visible'
	the_style.display = 'block';
  }
}

// Show iFrame
function show(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
	obj.visibility='visible'
}

// Hide iFrame
function hide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
	obj.visibility='hidden'
}

/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
********************************************************************************/
// Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()
// With nested layers for netscape, this function hides the layer if it's visible and visa versa
function showHide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
	if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
	else obj.visibility='visible'
}

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
	return document.all(objectId).style;
  } else {
	return false;
  }
}
//-->