

// --------------------------------------------------------
// set up globals

//timers
var timerL1 = null;
var aWait = 10;

//TIMING holds property of visible nav layer
var whichLayershowing1 = null;


// --------------------------------------------------------
// init main
function re_init() {
	
	LL_init();//set global vars
	preL();//preload images
}



function shiftPS(amount){//shift products & services nav

	LL_shiftBy('Mainleft_nav',0,amount);
	LL_shiftBy('left_nav1',0,amount);
	LL_shiftBy('left_nav2',0,amount);
	LL_shiftBy('left_nav3',0,amount);
	LL_shiftBy('left_nav4',0,amount);
	LL_shiftBy('left_nav6',0,amount);
	LL_shiftBy('left_nav5',0,amount);

}

//---------------------------------------------------------
//      Roll Functions


function g_menu(wlayer, wimg, active, activeLayer){

	if (active){
		//roll image
		if (!LL_NN){
			roll(wimg, true);
		}else{
			document.layers[activeLayer].document.images[wimg].src = eval(wimg + '_o.src');//roll image NN
		}
		
		//kill other layers
		if (whichLayershowing1){
		LL_hideLayer(whichLayershowing1);
		}
		
		LL_showLayer(wlayer);
		clearTimeout(timerL1);	timerL1 = null;
		whichLayershowing1 = wlayer;
	}
	else{

		//roll image
		if (!LL_NN){
			roll(wimg);
		}else{
			//NN 4* code for images in layers
			document.layers[activeLayer].document.images[wimg].src = eval(wimg + '.src');//roll image NN

		}

		timerL1 = setTimeout('LL_hideLayer(\''+ wlayer +'\');',aWait);
	}

}



//roll image function

function roll(name,aOn){
	var sfx;
	if (document.images) {  
		sfx = (!aOn) ? '': '_o';
		document.images[name].src=eval(name + sfx + ".src");
	}
}

//roll image (one layer deep) function

function g_roll(name, aOn, rLayer){
	var sfx;
	sfx = (!aOn) ? '': '_o'

	if (!LL_NN){
		document.images[name].src=eval(name + sfx + ".src");//roll image
	}else{
		//NN 4* code for images in layers
		document.layers[rLayer].document.images[name].src = eval(name + sfx + ".src");//roll image NN

	}
		

}

//create newImage
function newImage(src) {
        var anImg = new Image;
        anImg.src = src;
        return anImg;
}





//-------------------------------

var myWin = null;
function gen_popup(theUrl,theTitle,theDim) {
	if ((! myWin) || (myWin.closed)) {
		if (! theDim) {
			theDim = 'width=700,height=400,left=5,top=5,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=no,';
		}
		myWin = window.open(theUrl,theTitle,theDim);
		myWin.opener = window;
	} else {
		myWin.location = theUrl;
		myWin.focus();
		myWin.opener = window;
	}
}


