<!--

function swapClass(obj) {
	if (obj.className.search(/_sel$/i) != -1) {
		return false;
	}
	if (arguments[1]) {
		if (obj.className.search(/_ov$/i) != -1) {
			return false;	
		}
		if (obj.className) {
			obj.oldClassName = obj.className;
		}
		obj.className = arguments[1];
	} else if (obj.oldClassName) {
		obj.className = obj.oldClassName;
		obj.oldClassName = false;
	}
}

function cycleProductImg(id) {
	var i = 0;
	var status = true;
	while (status === true) {
		if (document.getElementById('productimage_'+i)) {
			document.getElementById('productimage_'+i).style.display = "none";
			i++;
		} else status = false;
	}
	document.getElementById('productimage_' + id).style.display = "block";
}

function showProductinfo(id) {
	document.getElementById('descr').style.display = "none";
	var i=0;
	var status = true;
	while (status === true) {
		if (document.getElementById('result_'+i) && document.getElementById('descr_'+i)) {
			imgLay = document.getElementById('result_'+i);
			swapClass(imgLay);
			document.getElementById('descr_'+i).style.display = "none";
			i++;
		} else status = false;
	}
	if (id === false) {
		document.getElementById('descr').style.display = "block";
	} else if (!id.NaN) {
		imgLay = document.getElementById('result_'+id);
		swapClass(imgLay, imgLay.className+'_ov');
		document.getElementById('descr_'+id).style.display = "block";
	}
}

function selectProductOption(obj) {
	if (obj.selectedIndex > 1) {
		document.getElementById('addToCartInstruction').style.display = "none";
		document.getElementById('addToCart').style.display = "block";
	} else {
		document.getElementById('addToCart').style.display = "none";
		document.getElementById('addToCartInstruction').style.display = "block";
	}
}

// DEFAULT OBJECTS

function LayerObj() {
	var args = LayerObj.arguments;
	args[1] = !args[1] ? '' : args[1];
	this.el=MM_findObj(args[0],args[1]);
	this.css= (bw.dom || bw.ie4) ? this.el.style : bw.ns4 ? this.el : 0;
	this.getCSS = function() {
		this.scrollHeight = bw.ns4 ? this.css.document.height : this.el.offsetHeight;
		this.clipHeight	= bw.ns4 ? this.css.clip.height : this.el.offsetHeight;
		this.scrollWidth = bw.ns4 ? this.css.document.width : this.el.offsetWidth;
		this.clipWidth = bw.ns4 ? this.css.clip.width : this.el.offsetWidth;
		this.leftPos = parseInt(this.css.left);
		this.rightPos = parseInt(this.css.left)+this.scrollWidth;
		this.topPos = parseInt(this.css.top);
		this.bottomPos = parseInt(this.css.top)+this.scrollHeight;
	}
	this.getClass = function() {
		return (this.el.className ? this.el.className : false);
	}
	this.setClass = function(name) {
		this.el.className = name;
	}
	this.getHTML = function() {
		return getHTML(this.el);
	}
	this.setHTML = function(code) {
		(bw.dom || bw.ie4) ? this.el.innerHTML = code : bw.ns4 ? this.el = code : null;
	}
	this.resizeBy = function(x,y) {
		if (x != 0) this.el.style.width = bw.ns4 ? this.css.document.width+x+bw.px : this.el.offsetWidth+x+bw.px;
		if (y != 0) this.el.style.height = bw.ns4 ? this.css.document.height+y+bw.px : this.el.offsetHeight+y+bw.px;
	}
	this.hide = function() {
		this.css.visibility = 'hidden';}
	this.show = function() {
		this.css.visibility = 'visible';
	}
	this.collapse = function() {
		this.css.display = 'none';
	}
	this.expand = function() {
		this.css.display = 'block';
	}
	this.setPos = function(x,y) {
    	if(x!==false) {
    		if (!this.css.left) this.css.left = 0+bw.px;
    		this.css.left = x+bw.px;
    	}
    	if(y!==false) {
    		if (!this.css.top) this.css.top = 0+bw.px;
    		this.css.top = y+bw.px;
    	}
	}
	this.move = function(x,y) {
    	if(x!==false) {
    		if (!this.css.left) this.css.left = 0+bw.px;
    		this.css.left = (parseInt(this.css.left)+x)+bw.px;
    	}
    	if(y!==false) {
    		if (!this.css.top) this.css.top = 0+bw.px;
    		this.css.top = (parseInt(this.css.top)+y)+bw.px;
    	}
	}
	this.moveBy = function(x,y) {
		this.css.left = (parseInt(this.css.left)+x)+bw.px;
		this.css.top = (parseInt(this.css.top)+y)+bw.px;
	}
	this.getCSS();
	this.obj = "_"+String(Math.random()).substr(2,10)+"Object";
	eval(this.obj+"=this");
	return this;
}

