// function parameters are: field - the string field, count - the field for remaining characters number and max - the maximum number of characters  
function CountLeft(field, count, max) {
// if the length of the string in the input field is greater than the max value, trim it 
if (field.value.length > max)
	field.value = field.value.substring(0, max);
else
	// calculate the remaining characters  
	count.value = max - field.value.length;
}

/**
 * DHTML check all/clear all links script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

var form='frmSample' //Give the form name here

function SetChecked(val,chkName) {
	dml=document.forms['createAuction'];
	len = dml.elements.length;
	
	var i=0;
	for( i=0 ; i<len ; i++) {
		if (dml.elements[i].name==chkName) {
			dml.elements[i].checked=val;
		}
	}
}

