function lTrim(str)
	{
	if (str.charAt(0) == " ")
	{
	str = str.slice(1);
	str = lTrim(str); 
	}
	return str;
	}
	function rTrim(str)
	{
	var iLength;
	
	iLength = str.length;
	if (str.charAt(iLength - 1) == " ")
	{
	str = str.slice(0, iLength - 1);
	str = rTrim(str);
	}
	return str;
	}

function flexToggle(el){
if(el.className=='flex_open'){el.className='flex_shut';}else{el.className='flex_open';}}
	function trim(str)
	{
	return lTrim(rTrim(str));
	}


function getElement(el) {
	   return document.all ? document.all[el] : document.getElementById(el);
}

function show(chkw,width) { //chk size
                 if(chkw>width) {
                     chkw=width;
                     }
                 else {
                     chkw=chkw;
                 }
                 return chkw;
}

function resizeImg(chkw,width) { //chk size
                 if(chkw>width) {
                     chkw=width;
                     }
                 else {
                     chkw=chkw;
                 }
                 return chkw;
}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft;
			obj = obj.offsetParent;
		}
	} else {
		if (obj.x) {
			curleft += obj.x;
		}
	}
	return curleft;
}
function findPosY(obj) {
	var curtop = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop;
			obj = obj.offsetParent;
		}
	} else {
		if (obj.y) {
			curtop += obj.y;
		}
	}
	return curtop;
}