
<!--

function PokeToForm(id, formitem){

document.getElementById(formitem).value = "";

var content = document.getElementById(id).innerHTML; 
document.getElementById(formitem).value = content;
document.getElementById(formitem).focus();
tt_HideInit();
return;
}

function imposeMaxLength(Object, MaxLen)
{return (Object.value.length <= MaxLen);}	




		
	
function popUp(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}


function popUpMid(URL){

w=560;
h=500;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}

function popUpInvoice(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}

function popUpForPrint(URL){

w=780;
h=600;
day = new Date();
id = day.getTime();
LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,statusbar=0,menubar=no,toolbar=no,resizable=1';

eval("page" + id + " = window.open(URL, '" + id + "',settings);");
return false;

}






/***********************************************
* Form Field Progress Bar- By Ron Jonk- http://www.euronet.nl/~jonkr/
* Modified by Dynamic Drive for minor changes
* Script featured/ available at Dynamic Drive- http://www.dynamicdrive.com
* Please keep this notice intact
***********************************************/

function textCounter(field,counter,maxlimit,linecounter) {
	// text width//
	var fieldWidth =  parseInt(field.offsetWidth);
	var charcnt = field.value.length;        

	// trim the extra text
	if (charcnt > maxlimit) { 
		field.value = field.value.substring(0, maxlimit);
	}

	else { 
	// progress bar percentage
	var percentage = parseInt(100 - (( maxlimit - charcnt) * 100)/maxlimit) ;
	document.getElementById(counter).style.width =  parseInt((fieldWidth*percentage)/100)+"px";
	
	if (percentage >29){
		document.getElementById(counter).innerHTML="&nbsp;Used : "+percentage+"%"
		setProgressHeight(document.getElementById(counter),13,"height");
		setcolor(document.getElementById(counter),percentage,"background-color");
		}
		else{
			document.getElementById(counter).innerHTML=""
			setProgressHeight(document.getElementById(counter),0,"height");
		}
	}
}

function setcolor(obj,percentage,prop){obj.style[prop] = "rgb(80%,"+(100-percentage)+"%,"+(100-percentage)+"%)";}
function setProgressHeight(obj,height,prop){obj.style[prop] = height+"px";}







//-->
