var preloaded_images = new Array();
var imgdir = "http://www.fujitsupc.com/images/";

function img_preload()
{
	var img;
	var str = "";
	if(document.images)
	{
		for(img in document.images)
		{
			if(document.images[img].name == img)
			{
				preloaded_images[img] = new Image();
				preloaded_images[img].src =  imgdir + img + ".gif";
				img += "-over";
				preloaded_images[img] = new Image();
				preloaded_images[img].src =  imgdir + img + ".gif";
				
			}
		}
	}
}


function m_over(which)
{
	if(document.images)
	{
		if(preloaded_images[which+"-over"])
		{
			document.images[which].src = preloaded_images[which+"-over"].src;
		}
	}
}


function m_out(which)
{
	if(document.images)
	{
		if(preloaded_images[which])
		{
	 		document.images[which].src = preloaded_images[which].src;
		}
	}
}

//===================================
function trim(arg) {
//===================================
	var func = "both";
	var trimvalue = "";
	arglen = arg.length;
	if (arglen < 1) return trimvalue;

	if (func == "left" || func== "both") {
		i = 0;
		pos = -1;
		while (i < arglen) {
			if (arg.charCodeAt(i) != 32 &&
!isNaN(arg.charCodeAt(i))) {
				pos = i;
				break;
			}
			i++;
		}
	}

	if (func == "right" || func== "both") {
		var lastpos = -1;
		i = arglen;
		while (i >= 0) {
			if (arg.charCodeAt(i) != 32 &&
!isNaN(arg.charCodeAt(i))) {
				lastpos = i;
				break;
			}
			i--;
		}
	}

	if (func == "left") {
			trimvalue = arg.substring(pos,arglen-1);
		}

	if (func == "right") {
		trimvalue = arg.substring(0,lastpos+1);
	}

	if (func == "both") {
		trimvalue = arg.substring(pos,lastpos + 1);
	}

	return trimvalue;

}

