
/**
 * DHTML textbox character counter (IE4+) script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

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;
}


function p_select(parent_id,section_id){
	var oDiv = document.getElementById(parent_id);
	if(oDiv.firstChild) { // check for children
		var oChild = oDiv.firstChild;
		while(oChild) {
			if(oChild.nodeType==1) { // element
				oChild.style.display = "none";
			}
			oChild = oChild.nextSibling;
		}
	}

	var cDiv = document.getElementById(section_id);
	cDiv.style.display = "block";

}

function show_purchase_advise(){

	var purchase_advise = document.getElementById('purchase_advise');
	purchase_advise.style.display="block";
}

