// JavaScript Document
<!--
function MM_findObj(n, d) { 
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null) 
   { document.MM_sr[j++]=x; 
   if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2]; }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

var imgnum = 1
var i_count = 1

function set_image_count() {
if (set_image_count.arguments.length>0) { 
i_count=set_image_count.arguments[0];
}
}

function showAltImage(v_photo) {
	document.getElementById('prodimgalt').src='/images/products/alt/' + v_photo;
	$("#product_image").hide();
	$("#product_image_alt").fadeIn(500);
}

function closeAltImage() {
	$("#product_image_alt").hide();
	$("#product_image").fadeIn(500);
}


function click_changeimg() {
var x=MM_findObj(click_changeimg.arguments[1]);
x.src=click_changeimg.arguments[2];
imgnum=click_changeimg.arguments[0];
for (var i=1;i<=i_count;i++){
if (i!=imgnum) document.images[('item'+i)].src='/images/'+i+'.gif';
}
}

function num_off() {
var y,x=num_off.arguments[0];
if (x!=imgnum) document.images['item'+x].src='/images/'+x+'.gif';
}

var popupwin=0;
function win_popup(v_path) {
popupwin = open(v_path, 'popupwin', 'height=420,width=450,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=no,menubar=no');
}

function menuover(obj, state){
if (state=='on'){
    obj.style.background = '#CDDCE7';
}else{
    obj.style.background = '#FFFFFF';
}
}

function preloadImages() {
  if(document.images)  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    for(i=0; i<args.length; i++)    {
      if (args[i].indexOf("#")!=0)      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = args[i];
      }
    }
  }
}

preloadImages('/images/site/nav01-over.jpg', '/images/site/nav02-over.jpg', '/images/site/nav_03-over.jpg', '/images/nav_04-over.jpg', '/images/nav_05-over.jpg', '/images/nav_06-over.jpg');

//-->
