<!--
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 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 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 MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
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+'');
}



var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

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+',scrollbars=no,left='+W+',top='+H+',screenX='+W+',screenY='+H+'');
win.focus();
}

function selectupdate(element, val){
		for (i=0;i<element.options.length;i++)
			{
			    if  (element.options[i].value==val)
			    {
			         element.options[i].selected=true;
			         break;
			    }
			}
	}
	function radioupdate(element, val){
		for (i=0;i<element.length;i++)
			{
			    if  (element[i].value==val)
			    {
			         element[i].checked=true;
			         break;
			    }
			}
	}
	
function browserWidth() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  return myWidth;
}
function browserHeight() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  return myHeight;
}

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 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);
}


// -->