//-----------------------------------------------------------------------------
//	Common functions. 
// MerchantsReviews.com 
// (C) 2006 All rights reserved
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// Shows Help window.
function showHelp(bPath, fileName) {
	var posx, posy, width, height, winCfg;
	width = 100;
	
	
	
	winCfg = "directories=0,location=0,menubar=0,toolbar=0,status=0,resizable=0,scrollbars=1,fullscreen=0";
	winCfg += ",width="+(screen.width * 0.5);
	winCfg += ",height="+(screen.height * 0.5);
	winCfg += ",left="+(screen.width * 0.25);
	winCfg += ",top="+(screen.width * 0.2);
	
	window.open(bPath+"common/help/"+fileName+".html", "Help", winCfg);
}

//-----------------------------------------------------------------------------
// limits text field's to some length of text.
function setTextAreaLimit(limit, taObject, sizeObjectID) {
var size;
var sizeObject;

	sizeObject = document.getElementById(sizeObjectID);

	size = (limit - taObject.value.length);
	
	if (size > 0) {
		sizeObject.className = '';
		sizeObject.innerHTML = size;
	} else {
		sizeObject.className = 'tredb';
		sizeObject.innerHTML = 0;
		taObject.value = taObject.value.substr(0,limit);
	};
}