function ScrollerObj() {
	var args = ScrollerObj.arguments;
	this.isBusy = false;
	this.item = new Array();
	for(i=0;i<args.length;i++) if(args[i]) this.item[i] = new LayerObj(args[i]);
	this.collapse = function() {this.item[0].collapse();}
	this.expand = function() {this.item[0].expand();}
	this.slide = function(x,y,f,d,tw_x,tw_y,n) {
		if(!this.isBusy || n) {
			this.isBusy = true;
			if(!n) n=0;
			if(isNaN(f)) f=10;
			if(isNaN(d)) d=0;
			if(isNaN(tw_x)) tw_x=0.5;
			if(isNaN(tw_y)) tw_y=0.5;
			this.item[0].getCSS();
			this.item[1].getCSS();
			m_x = x/Math.pow(f,tw_x);
			m_y = y/Math.pow(f,tw_y);
			v_x = Math.round(m_x*Math.pow(n+1,tw_x))-Math.round(m_x*Math.pow(n,tw_x));
			v_y = Math.round(m_y*Math.pow(n+1,tw_y))-Math.round(m_y*Math.pow(n,tw_y));
			if (x>0 && this.item[1].leftPos+v_x>0) {
				v_x=0-this.item[1].leftPos;
			}
			else if (x<0 && this.item[1].leftPos+v_x<-this.item[1].scrollWidth+this.item[0].clipWidth) {
				v_x = -this.item[1].scrollWidth+this.item[0].clipWidth-this.item[1].leftPos;
			}
			if (y>0 && this.item[1].topPos+v_y>0) {
//				v_y=0-this.item[1].topPos;
			}
			else if (y<0 && this.item[1].topPos+v_y<-this.item[1].scrollHeight+this.item[0].clipHeight) {
//				v_y = -this.item[1].scrollHeight+this.item[0].clipHeight-this.item[1].topPos;
			}
			this.item[1].move(v_x,v_y);
			n++;
			if(n<f || f==false) this.loop = setTimeout(this.obj+".slide("+x+","+y+","+f+","+d+","+tw_x+","+tw_y+","+n+")",d);
			else this.isBusy=false;
		}
	}
	this.scroll = function(x,y) {
		this.item[0].getCSS();
		this.item[1].getCSS();
		if (x>0 && this.item[1].leftPos+x>0) {
			x=0-this.item[1].leftPos;
			if (x > 0) x = 0;
		}
		else if (x<0 && this.item[1].leftPos+x<-this.item[1].scrollWidth+this.item[0].clipWidth) {
			x = -this.item[1].scrollWidth+this.item[0].clipWidth-this.item[1].leftPos;
			if (x > 0) x = 0;
		}
		if (y>0 && this.item[1].topPos+y>0) {
			y = 0-this.item[1].topPos;
			if (y < 0) y = 0;
		}
		else if (y<0 && this.item[1].topPos+y<-this.item[1].scrollHeight+this.item[0].clipHeight) {
			y=-this.item[1].scrollHeight+this.item[0].clipHeight-this.item[1].topPos;
			if (y > 0) y = 0;
		}
		this.item[1].move(x,y);
		this.loop = setTimeout(this.obj+".scroll("+x+","+y+")",0);
	}
	this.stop = function() {clearTimeout(this.loop);}
	this.obj = "_"+String(Math.random()).substr(2,10)+"Object";
	eval(this.obj+"=this");
	return this;
}

// OTHER DEFAULT SCRIPTS

function browserCheck() {
    this.ver = navigator.appVersion;
    this.dom = document.getElementById ? 1 : 0;
    this.ie6 = (this.ver.indexOf("MSIE 6") > -1 && this.dom) ? 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.px	 = (this.ie4 || this.dom) ? "px" : "";
    this.bw	 = (this.ie5 || this.ie4 || this.ns4 || this.ns5);
}
bw = new browserCheck();

function Preloader(){
	this.img = new Array();
	this.add = function() {
		var i,a=this.add.arguments,j=this.img.length;
		for(i=0;i<a.length;i++) {
			this.img[j++]=a[i];
		}
	}
	this.load = function() {
		for(i=0; i<this.img.length; i++) {
			if (this.img[i].length > 0) {
				MM_preloadImages(this.img[i]);
			}
		}
	}
}
var preloader = new Preloader();

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;
}

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 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_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

-->