function setElementClass(elmName, cls) {
	var elm = document.getElementById(elmName);

	if(elm != null) {
		elm .className = cls;
	}
}

function getElementClass(elmName) {
	var elm = document.getElementById(elmName);

	if(elm != null) {
		return elm.className
	}
}

function compare() {
	var compareWin;
	var windowName =  "CompareProducts"
	var features;
	
	features = "dependent=yes,directories=no,location=no,menubar=no,resizable=yes,personalbar=no,scrollbars=yes,titlebar=no,toolbar=no,screenX=50,screenY=50,top=50, left=50";
	compareWin = window.open('', windowName, features);
	compareWin.focus();

	return false;
}

function viewImage(imagePath)
{
	var showImageWin;
	var windowName =  "ShowImages"
	var features;

	features = "dependent=yes,directories=no,location=no,menubar=no,resizable=yes,personalbar=no,scrollbars=no,titlebar=no,toolbar=no,screenX=50,screenY=50,top=50, left=50, width=300, height=300";
	ShowImageWin = window.open(imagePath, windowName, features);
	ShowImageWin.focus();

	return false;
}

function resizeFit(imageWidth, imageHeight)
{
	var diffWidth;
	var diffHeight;

	if(navigator.appName=="Netscape")
	{
		diffWidth = imageWidth - window.innerWidth;
		diffHeight = imageHeight - window.innerHeight;
	}
	else
	{
		diffWidth = imageWidth - window.document.body.clientWidth;
		diffHeight = imageHeight - window.document.body.clientHeight;
	}

	window.resizeBy(diffWidth, diffHeight);
}
