<!--
function chgBg(obj,color){
if (document.all || document.getElementById)
  obj.style.backgroundColor=color;
else if (document.layers)
  obj.bgColor=color;
}

function openWin( windowURL, windowName, windowFeatures ) { 
return window.open( windowURL, windowName, windowFeatures ) ; 
} 

function submitForm(s)  {
s.value = "In Progress";
s.disabled = true;
return true;
}

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) { 
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}

var checkflag = "true";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Uncheck All"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Check All"; }
}

function toggle_visibility(id) 
	{
	 var e = document.getElementById(id);
	 if(e.style.display == 'none')
	 	e.style.display = 'block';
	 else
		e.style.display = 'none';
	}
function turnoff(id) 
	{
		var e = document.getElementById(id);
		e.style.display = 'none';
	}
	
	function turnon(id) 
	{
		var e = document.getElementById(id);
		e.style.display = 'block';
	}



function formatCurrency(strValue)
	{
		strValue = strValue.toString().replace(/\$|\,/g,'');
		dblValue = parseFloat(strValue);
	
		blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
		dblValue = Math.floor(dblValue*100+0.50000000001);
		intCents = dblValue%100;
		strCents = intCents.toString();
		dblValue = Math.floor(dblValue/100).toString();
		if(intCents<10)
			strCents = "0" + strCents;
		for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
			dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
			dblValue.substring(dblValue.length-(4*i+3));
		return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
	}
	
	function domath(qty,val,f) {
		var shtml = qty * val;
		if (document.getElementById || document.all) {
  						var el = document.getElementById? document.getElementById(f): document.all[f];
  						if (el && typeof el.innerHTML != "undefined") el.innerHTML = formatCurrency(shtml);
		}
	}
	
	function validateMyCFSelect() {
		if (document.getElementById('PriceQuote').value != "")
			{
			   return true;
			}
		else
			{
			   alert("Please select a price group");
			   return false;
			}
	}
// -->
