/* --------------------------------------------------- */
/* example: onclick="ChangeDiv(5, 'CARNEEBLK', 7.5, 9) */
/* example: onclick="ChangeDiv(1, 'DBEIGEDRAPE', M, 1) */


function ChangeDiv(cnt, id, size, total)
{
	/* S M L */
	/* 5.5  6  6.5  7  7.5  8  8.5  9  9.5  10 */

	/* total is the total of currently available sizes to choose */
	/* cnt indicates this is the nth tab */

	for(var i = 1; i <= total ; i++) {
		if (i==cnt) {
			InfoButtonOn('tab'+i);
		}
		else {
			InfoButtonOff('tab'+i);
		}
	}
	var name= 'X_ITEM:' + id + ':_OP1';
	var val= '+-' + size;
	var name2= 'mysize';
	var change1= '<input type="hidden" name="' + name + '" value="' + val + '">';
	var change2= '<input type="hidden" name="' + name2 + '" value="' + val + '">';

	document.getElementById('OP1').innerHTML = change1 + change2;
}


function InfoButtonOn(Infobut) {
	document.getElementById(Infobut).className = "tab_on";
}
function InfoButtonOff(Infobut) {
	document.getElementById(Infobut).className = "tab_off";
}
