function setHtmlById(divName, divStr)
{
	document.getElementById(divName).innerHTML = divStr;	
}

function getHtmlById(divName)
{
	return document.getElementById(divName).value;
}

function setHtmlByIdValue(divName, val)
{
	document.getElementById(divName).value = val;
}

function rollTr(trId, valColor, typ)
{
	trId.style.background=(typ=='over')?valColor:'';
}


function swapImages(obj, img, ext)
{
	obj.src = 'images/' + img + '.' + ext;
}

function changeBackGround(id, clr)
{
	id.style.backgroundColor = clr
}


function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function ltrim(stringToTrim) {
	return stringToTrim.replace(/^\s+/,"");
}
function rtrim(stringToTrim) {
	return stringToTrim.replace(/\s+$/,"");
}

function delete_confirm(url) 
{
	var answer = confirm("Are you sure you want to delete?")
	if (answer){
		window.location = url;
	}
	else{
		return false;
	}
}

function popUpWindown(url,winName, width, height, others)
{
	others = others?others:"location=1,status=1,scrollbars=1";
	myWindow= window.open (url, winName, others + ",width=" + width + ",height=" + height);
	myWindow.moveTo(0,0);
	myWindow.focus();
}


