<!--
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_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_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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 showDiv2(div_id) {  
	if (document.getElementById(divid)) {
		var style_sheet = getStyleObject(div_id);	  
		if (style_sheet) {
			changeObjectVisibilityBetter(div_id, "block");
		}	  
		else {
			alert("Sorry, this only works in browsers that support Dynamic HTML (sd2)");
		}
	}
}
function hideDiv2(div_id) {
	if (document.getElementById(div_id)) {
		var style_sheet = getStyleObject(div_id);	  
		if (style_sheet) {
			changeObjectVisibilityBetter(div_id, "none");
		}	  
		else {
			alert("Sorry, this only works in browsers that support Dynamic HTML (hd2)");
		}
	}
}
function showDiv(div_id) {
  
  var style_sheet = getStyleObject(div_id);
  
  if (style_sheet) {
    //set
    changeObjectVisibility(div_id, "visible");
  }
  
  else {
    alert("Sorry, this only works in browsers that support Dynamic HTML (sd)");
  }
}
function hideDiv(div_id) {
  
  var style_sheet = getStyleObject(div_id);
  
  if (style_sheet) {
    changeObjectVisibility(div_id, "hidden");
  }
  
  else {
    alert("sorry, this only works in browsers that support Dynamic HTML (hd)");
  }
}
function popUp(url) {
	
	sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
	
	self.name = "mainWin";

}
function popUp(url, x, y) {
	
	sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=' + x + ',height=' + y);
	
	self.name = "mainWin";

}
function switchDiv(div_id) {
  
  var style_sheet = getStyleObject(div_id);
  
  if (style_sheet) {
    hideAll();
    changeObjectVisibility(div_id, "visible");
  }
  
  else {
    alert("Sorry, this only works in browsers that support Dynamic HTML (swd)");
  }
}
function switchDivBetter(div_id) {
  
  var style_sheet = getStyleObject(div_id);
  
  if (style_sheet) {
    hideAllBetter();
    changeObjectVisibilityBetter(div_id, "block");
  }
  
  else {
    alert("Sorry, this only works in browsers that support Dynamic HTML (sdb)");
  }
}
function getStyleObject(objectId) {
  
	// checkW3C DOM, then MSIE 4, then NN 4.
	if(document.getElementById && document.getElementById(objectId)) {
		return document.getElementById(objectId).style;
	}
	
	else if (document.all && document.all(objectId)) {  
		return document.all[objectId].style;
	} 
   
	else if (document.layers && document.layers[objectId]) { 
		return document.layers[objectId];
	} 
   
	else {
		return false;
	}
}
function changeObjectVisibility(objectId, newVisibility) {
    
    // first get the object's stylesheet
    var styleObject = getStyleObject(objectId);

    
    /* then if we find a stylesheet, set its visibility
       as requested */

    if (styleObject) {
		styleObject.visibility = newVisibility;
		return true;
    } 
    
    else {
		return false;
    }
}
function changeObjectVisibilityBetter(objectId, newVisibility) {
    
    // first get the object's stylesheet
    var styleObject = getStyleObject(objectId);

    
    /* then if we find a stylesheet, set its visibility
       as requested */

    if (styleObject) {
		styleObject.display = newVisibility;
		return true;
    } 
    
    else {
		return false;
    }
}

var left = null;
var top = null;

function setVisibilityAndPosition(objectId, x, y) {
	if (document.all) {  // IE4+
        document.all[objectId].style.posLeft = 200;
        document.all[objectId].style.posTop = 200;
        document.all[objectId].style.visibility = 'visible';
		return;
		
	} 
	else if (document.layers) {  // NN 4+ or W3C DOM		
        document.layers[object].left = 200;
        document.layers[object].top = 200;
        document.layers[object].visibility = 'visible';
		return;
		
	}
	else if (document.getElementById) { //Mozilla, Netscape 6 + 7		
		document.getElementById(objectId).style.left = 200;
        document.getElementById(objectId).style.top = 200;
		document.getElementById(objectId).style.visibility = 'visible';
		return;
		
	}
	else {
		alert("Sorry, this only works in browsers that support Dynamic HTML (svp)");
	}
}

