/*****

Image Cross Fade Redux
Version 1.0
Last revision: 02.15.2006
steve@slayeroffice.com

Please leave this notice intact. 

Rewrite of old code found here: http://slayeroffice.com/code/imageCrossFade/index.html


*****/

/**********************
Begin Custom Additions - TechArty....
************************/
var booIE7;
booIE7 = false;
var booIE8;
booIE8 = false;
var booSaf3;
booSaf3 = false;
BrowserType();
function BrowserType() {
 
  var ua, s, i;
 
  this.isIE    = false;
  this.isNS    = false;
  this.version = null;
 
  ua = navigator.userAgent;
  //alert(ua);
 
  s = "MSIE 7";
  if ((i = ua.indexOf(s)) >= 0) {
    booIE7 = true;
  }
  s = "MSIE 8";
  if ((i = ua.indexOf(s)) >= 0) {
    booIE8 = true;
  }
 //alert(booIE7);
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
 
  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
 
  s = "Version/3";
  if ((i = ua.indexOf(s)) >= 0) {
	s = "Safari";
	if ((i = ua.indexOf(s)) >= 0) {
  		booSaf3 = true
		//alert(booSaf3);	
		return;
	}
  }
  // Treat any other "Gecko" browser as NS 6.1.
 
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
  
}


function swapCross(r,c,booM) {
	if (booM && c==1){
		playSound();
		document.getElementById('home411').rows[r-1].cells[c-1].style.color='#FFFFFF';
		var s = document.getElementById('home411').rows[r-1].cells[c].innerHTML; 
		document.getElementById('home411').rows[r-1].cells[c].innerHTML = s.replace('cross4','cross2');
	}
	if (!booM && c==1){
		document.getElementById('home411').rows[r-1].cells[c-1].style.color='#1C1C1C';
		var s = document.getElementById('home411').rows[r-1].cells[c].innerHTML; 
		document.getElementById('home411').rows[r-1].cells[c].innerHTML = s.replace('cross2','cross4');
	}
	if (booM && c==3){
		playSound();
		document.getElementById('home411').rows[r-1].cells[c].style.color='#FFFFFF';
		var s = document.getElementById('home411').rows[r-1].cells[c-1].innerHTML; 
		document.getElementById('home411').rows[r-1].cells[c-1].innerHTML = s.replace('cross4','cross2');
	}
	if (!booM && c==3){
		document.getElementById('home411').rows[r-1].cells[c].style.color='#1C1C1C';
		var s = document.getElementById('home411').rows[r-1].cells[c-1].innerHTML; 
		document.getElementById('home411').rows[r-1].cells[c-1].innerHTML = s.replace('cross2','cross4');
	}

}

function swapDiv(x){
	document.getElementById('main1').style.display='none';
	document.getElementById(x).style.display='block';
}

