function dispW(layerid)
{
	gbi(layerid).style.display="block";
}
function dispHW(layerid)
{
	gbi(layerid).style.display="none";
}

function gbi(layerid)
{
	return document.getElementById(layerid);
}


var count=0;
var get1Div=0;
var posMove=0;
var countI=0;
var getDiv='';
var contWid=(gbi('contDivM').offsetWidth);
function moveLR()
{
	getDiv=gbi('moveDiv').getElementsByTagName('div');
	if(count<getDiv.length && count<getDiv.length-1)
	{gbi('ltMoveID').className='ltMove'
	get1Div=get1Div + contWid;//Math.round(getW/getDiv.length);
	move1();
	var countInc=count+1;
	moveLRpag1(gbi("l"+countInc), countInc);
	
	count=count+1;
	if(count>=getDiv.length-1)
	{gbi('rtMoveID').className='rtMove1';}
	}
	
	
	
}
function move1()
{
	//alert(getDiv.length);
	try{
		if((countI-(contWid/32))<get1Div)
		{	posMove=-countI; 
			gbi('moveDiv').style.left=posMove + "px";
			setTimeout(move1, 10);
			countI=countI+(contWid/32);
		}
	}
	catch(e)
	{
		alert(e);
	}
	
}

function moveLR1()
{
	getDiv=gbi('moveDiv').getElementsByTagName('div');
	if(count<getDiv.length && count>0)
	{gbi('rtMoveID').className='rtMove'
	get1Div=get1Div - contWid;//Math.round(getW/getDiv.length);
	move2();
	var countInc=count-1;
	moveLRpag1(gbi("l"+countInc), countInc);
	count=count-1;
	if(count<=0)
	{gbi('ltMoveID').className='ltMove1';}
	}
	
}
function move2()
{
	//alert(getDiv.length);
	try{
		if((countI+(contWid/32))>get1Div)
		{	posMove=-countI; 
			gbi('moveDiv').style.left=posMove + "px";
			setTimeout(move2, 10);
			countI=countI-(contWid/32);
		}
	}
	catch(e)
	{
		alert(e);
	}
}

function moveLRpag(obj, countVal)
{
	var countDiff=Math.abs(countVal-count);
	for(var j=0; j<countDiff; j++)
	{
		if(countVal<count)
		moveLR1();
		else
		moveLR();
	}
	
}
function moveLRpag1(obj, countVal)
{
	var i=0;
	while(gbi("l"+i))
	{
		gbi("l"+i).className='';
		i=i+1;
	}
	obj.className='bgCol';
}



/*change bg of selected box*/
function changeBG(objN, obj, classO, classN)
{	var j=1;
	var chkType=gbi(objN).getElementsByTagName('INPUT');
	if(chkType[0].type=='radio')
	{
		while(gbi(obj+j))
		{gbi(obj+j).className=classO;
			j=j+1;
		}
	}
	if(chkType[0].checked)
	gbi(objN).className=classN;
	else
	gbi(objN).className=classO;
}
function shHide(layerInit, objno, oClass, nClass)
{
	var i=1;	
	while(gbi(layerInit+i))
	{
		gbi(layerInit+i).className=oClass;
		i=i+1
	}
	gbi(layerInit+objno).className=nClass;
}

function shpmode(layerInitO, layerInitN)
{
	var i=1;
	while(gbi(layerInitO+i))
	{
		gbi(layerInitO+i).className='dspN';
		gbi(layerInitN+i).className='dspB';
		i=i+1;
	}
}