function textCounter(field, countfield, maxlimit)
{
	if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
	else 
  		countfield.value =  field.value.length;
//		countfield.value = maxlimit - field.value.length;}
}

function PopupDisplayProperty(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=Yes,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=670,left=232,top=160');");
}

function popUpPreview(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=Yes,location=0,statusbar=0,menubar=0,resizable=0,width=700,height=670,left=232,top=160');");
}

function htmlEncode(s)
{
     var el = document.createElement("span");
     el.innerText = s;
     s = el.innerHTML;
     return s;
}

function popUpWishList(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=Yes,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=350,left=32,top=160');");
}
