

function setheight(){
var formcolumn=document.getElementById("formbody").offsetHeight;
var copycolumn=document.getElementById("cont").offsetHeight;
var maxheight;

if(copycolumn>formcolumn)
{
  maxheight=copycolumn;
  document.getElementById("container1").style.height=maxheight+230;
  document.getElementById("formbody").style.height=maxheight-30;

   }else{
 maxheight=formcolumn;
 document.getElementById("container1").style.height=maxheight+240;
 document.getElementById("formbody").style.height=maxheight-40;
  }
 
 
} 
function setindexheight(){
document.getElementById("container").style.height=document.getElementById("premid1").offsetHeight+280;
} 

//alert(getElementById("formbody").offsetHeight);
function doProcessing() {
	document.getElementById('button1').className = 'thide';
	document.getElementById('processing1').className = 'tshow';
} 

	
function doProcessing1() {
	document.getElementById('button1').className = 'tshow';
	document.getElementById('processing1').className = 'thide';
	
} 


function openPopupWindowL(page, name)
	{
		newWin = window.open(page, name,'width=230, resizable=no height=300, scrollbars=yes, left=10,top=20');
		if (window.focus) { newWin.focus() }
	}
function openWin(page,wid,hegt) {
 	
  var options = "scrollbars=yes, width=" + wid + ", height=" + hegt;
   var win = window.open(page, 'MyWin', options);
    if (window.focus) { win.focus() }
 
}
	

function displayinfo(counters,increment)
{
				//	alert(document.getElementById('formval').value);
                    var h;  
					var i;    
					if(document.getElementById('formval').value==0)
					{
	//					alert("i = 1");
					 	i=1;
					}
					else
					{
//					 	alert("Inside else");
					 	i =  document.getElementById('formval').value;
					}                 
                                     
                      
                        var j;
                        if (i == counters) {
                                    if(increment == 'yes')
                                    {
                                    i=1;
                                    }
                        }
                        else {
                        if(increment == 'yes') {

                                    i++;

                                    }
                        }
                        //alert('final value: '+i);     
                        for (j=1; j<=counters;j++) {
                                    if (j==i) {
                                                MainIDElem = document.getElementById('mainId'+j);
											    MainIDElem.className= 'tshow';
		//										alert('MainIDElem'+MainIDElem);   
                                                var showNodeElmtfoot = document.getElementById('footerid'+j);
                                                var showNodeElmtfoot1 = document.getElementById('footerid1'+j);
                                               	showNodeElmtfoot.className= 'tshow';
                                               	showNodeElmtfoot1.className= 'tshow';
                                    }
                                    else 
                                    {
                                                MainIDElem = document.getElementById('mainId'+j);
                                                MainIDElem.className= 'thide';
                                                showNodeElmtfoot = document.getElementById('footerid'+j);
                                                var showNodeElmtfoot1 = document.getElementById('footerid1'+j);
                                               	showNodeElmtfoot.className= 'thide';
                                               	showNodeElmtfoot1.className= 'thide';
                                    }
                        }
						
                        
                        // change the value of the hidden field
                        document.getElementById('formval').value = i;
}
function displayContent(counters)

{
            displayinfo(counters,'yes');

}