function setRelativeVisibilityAndPosition(objectId, x, y) {
	if (document.all) {  // IE4+
        document.all[objectId].style.posLeft = left+x;
        document.all[objectId].style.posTop = top+y;
        document.all[objectId].style.visibility = 'visible';
		return;
		
	} 
	else if (document.layers) {  // NN 4+ or W3C DOM		
        document.layers[object].left = left+x;
        document.layers[object].top = top+y;
        document.layers[object].visibility = 'visible';
		return;
		
	}
	else if (document.getElementById) { //Mozilla, Netscape 6 + 7		
		document.getElementById(objectId).style.left = left+x;
        document.getElementById(objectId).style.top = top+y;
		document.getElementById(objectId).style.visibility = 'visible';
		return;
		
	}
	else {
		alert("Sorry, this only works in browsers that support Dynamic HTML (srvp)");
	}
}

function setAbsoluteVisibilityAndPosition(objectId, x, y) {

	if (document.all) {  // IE4+
		//document.all[objectId].style.posLeft = window.event.x + document.body.scrollLeft + x;
        //document.all[objectId].style.posTop = window.event.y + document.body.scrollTop + y;
        document.all[objectId].style.posLeft = x;
        document.all[objectId].style.posTop = y;      
        document.all[objectId].style.visibility = 'visible';
		return;
		
	} 
   
	else if (document.layers) {  // NN 4+ or W3C DOM		
		document.layers[object].left = x;
        document.layers[object].top = y;
        document.layers[object].visibility = 'visible';
		return;
		
	}
	
	else if (document.getElementById) { //Mozilla, Netscape 6 + 7		
		document.getElementById(objectId).style.left = x;
        document.getElementById(objectId).style.top = y;       
		document.getElementById(objectId).style.visibility = 'visible';
		return;
		
	}
	
	else {
		alert("Sorry, this only works in browsers that support Dynamic HTML (savp)");
	}
}
function hideLayer(objectId) {
    if (document.layers && document.layers[objectId]) {
        document.layers[objectId].visibility = 'hidden';
    }
    
    else if (document.all) {
        document.all[objectId].style.visibility = 'hidden';
    }
    
    else if (document.getElementById) {
    	document.getElementById(objectId).style.visibility = 'hidden';
    }
    
}
function hideAll()  {
	changeObjectVisibility("bind_show","hidden");
	changeObjectVisibility("bind_hide","hidden");
}
function hideAllBetter()  {
	changeObjectVisibilityBetter("bind_show","none");
	changeObjectVisibilityBetter("bind_hide","none");
}
function setMouseCoordinate(e) {
	
	if (document.layers) { // NN 4+
		left = e.pageX; 
		top = e.pageY;
	}
	
	else if (document.all) { // IE 4+
		left = document.body.scrollLeft + event.clientX;
		top = document.body.scrollTop + event.clientY;
	}
	
	else if (document.getElementById) { // NN 6+
		left = e.pageX; 
		top = e.pageY;
	}
	
	//window.status = "left=" + left + ", top=" + top;	
}
function trim(strText) { 
	// get rid of leading spaces / tabs / returns 
	while (strText.substring(0,1) == ' ' || strText.substring(0,1) == '\n' || strText.substring(0,1) == '\t') 
		strText = strText.substring(1, strText.length);
	// get rid of trailing spaces 
	//while (strText.substring(strText.length-1,strText.length) == ' ')
	//	strText = strText.substring(0, strText.length-1);
	return strText;
}
function updateText(id, str) {
	if (document.getElementById(id)) {
		document.getElementById(id).innerHTML = str;
	}
}
function globalFormatCurrency(num) {
	if (num == null) {
		return "";
	}
	else {
		num = num.toString().replace(/\$|\,/g,'');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num*100+0.50000000001);
		cents = num%100;
		num = Math.floor(num/100).toString();
		if(cents<10)
			cents = "0" + cents;
		for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
			num = num.substring(0,num.length-(4*i+3))+','+ num.substring(num.length-(4*i+3));
		return (((sign)?'':'-') + '$' + num + '.' + cents);
	}
}
function globalRoundAmount(n) { 
	var s = "" + Math.round(n * 100) / 100 
	var i = s.indexOf('.') 
	if (i < 0) return s + ".00" 
		var t = s.substring(0, i + 1) + s.substring(i + 1, i + 3) 
	if (i + 2 == s.length) t += "0" 
		return t 
}

//-->