<!--
// preload the menu images

var SubNavHi = new Image();
var SubNav = new Image();
SubNavHi.src = "/images_menu/subNavHi_5.gif";
SubNav.src = "/images_menu/subNavInactive_5.gif";

function formatCurrency(amount)
{
	var i = parseFloat(amount);
	if(isNaN(i)) { i = 0.00; }
	var minus = '';
	if(i < 0) { minus = '-'; }
	i = Math.abs(i);
	i = parseInt((i + .005) * 100);
	i = i / 100;
	s = new String(i);
	if(s.indexOf('.') < 0) { s += '.00'; }
	if(s.indexOf('.') == (s.length - 2)) { s += '0'; }
	s = minus + s;
	return s;
}

function screenWidth()
{
if( self.screen ) // true in N4
        {
		//alert('1');
		//alert(screen.pixelDepth);
        W = screen.width;
        H = screen.height;
        //N = Math.pow( 2, screen.pixelDepth );
        }
else
if( self.java ) // for N3, true if LiveConnect enabled
        {
        dtk = java.awt.Toolkit.getDefaultToolkit();
        ss = dtk.getScreenSize();
        W = ss.width;
        H = ss.height;
        //N = Math.pow( 2, dtk.getColorModel().getPixelSize() );
        }
else
if( self.theBody ) // here should come E4
        {
		W = theBody.offsetWidth;
		H = theBody.offsetHeight;
        N = "?";
        }
else // N2, E3, N3 w/Java off, probably Opera and WebTV
        {
        W = H = N = "?";
        }
return W;
}

//___________________________________________________________________________________________________________________
function screenHeight()
{
if( self.screen ) // true in N4
        {
		W = screen.width;
        H = screen.height;
        //N = Math.pow( 2, screen.pixelDepth );
        }
else
if( self.java ) // for N3, true if LiveConnect enabled
        {
        dtk = java.awt.Toolkit.getDefaultToolkit();
        ss = dtk.getScreenSize();
        W = ss.width;
        H = ss.height;
        //N = Math.pow( 2, dtk.getColorModel().getPixelSize() );
        }
else
if( self.theBody ) // here should come E4
        {
		W = theBody.offsetWidth;
		H = theBody.offsetHeight;
        N = "?";
        }
else // N2, E3, N3 w/Java off, probably Opera and WebTV
        {
        W = H = N = "?";
        }
return H;
}


function openModalWindow() {
	//var div = $('modalWindow');
	var bgDiv = document.getElementById("modalBackgroundDiv"); 
	//get the size of the window and calculate where the box should be placed       
	     
	//opera Netscape 6 Netscape 4x Mozilla 
	if (window.innerWidth || window.innerHeight){ 
		docwidth = window.innerWidth; 
		docheight = window.innerHeight; 
	} 
	//IE Mozilla 
	if (document.body.clientWidth || document.body.clientHeight){ 
		docwidth = document.body.clientWidth; 
		docheight = document.body.clientHeight; 
	} 
	bgDiv.style.width = document.body.offsetWidth + 'px';        
	bgDiv.style.height = document.body.offsetHeight + 'px';        
	
	bgDiv.style.display = 'block';
}

function escapeSpecial(s){
	s = s.replace(/"/, '\"');
	//THIS FUNCTION IS NOT COMPLETE OR TESTED
}

function radioupdate(element, val){
		for (i=0;i<element.length;i++)
			{
			    if  (element[i].value==val)
			    {
			         element[i].checked=true;
			         break;
			    }
			}
	}
	

function getRadioValue(radioObj){
    if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";

}

function pagenow()
{

if( self.screen ) // true in N4
        {
        W = screen.width
        H = screen.height
        N = Math.pow( 2, screen.pixelDepth )
        }
else
if( self.java ) // for N3, true if LiveConnect enabled
        {
        dtk = java.awt.Toolkit.getDefaultToolkit()
        ss = dtk.getScreenSize()
        W = ss.width
        H = ss.height
        N = Math.pow( 2, dtk.getColorModel().getPixelSize() )
        }
else
if( self.theBody ) // here should come E4
        {
    W = theBody.offsetWidth
    H = theBody.offsetHeight
        N = "?"
        }
else // N2, E3, N3 w/Java off, probably Opera and WebTV
        {
        W = H = N = "?"
        }
W = (W/2) - 150
H = (H/2) - 85
win = window.open('/customer/page_form.asp','newwindow','width=300,height=170,scrollbars=no,left='+W+',top='+H+',screenX='+W+',screenY='+H+'');
}

function popit(url, name, x, y)
{

if( self.screen ) // true in N4
        {
        W = screen.width
        H = screen.height
        N = Math.pow( 2, screen.pixelDepth )
        }
else
if( self.java ) // for N3, true if LiveConnect enabled
        {
        dtk = java.awt.Toolkit.getDefaultToolkit()
        ss = dtk.getScreenSize()
        W = ss.width
        H = ss.height
        N = Math.pow( 2, dtk.getColorModel().getPixelSize() )
        }
else
if( self.theBody ) // here should come E4
        {
    W = theBody.offsetWidth
    H = theBody.offsetHeight
        N = "?"
        }
else // N2, E3, N3 w/Java off, probably Opera and WebTV
        {
        W = H = N = "?"
        }
W = (W/2) - (x/2)
H = (H/2) - (y/2)

win = window.open(url,name,'width='+x+',height='+y+',resizable=yes,scrollbars=no,left='+W+',top='+H+',screenX='+W+',screenY='+H);
win.focus()
}

function bpopopup(url){
pwin = window.open(url ,'win','resizable=yes,width=400,height=400,scrollbars=yes,left=100,top=100,screenX=100,screenY=100');
pwin.focus()
}


function subNavHi(obj) {
	//obj.className='subNavHi';
	obj.style.backgroundImage = 'url(/images_menu/subNavHi_5.gif)';
	if (obj.children){
		obj.children[0].className='underlineIt';
		//obj.children[0].style.backgroundImage=' url(/images_menu/subNavActive_4.gif)';
		//obj.setAtribute("background", "/images_menu/subNavActive_4.gif");
		//alert(obj.style.background-image);
	}else if (obj.childNodes){
		obj.childNodes[0].className='underlineIt';
	}
}
function subNavLo(obj) {
	//obj.className='subNav';
	obj.style.backgroundImage = 'url(/images_menu/subNavInactive_5.gif)';
	if (obj.children)
		obj.children[0].className='subNavLink';
	else if (obj.childNodes)
		obj.childNodes[0].className='subNavLink';
}
// Allows clicking on non text surface of tabs
function tabClick(src) {
	if (src.children) // IE
		src.children[0].click();
	else if (src.childNodes) // NN6
		window.location = src.childNodes[0].href;
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

String.prototype.left = function(n) {
    return this.substring(0, n);
}

//-->