function focusSwap(x){
	for(i=1;i<7;i=i+1) {
		if (i==parseInt(x)){
			//document.getElementById('focus'+i).style.display='block';
			document.getElementById('focuscopy'+i).style.display='block';
			document.getElementById('focuslist'+i).className = 'focuslisttdwhite';
		}else{
			//document.getElementById('focus'+i).style.display='none';
			document.getElementById('focuscopy'+i).style.display='none';
			document.getElementById('focuslist'+i).className = 'focuslisttd';
		}
		//document.getElementById('bdhtmlgoodies_scrolldiv').style.display='block';
		//cD = 'b';
		//scrolldiv_initScroll();
		if (i==1 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='FOCUS';
			document.getElementById('focusimg').src='focus.jpg';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabel';
			cD = 'a';
			scrolldiv_initScroll();
		}
		if (i==2 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='PASSIVE<BR/>CANDIDATES';
			document.getElementById('focusimg').src='passivecand.jpg';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabelpc';
			cD = 'b';
			scrolldiv_initScroll();
		}
		if (i==3 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='MARKETING';
			document.getElementById('focusimg').src='marketing.jpg';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabel';
			cD = 'c';
			scrolldiv_initScroll();
		}
		if (i==4 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='DATABASE';
			document.getElementById('focusimg').src='database.jpg';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabel';
			cD = 'd';
			scrolldiv_initScroll();
		}
		if (i==5 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='PROCESS';
			document.getElementById('focusimg').src='process.jpg';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabel';
			cD = 'e';
			scrolldiv_initScroll();
		}
		if (i==6 && i==parseInt(x)){
			document.getElementById('focuslabel').innerHTML='NUMBERS';
			document.getElementById('focusimg').src='numbers.jpg';
			document.getElementById('edhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('ddhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('cdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('fdhtmlgoodies_scrolldiv').style.display='block';
			document.getElementById('focuslabel').className='rightfocuslabel';
			cD = 'f';
			scrolldiv_initScroll();
		}
	}
}

function caseSwap(x){
	for(i=1;i<3;i=i+1) {
		if (i==parseInt(x)){
			document.getElementById('casestudylist'+i).className = 'casestudylisttdwhite';
		}else{
			document.getElementById('casestudylist'+i).className = 'casestudylisttd';
		}
		if (i==1 && i==parseInt(x)){
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='block';
			cD = 'a';
			scrolldiv_initScroll();
		}
		if (i==2 && i==parseInt(x)){
			document.getElementById('adhtmlgoodies_scrolldiv').style.display='none';
			document.getElementById('bdhtmlgoodies_scrolldiv').style.display='block';
			cD = 'b';
			scrolldiv_initScroll();
		}
	}
}


function menuexpandClose() {
		playSound();
		document.getElementById("menuopen1").style.display = "none";
		document.getElementById("menuopen2").style.display = "none";
		document.getElementById("menuopen3").style.display = "none";
}
function menuexpandCollapse() {
	playSound();
	 var od = menuexpandCollapse.arguments[2];
	 var xx = document.body.scrollWidth;
	 if (od == 1){	
	 	yy = ((xx)/2)+371;
	 }
	 if (od == 2){	
		yy = ((xx)/2)+221;
	 }
	 if (od == 3){	
		yy = ((xx)/2)+32;
	 }
	 document.getElementById("menuopen"+od).style.left = yy +  "px";
	 document.getElementById("menuopen"+od).style.top = "75px";
	 for (var i=0; i<1; i++) {
		var element = document.getElementById(menuexpandCollapse.arguments[i]+od);
		d = 5;
		if (element.id == "menuopen"+od){
		//alert(element.style.display);
			element.style.display = (element.style.display == "none") ? "block" : "none";
		//alert(element.style.display);
		}
	 }
}

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
var booIE = false;
if (version > 0){
	//alert(version);
	booIE = true;
}

 function expandCollapse() {
	 var od = expandCollapse.arguments[2];
	 var x = document.body.scrollWidth;
	 y = (x-450)/2;
	 document.getElementById("open"+od).style.left = y +  "px";
	 var xx = document.body.scrollWidth;
	 yy = (xx-1150)/2;
	 document.getElementById("over").style.left = yy +  "px";
	 document.getElementById("over").style.display = (document.getElementById("over").style.display == "none") ? "block" : "none";
	for (var i=0; i<1; i++) {
		var element = document.getElementById(expandCollapse.arguments[i]+od);
		//if (i == 0){
			//element.style.display = (element.style.display == "none") ? "block" : "none";
		//}
		d = 5;
		if (element.id == "open"+od){
			if (!booIE){
				document.getElementById("open"+od).style.opacity = 0.01;
			}else{
				//document.getElementById('open').style.filter:progid:DXImageTransform.Microsoft.Alpha(opacity=1);
			}
			if(element.style.display == "none"){
				for(i=1;i<100;i=i+1) {
					if (!booIE){
						if (i<10){
							setTimeout("document.getElementById('open"+od+"').style.opacity = 0.0"+i,d);
						}else{
							setTimeout("document.getElementById('open"+od+"').style.opacity = 0."+i,d);
						}
					}else{
					//	setTimeout("document.getElementById('open').style.filter:progid:DXImageTransform.Microsoft.Alpha(opacity="+i+")",d);
					}
					d = d + 5;
					if (i == 1){
						element.style.display = (element.style.display == "none") ? "block" : "none";
					}
				}	
			}else{
				element.style.display = (element.style.display == "none") ? "block" : "none";
			}
		}
	}
}

function expandCollapseHome() {
	 var od = expandCollapseHome.arguments[2];
	 var x = document.body.scrollWidth;
	 y = (x-550)/2;
	 document.getElementById("open"+od).style.left = y +  "px";
	 var xx = document.body.scrollWidth;
	 yy = (xx-1150)/2;
	 document.getElementById("over").style.left = yy +  "px";
	 document.getElementById("over").style.display = (document.getElementById("over").style.display == "none") ? "block" : "none";
	 if (booIE7){
		document.getElementById("divMarkCopy").className = "puMarkcopyIE";
	 }
	for (var i=0; i<1; i++) {
		var element = document.getElementById(expandCollapseHome.arguments[i]+od);
		//if (i == 0){
			//element.style.display = (element.style.display == "none") ? "block" : "none";
		//}
		d = 5;
		if (element.id == "open"+od){
			if (!booIE){
				document.getElementById("open"+od).style.opacity = 0.01;
			}else{
				//document.getElementById('open').style.filter:progid:DXImageTransform.Microsoft.Alpha(opacity=1);
			}
			if(element.style.display == "none"){
				for(i=1;i<100;i=i+1) {
					if (!booIE){
						if (i<10){
							setTimeout("document.getElementById('open"+od+"').style.opacity = 0.0"+i,d);
						}else{
							setTimeout("document.getElementById('open"+od+"').style.opacity = 0."+i,d);
						}
					}else{
					//	setTimeout("document.getElementById('open').style.filter:progid:DXImageTransform.Microsoft.Alpha(opacity="+i+")",d);
					}
					d = d + 5;
					if (i == 1){
						element.style.display = (element.style.display == "none") ? "block" : "none";
					}
				}	
			}else{
				element.style.display = (element.style.display == "none") ? "block" : "none";
			}
		}
	}
}
function img_zoom(x) {
playSound();
//alert(document.getElementById('div14').style.zIndex);
	//		alert(document.getElementById('div15').style.zIndex);
	var s = x.id.toString();
	d = 5;
	ii = 0;
	iii = 0;
	//if (d>100){
	if (booIE){
		//for(i=1;i<20;i++) {
			//for(c=1;c<90000;c++) {
				
			//}
			//alert(i);
			//x.className = "ppx PZ3zoom"+i+" PZ3-l NoBdr noCap Lnk";
		//}	
		x.className = "ppx PZ3zoom19 PZ3-l NoBdr noCap Lnk";
	}else{
		if (booIE){
			dd = 500;
			ii = 12;
			iii = 20;
		}else{
			dd = 15;
			ii = 1;
			iii = 20;
		}
		for(i=ii;i<iii;i++) {
			setTimeout("document.getElementById('"+s+"').className = 'ppx PZ3zoom"+i+" PZ3-l NoBdr noCap Lnk';",d);
			d = d + dd;
		}		
	}
}

function img_zoomo(x) {
//alert(x.className);
	var s = x.id.toString();
	d = 5;
	ii = 0;
	iii = 0;
	//if (d>100){
	if (booIE){
		x.className = "ppx PZ3zoom PZ3-l NoBdr noCap Lnk";
	}else{
		if (booIE){
			dd = 1;
			ii = 11;
			iii = 20;
		}else{
			dd = 15;
			ii = 0;
			iii = 19;
			//alert(x.style.zIndex);
			//x.style.zIndex = '1001';
			//document.getElementById('a14').style.zIndex = '1001';
			//document.getElementById('img14').style.zIndex = '1001';
			//document.getElementById('div14').style.zIndex = '1001';
			//document.getElementById('div15').style.display = 'none;';
			//document.getElementById('a15').style.zIndex = '1000';
			//document.getElementById('img15').style.zIndex = '1000';
			//document.getElementById('div15').style.zIndex = '1000';
			//alert(document.getElementById('div15').className);
			//alert(document.getElementById('div14').style.zIndex);
			//alert(document.getElementById('div15').style.zIndex);
			//alert(x.id);
			
		}
		for(i=iii;i>0;i=i-1) {
			//alert(i);
			if (i==1){
				setTimeout("document.getElementById('"+s+"').className = 'ppx PZ3zoom PZ3-l NoBdr noCap Lnk';",d);
			}else{
				setTimeout("document.getElementById('"+s+"').className = 'ppx PZ3zoom"+i+" PZ3-l NoBdr noCap Lnk';",d);
			}
			d = d + dd;			
		}
	}
	//alert(x.className);
}
/**********************
End Custom Additions - TechArty....
************************/


//window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);

var d=document, imgs = new Array(), zInterval = null, current=0, pause=false;

function so_init() {
	if(!d.getElementById || !d.createElement)return;

	// DON'T FORGET TO GRAB THIS FILE AND PLACE IT ON YOUR SERVER IN THE SAME DIRECTORY AS THE JAVASCRIPT!
	// http://slayeroffice.com/code/imageCrossFade/xfade2.css
	css = d.createElement("link");
	css.setAttribute("href","xfade2.css");
	css.setAttribute("rel","stylesheet");
	css.setAttribute("type","text/css");
	d.getElementsByTagName("head")[0].appendChild(css);

	imgs = d.getElementById("bannerfade").getElementsByTagName("img");
	//alert(imgs.length);
	if (imgs.length > 0){
		for(i=1;i<imgs.length;i++) imgs[i].xOpacity = 0;
		imgs[0].style.display = "block";
		imgs[0].xOpacity = .99;
	
		setTimeout(so_xfade,3000);
	}
}

function so_xfade() {
	cOpacity = imgs[current].xOpacity;
	nIndex = imgs[current+1]?current+1:0;

	nOpacity = imgs[nIndex].xOpacity;
	
	cOpacity-=.05; 
	nOpacity+=.05;
	
	imgs[nIndex].style.display = "block";
	imgs[current].xOpacity = cOpacity;
	imgs[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgs[current]); 
	setOpacity(imgs[nIndex]);
	
	if(cOpacity<=0) {
		imgs[current].style.display = "none";
		current = nIndex;
		setTimeout(so_xfade,3000);
	} else {
		setTimeout(so_xfade,50);
	}
	
	function setOpacity(obj) {
		if(obj.xOpacity>.99) {
			obj.xOpacity = .99;
			return;
		}
		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
	}
	
}

	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, September 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/	
	var contentHeight = 0; 	// The total height of the content
	var visibleContentHeight = 0;	
	var scrollActive = false;
	
	var scrollHandleObj = false; // reference to the scroll handle
	var scrollHandleHeight = false;
	var scrollbarTop = false;
	var eventYPos = false;

	var scrollbuttonActive = false;
	var scrollbuttonDirection = false;
	var scrollbuttonSpeed = 2; // How fast the content scrolls when you click the scroll buttons(Up and down arrows)
	var scrollTimer = 10;	// Also how fast the content scrolls. By decreasing this value, the content will move faster	
	
	var scrollMoveToActive = false;
	var scrollMoveToYPosition = false;
	
	var cD = 'a';
	function scrollDiv_startScroll(e)
	{
		if(document.all)e = event;
		scrollbarTop = document.getElementById(cD+'scrolldiv_theScroll').offsetTop;
		eventYPos = e.clientY;
		scrollActive = true;
	}
	
	function scrollDiv_stopScroll()
	{
		scrollActive = false;
		scrollbuttonActive = false;
		scrollMoveToActive = false;
	}
	function scrollDiv_scroll(e)
	{
		if(!scrollActive)return;
		if(document.all)e = event;
		if(e.button!=1 && document.all)return;
		var topPos = scrollbarTop + e.clientY - eventYPos; 
		if(topPos<0)topPos=0;
		if(topPos/1>visibleContentHeight-(scrollHandleHeight+4)/1)topPos = visibleContentHeight-(scrollHandleHeight+4);
		document.getElementById(cD+'scrolldiv_theScroll').style.top = topPos + 'px';
		document.getElementById(cD+'scrolldiv_content').style.top = 0 - Math.floor((contentHeight) * ((topPos)/(visibleContentHeight-scrollHandleHeight)))+'px' 
	}
	
	/*
	Click on the slider
	Move the content to the this point
	*/
	function scrolldiv_scrollMoveToInit(e)
	{		
		if(document.all)e = event;
		scrollMoveToActive = true;
		scrollMoveToYPosition = e.clientY - document.getElementById(cD+'scrolldiv_scrollbar').offsetTop;
		if(document.getElementById(cD+'scrolldiv_theScroll').offsetTop/1 > scrollMoveToYPosition) scrollbuttonDirection = scrollbuttonSpeed*-2; else  scrollbuttonDirection = scrollbuttonSpeed*2;
		scrolldiv_scrollMoveTo();	
	}
	
	function scrolldiv_scrollMoveTo()
	{
		if(!scrollMoveToActive || scrollActive)return;
		var topPos = document.getElementById(cD+'scrolldiv_theScroll').style.top.replace('px','');
		topPos = topPos/1 + scrollbuttonDirection;
		if(topPos<0){
			topPos=0;
			scrollMoveToActive=false;
		}
		//alert(topPos);
		if(topPos/1>visibleContentHeight-(scrollHandleHeight+4)/1){
			topPos = visibleContentHeight-(scrollHandleHeight+4);	
			scrollMoveToActive=false;
		}
		//alert(topPos);
		if(scrollbuttonDirection<0 && topPos<scrollMoveToYPosition-scrollHandleHeight/2)return;	
		if(scrollbuttonDirection>0 && topPos>scrollMoveToYPosition-scrollHandleHeight/2)return;			
		document.getElementById(cD+'scrolldiv_theScroll').style.top = topPos + 'px';
		document.getElementById(cD+'scrolldiv_content').style.top = 0 - Math.floor((contentHeight) * ((topPos)/(visibleContentHeight-scrollHandleHeight)))+'px' 		
		setTimeout('scrolldiv_scrollMoveTo()',scrollTimer);		
	}
	
	function cancelEvent()
	{
		return false;			
	}

	function scrolldiv_scrollButton()
	{
		if(this.id==cD+'scrolldiv_scrollDown')scrollbuttonDirection = scrollbuttonSpeed; else scrollbuttonDirection = scrollbuttonSpeed*-1;
		scrollbuttonActive=true;
		scrolldiv_scrollButtonScroll();
	}
	function scrolldiv_scrollButtonScroll()
	{
		if(!scrollbuttonActive)return;
		var topPos = document.getElementById(cD+'scrolldiv_theScroll').style.top.replace('px','');
		topPos = topPos/1 + scrollbuttonDirection;
		if(topPos<0){
			topPos=0;
			scrollbuttonActive=false;
		}
		if(topPos/1>visibleContentHeight-(scrollHandleHeight+4)/1){
			topPos = visibleContentHeight-(scrollHandleHeight+4);	
			scrollbuttonActive=false;
		}
		document.getElementById(cD+'scrolldiv_theScroll').style.top = topPos + 'px';
		//error here
		document.getElementById(cD+'scrolldiv_content').style.top = 0 - Math.floor((contentHeight) * ((topPos)/(visibleContentHeight-scrollHandleHeight)))+'px' 			
		setTimeout('scrolldiv_scrollButtonScroll()',scrollTimer);
	}
	function scrolldiv_scrollButtonStop()
	{
		scrollbuttonActive = false;
	}
	
	
	function scrolldiv_initScroll()
	{
		visibleContentHeight = document.getElementById(cD+'scrolldiv_scrollbar').offsetHeight ;
		contentHeight = document.getElementById(cD+'scrolldiv_content').offsetHeight - visibleContentHeight;		
		scrollHandleObj = document.getElementById(cD+'scrolldiv_theScroll');
		scrollHandleHeight = scrollHandleObj.offsetHeight;
		scrollbarTop = document.getElementById(cD+'scrolldiv_scrollbar').offsetTop;		
		document.getElementById(cD+'scrolldiv_theScroll').onmousedown = scrollDiv_startScroll;
		document.body.onmousemove = scrollDiv_scroll;
		document.getElementById(cD+'scrolldiv_scrollbar').onselectstart = cancelEvent;
		document.getElementById(cD+'scrolldiv_theScroll').onmouseup = scrollDiv_stopScroll;
		if(document.all)document.body.onmouseup = scrollDiv_stopScroll; else document.documentElement.onmouseup = scrollDiv_stopScroll;
		document.getElementById(cD+'scrolldiv_scrollDown').onmousedown = scrolldiv_scrollButton;
		document.getElementById(cD+'scrolldiv_scrollUp').onmousedown = scrolldiv_scrollButton;
		document.getElementById(cD+'scrolldiv_scrollDown').onmouseup = scrolldiv_scrollButtonStop;
		document.getElementById(cD+'scrolldiv_scrollUp').onmouseup = scrolldiv_scrollButtonStop;
		document.getElementById(cD+'scrolldiv_scrollUp').onselectstart = cancelEvent;
		document.getElementById(cD+'scrolldiv_scrollDown').onselectstart = cancelEvent;
		document.getElementById(cD+'scrolldiv_scrollbar').onmousedown = scrolldiv_scrollMoveToInit;
	}
	/*
	Change from the default color
	*/	
	function scrolldiv_setColor(rgbColor)
	{
		//document.getElementById('scrolldiv_scrollbar').style.borderColor = rgbColor;
		//document.getElementById('scrolldiv_theScroll').style.backgroundColor = rgbColor;
		//document.getElementById('scrolldiv_scrollUp').style.borderColor = rgbColor;
		//document.getElementById('scrolldiv_scrollDown').style.borderColor = rgbColor;
		//document.getElementById('scrolldiv_scrollUp').style.color = rgbColor;
		//document.getElementById('scrolldiv_scrollDown').style.color = rgbColor;
		//document.getElementById('scrolldiv_parentContainer').style.borderColor = rgbColor;
	}
	/*
	Setting total width of scrolling div
	*/
	function scrolldiv_setWidth(newWidth,x)
	{
		document.getElementById(x+'dhtmlgoodies_scrolldiv').style.width = newWidth + 'px';
		document.getElementById(x+'scrolldiv_parentContainer').style.width = newWidth-30 + 'px';		
	}
	
	/*
	Setting total height of scrolling div
	*/
	function scrolldiv_setHeight(newHeight,x)
	{
	//alert(newHeight);
		document.getElementById(x+'dhtmlgoodies_scrolldiv').style.height = newHeight + 'px';
		document.getElementById(x+'scrolldiv_parentContainer').style.height = newHeight + 'px';
		document.getElementById(x+'scrolldiv_slider').style.height = newHeight + 'px';
		document.getElementById(x+'scrolldiv_scrollbar').style.height = newHeight-40 + 'px';		
		//document.getElementById('scrolldiv_scrollbar').style.height = newHeight + 'px';		
	}
	/*
	Setting new background color to the slider 
	*/
	function setSliderBgColor(rgbColor,x)
	{
		document.getElementById(x+'scrolldiv_scrollbar').style.backgroundColor = rgbColor;
		document.getElementById(x+'scrolldiv_scrollUp').style.backgroundColor = rgbColor;
		document.getElementById(x+'scrolldiv_scrollDown').style.backgroundColor = rgbColor;
	}
	/*
	Setting new content background color
	*/
	function setContentBgColor(rgbColor,x)
	{
		document.getElementById(x+'scrolldiv_parentContainer').style.backgroundColor = rgbColor;
	}
	
	/*
	Setting scroll button speed
	*/
	function setScrollButtonSpeed(newScrollButtonSpeed)
	{
		scrollbuttonSpeed = newScrollButtonSpeed;
	}
	/*
	Setting interval of the scroll
	*/
	function setScrollTimer(newInterval)
	{
		scrollTimer = newInterval;
	}
//*********************************************************END Scroll custom///////////////////



//*****************************************************************************
// Do not remove this notice.
//
// Copyright 2001 by Mike Hall.
// See http://www.brainjar.com for terms of use.
//*****************************************************************************
 
// Determine browser and version.
 
function Browser() {
 
  var ua, s, i;
 
  this.isIE    = false;
  this.isNS    = false;
  this.version = null;
 
  ua = navigator.userAgent;
 
  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
 
  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
 
  // Treat any other "Gecko" browser as NS 6.1.
 
  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}
 
var browser = new Browser();
 
// Global object to hold drag information.
 
var dragObj = new Object();
dragObj.zIndex = 1000;
 
function dragStart(event, id) {
 
  var el;
  var x, y;
 
  // If an element id was given, find it. Otherwise use the element being
  // clicked on.
 
  if (id)
    dragObj.elNode = document.getElementById(id);
  else {
    if (browser.isIE)
      dragObj.elNode = window.event.srcElement;
    if (browser.isNS)
      dragObj.elNode = event.target;
 
    // If this is a text node, use its parent element.
 
    if (dragObj.elNode.nodeType == 3)
      dragObj.elNode = dragObj.elNode.parentNode;
  }
 
  // Get cursor position with respect to the page.
 
  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }
 
  // Save starting positions of cursor and element.
 
  dragObj.cursorStartX = x;
  dragObj.cursorStartY = y;
  dragObj.elStartLeft  = parseInt(dragObj.elNode.style.left, 10);
  dragObj.elStartTop   = parseInt(dragObj.elNode.style.top,  10);
 
  if (isNaN(dragObj.elStartLeft)) dragObj.elStartLeft = 0;
  if (isNaN(dragObj.elStartTop))  dragObj.elStartTop  = 0;
 
  // Update element's z-index.
 
  dragObj.elNode.style.zIndex = ++dragObj.zIndex;
 
  // Capture mousemove and mouseup events on the page.
 
  if (browser.isIE) {
    document.attachEvent("onmousemove", dragGo);
    document.attachEvent("onmouseup",   dragStop);
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS) {
    document.addEventListener("mousemove", dragGo,   true);
    document.addEventListener("mouseup",   dragStop, true);
    event.preventDefault();
  }
}
 
function dragGo(event) {
 
  var x, y;
 
  // Get cursor position with respect to the page.
 
  if (browser.isIE) {
    x = window.event.clientX + document.documentElement.scrollLeft
      + document.body.scrollLeft;
    y = window.event.clientY + document.documentElement.scrollTop
      + document.body.scrollTop;
  }
  if (browser.isNS) {
    x = event.clientX + window.scrollX;
    y = event.clientY + window.scrollY;
  }
 
  // Move drag element by the same amount the cursor has moved.
 
  dragObj.elNode.style.left = (dragObj.elStartLeft + x - dragObj.cursorStartX) + "px";
  dragObj.elNode.style.top  = (dragObj.elStartTop  + y - dragObj.cursorStartY) + "px";
 
  if (browser.isIE) {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  }
  if (browser.isNS)
    event.preventDefault();
}
 
function dragStop(event) {
 
  // Stop capturing mousemove and mouseup events.
 
  if (browser.isIE) {
    document.detachEvent("onmousemove", dragGo);
    document.detachEvent("onmouseup",   dragStop);
  }
  if (browser.isNS) {
    document.removeEventListener("mousemove", dragGo,   true);
    document.removeEventListener("mouseup",   dragStop, true);
  }
}
 //**************************************END Pop up code/////////////////