function d_lib_bwcheck(){ //Browsercheck (needed)
 this.ver=navigator.appVersion
 this.agent=navigator.userAgent
 this.dom=document.getElementById?1:0
 this.ie5=(this.ver.indexOf("MSIE")>-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
}
var d_bw=new d_lib_bwcheck()
d_sLeft = 0         //The left placement of the menu
d_sTop = 10         //The top placement of the menu
d_sMenuheight = 16 //The height of the menu
d_sArrowwidth = 20 //Width of the arrows
d_sScrollspeed = 80 //Scroll speed:(in milliseconds, change this one and the next variable to change the speed)
d_sScrollPx = 10     //Pixels to scroll per d_timeout.
d_sScrollExtra = 15 //Extra speed to scroll onmousedown (pixels)
var d_tim = 0
var d_noScroll = true
function d_mLeft(){
	if (!d_noScroll && d_oMenu.x<d_sArrowwidth){
		d_oMenu.moveBy(d_sScrollPx,0)
		d_tim = setTimeout("d_mLeft()",d_sScrollspeed)
	}
}
function d_mRight(){
	if (!d_noScroll && d_oMenu.x>-(d_oMenu.scrollWidth-(d_pageWidth))-d_sArrowwidth){
		d_oMenu.moveBy(-d_sScrollPx,0)
		d_tim = setTimeout("d_mRight()",d_sScrollspeed)
	}
}
function d_noMove(){
	clearTimeout(d_tim);
	d_noScroll = true;
	d_sScrollPx = d_sScrollPxOriginal;
}
function d_makeObj(obj,nest,menu){
	nest = (!nest) ? "":'document.'+nest+'.';
	this.elm = d_bw.ns4?eval(nest+"document.layers." +obj):d_bw.ie4?document.all[obj]:document.getElementById(obj);
   	this.css = d_bw.ns4?this.elm:this.elm.style;
	this.scrollWidth = bw.ns4?this.css.document.width:this.elm.offsetWidth;
	this.x = d_bw.ns4?this.css.left:this.elm.offsetLeft;
	this.y = d_bw.ns4?this.css.top:this.elm.offsetTop;
	this.moveBy = d_b_moveBy;
	this.moveIt = d_b_moveIt;
	this.clipTo = d_b_clipTo;
	return this;
}
var d_px = d_bw.ns4||window.opera?"":"px";
function d_b_moveIt(x,y){
	if (x!=null){this.x=x; this.css.left=this.x+d_px;}
	if (y!=null){this.y=y; this.css.top=this.y+d_px;}
}
function d_b_moveBy(x,y){this.x=this.x+x; this.y=this.y+y; this.css.left=this.x+d_px; this.css.top=this.y+d_px;}
function d_b_clipTo(t,r,b,l){
	if(d_bw.ns4){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l;}
	else this.css.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";
}
var d_sScrollPxOriginal = d_sScrollPx;
function d_sideInit(){
	//pageWidth = (bw.ns4 || bw.ns6 || window.opera)?innerWidth:document.body.clientWidth;
	d_pageWidth = 683;
	d_oBg = new d_makeObj('d_divBg')
	d_oMenu = new d_makeObj('d_divMenu','d_divBg',1)
	d_oArrowRight = new d_makeObj('d_divArrowRight','d_divBg')
	d_oBg.moveIt(d_sLeft,d_sTop) //Main div, holds all the other divs.
	d_oMenu.moveIt(d_sArrowwidth,null)
	d_oArrowRight.css.width = d_sArrowwidth;
	d_oArrowRight.moveIt(d_pageWidth-d_sArrowwidth,null)
	if (!d_bw.ns4) d_oBg.css.overflow = "hidden";
	if (d_bw.ns6) d_oMenu.css.position = "relative";
	d_oBg.css.width = d_pageWidth+d_px;
	d_oBg.clipTo(0,d_pageWidth,d_sMenuheight,0)
	d_oBg.css.visibility = "visible";
}
if (bw.bw){
	window.onload = sideInit;
}
var oldOnload = window.onload || function () {};
var addcode_href = self.location.href

if (d_bw.bw)
{
    window.onload = function(){
    oldOnload();
    d_sideInit();

//if(addcode_href.indexOf("contact.asp")>=0 || addcode_href.indexOf("inquiry.asp")>=0 || addcode_href.indexOf("faq_message.asp")>=0 || addcode_href.indexOf("download_login.asp")>=0 || addcode_href.indexOf("member_add.asp")>=0 || addcode_href.indexOf("add_subject.asp")>=0)
//{
//cdnu('codenum.asp');
//}

}
}

//if (d_bw.bw) onload = d_sideInit;
