//productNavigator = 2; 
var loadEventor = new Array();

// ***************************
// *** BROWSER-CHECK
// ***************************
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);


var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
			&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
			&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_nav2 = (is_nav && (is_major == 2));
var is_nav3 = (is_nav && (is_major == 3));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav4up = (is_nav && (is_major >= 4));
var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
					  (agt.indexOf("; nav") != -1)) );
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_gecko = (agt.indexOf('gecko') != -1);


var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

var is_opera = (agt.indexOf("opera") != -1);
var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_mac    = (agt.indexOf("mac")!=-1);

function Array_splice(index, delTotal) {
  var temp = new Array()
  var response = new Array()
  var A_s = 0
  for (A_s = 0; A_s < index; A_s++) {
   temp[temp.length] = this[A_s]
   }
  for (A_s = 2; A_s < arguments.length; A_s++) {
   temp[temp.length] = arguments[A_s]
   }
  for (A_s = index + delTotal; A_s < this.length; A_s++) {
   temp[temp.length] = this[A_s]
   }
  for (A_s = 0; A_s < delTotal; A_s++) {
   response[A_s] = this[index + A_s]
   }
  this.length = 0
  for (A_s = 0; A_s < temp.length; A_s++) {
   this[this.length] = temp[A_s]
   }
  return response
  }

if (typeof Array.prototype.splice == "undefined") {
  Array.prototype.splice = Array_splice
}



// ***************************
// *** UTIL
// ***************************

function toggleLayerSwitch(sName, sName2){
	oLayer = getObj(sName);
	oLayer2 = getObj(sName2);
	if(oLayer != null)
		{	
		if (oLayer.style.display == "none")
		{
			oLayer.style.display = "";
			oLayer2.className = 'open';
		} 
		else 
		{
			oLayer.style.display = "none";
			oLayer2.className = 'close';
		}
	}
}


function getObj(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=getObj(n,d.layers[i].document);
	
  if(!x && d.getElementById) 
	x=d.getElementById(n); 

return x;
}

var bFirstLoad = 1;
var iIntervalID = null;

function documentLoad(){
	clearInterval(iIntervalID);
	if (is_nav4 && bFirstLoad){
		bFirstLoad = 0;
		iIntervalID = setInterval("documentLoad()",200);
	} else {
		for(var i=0;i<loadEventor.length;i++){
			loadEventor[i]();
		}
	}
}


function imgOn(imgName,text) {
    if ((navigator.appVersion>="3") && document.images) {
        getObj(imgName).src = eval(imgName + "on.src");
				if(text){
        	eval("window.status='"+text+"';");
				}
    }
}
function imgOff(imgName) {
    if ((navigator.appVersion>="3") && document.images) {
        getObj(imgName).src = eval(imgName + "off.src");
        window.status=' ';
    }
}

var Number=6
var initialized = 0;
var fadeSpeed=200

var current=null,timer1=null,timer2=null,time=100
function browserCheck(){ 
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.mac=this.agent.indexOf("Mac")>-1
  this.win=(navigator.userAgent.indexOf('Windows')>-1)
  this.opera=this.agent.indexOf("Opera")>-1
  this.ie4=(document.all && !this.dom && !this.opera)?1:0;
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  this.ns4=(document.layers && !this.dom)?1:0;
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
  this.ok=(this.ie4||this.ie5||this.ie6||this.ns4||this.ns6||this.opera)
  this.fade=(((this.ie5||this.ie6)&&!this.mac)||this.ns6)
  return this
}
bc=new browserCheck()
if(bc.ie4) time=800


function div_obj(obj,nest){ 
  nest=(!nest) ? "":'document.'+nest+'.';
	//this.evnt=getObj(obj);
	this.evnt=bc.dom? document.getElementById(obj):bc.ie4?document.all[obj]:bc.ns4?eval(nest+"document.layers." +obj):0
  this.css=bc.dom||bc.ie4?this.evnt.style:this.evnt; 
	this.x=parseInt(this.css.left)||this.css.pixelLeft||this.evnt.offsetLeft||0;
  this.y=parseInt(this.css.top)||this.css.pixelTop||this.evnt.offsetTop||0;
  return this;
}

function lib_doc(){ 
  this.x=0;this.x2=bc.ie && document.body.offsetWidth-20||innerWidth||0;
  this.y=0;this.y2=bc.ie && document.body.offsetHeight-5||innerHeight||0;
  this.x50=this.x2/2;this.y50=this.y2/2;
  return this;
}

div_obj.prototype.moveIt = function(x,y){
	this.x=x;
	this.y=y; 
	if(is_nav4){
		this.css.left=x;
		this.css.top=y;
	} else {
		this.css.left=x + "px";
		this.css.top=y + "px";
	}
}
div_obj.prototype.showIt = function(){this.css.visibility="visible"}
div_obj.prototype.hideIt = function(){this.css.visibility="hidden"}
div_obj.prototype.alpha = function(inc){
  if(bc.ns6)this.css.MozOpacity=inc/100;
  if(bc.ie)this.css.filter="alpha(opacity="+inc+")";
}
