function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);


/*---------------------------------------------------------------------------------*/
/*Random Image & Flash generation  - Begin*/
function GetRandom(start,end)
{
	var range = end - start + 1;
	var result = start + Math.floor(Math.random()*range);
	return result;
}

function ImgOfTheSession_AddTip(tipText)
{
	ImgOfTheSession.tips[ImgOfTheSession.tips.length] = tipText;
}

function ImgOfTheSession()
{
	var index = GetRandom(1,ImgOfTheSession.tips.length);
	var tipText = ImgOfTheSession.tips[index-1];
	document.write(tipText);
}

/*Random Image & Flash generation  - End*/
/*---------------------------------------------------------------------------------*/
/*This area is for Management Team mouse over change functions - Begin*/
/*
function toggleT(_w,_h) {
if (document.all) { // is IE
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='s') document.getElementById("text_1");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
} else { // is NS? 
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
}
*/
/* code modified by kaustav */
function toggleT(_w,_h) { 
   document.getElementById(_w).style.visibility = (_h == 's') ? 'visible' : 'hidden'; 
} 





function MgmtTeam1()
{
MM_swapImage('SCB','','images/SCB_a.jpg',1);
MM_swapImage('RG','','images/RG_n.jpg',1);
MM_swapImage('CRC','','images/CRC_n.jpg',1);
MM_swapImage('MNV','','images/MNV_n.jpg',1);
onMouseOver=toggleT('divSCB','s');
onMouseOut=toggleT('divRG','h');
onMouseOut=toggleT('divCRC','h');
onMouseOut=toggleT('divMNV','h');
}

function MgmtTeam2()
{
MM_swapImage('RG','','images/RG_a.jpg',1);
MM_swapImage('SCB','','images/SCB_n.jpg',1);
MM_swapImage('CRC','','images/CRC_n.jpg',1);
MM_swapImage('MNV','','images/MNV_n.jpg',1);
onMouseOver=toggleT('divSCB','h');
onMouseOut=toggleT('divRG','s');
onMouseOut=toggleT('divCRC','h');
onMouseOut=toggleT('divMNV','h');
}

function MgmtTeam3()
{
MM_swapImage('MNV','','images/MNV_a.jpg',1);
MM_swapImage('SCB','','images/SCB_n.jpg',1);
MM_swapImage('RG','','images/RG_n.jpg',1);
MM_swapImage('CRC','','images/CRC_n.jpg',1);
onMouseOver=toggleT('divSCB','h');
onMouseOut=toggleT('divRG','h');
onMouseOut=toggleT('divCRC','h');
onMouseOut=toggleT('divMNV','s');
}

function MgmtTeam4()
{
MM_swapImage('CRC','','images/CRC_a.jpg',1);
MM_swapImage('SCB','','images/SCB_n.jpg',1);
MM_swapImage('RG','','images/RG_n.jpg',1);
MM_swapImage('MNV','','images/MNV_n.jpg',1);
onMouseOver=toggleT('divSCB','h');
onMouseOut=toggleT('divRG','h');
onMouseOut=toggleT('divCRC','s');
onMouseOut=toggleT('divMNV','h');
}
/*This area is for Management Team mouse over change functions - End*/
/*---------------------------------------------------------------------------------*/

/*The code for slide show of Media Highlights - Start*/

	var index = 0;

	//Function to increment the index.
	function indexValue()
	{
		if( index == ( MediaHighlights.length - 1 ) )
		{
			index = 0;
		}
		else
		{
			index = index + 1;
		}
	}
	//Function to call next record set.
	function Nexter()
	{
		//alert("*** Nexter() ***");
		//alert(MediaHighlights.length);
		//If there is more than one row
		if( MediaHighlights.length > 0 )
		{
			showstart1('next');
			indexValue();
			show_mediatxt(index);
		}
	}
	//Function to call previous record set.
	function Backer()
	{
		//alert("*** Backer() ***");
		if( MediaHighlights.length > 0 )
		{
			showstart1('back');
			
			if( index ==  0 )
			{
				index = ( MediaHighlights.length - 1 );
			}
			else
			{
				index = index - 1;
			}
			show_mediatxt(index);
		}
	}
	
	//Function to display the data.
	function show_mediatxt(index)
	{
		if(MediaHighlights[index].length < 35 )
		{
			document.getElementById('mediatxt').innerHTML = "<a href='"+Medialink[index]+"' class='txt'>"+MediaHighlights[index]+"</a>"+"<br><br>";
		}
		else
		{
			document.getElementById('mediatxt').innerHTML = "<a href='"+Medialink[index]+"' class='txt'>"+MediaHighlights[index]+"</a>";
		}
	}

	//Function to show records in a slide form.
	function showstart()
	{
		//alert("index :"+index)
		if( document.kmgform.start.value == 'start' )
		{
			show_mediatxt(index);
			setTimeout("showstart('start')", 5000);
			indexValue();
		}
	}


	function showstart1( val )
	{

		//alert(document.kmgform.start.value);
		if( MediaHighlights.length > 0 )
		{
			if( document.kmgform.start.value == "start" || val == "back" || val == "next" )
			{
				document.kmgform.start.value = "stop";
				document.getElementById('stopplay').innerHTML = "<a href='#'><img src='../images/arw_prev.gif' alt='Previous' width='12' height='14' border='0' onClick='Backer()'></a><a href='#'><img src='../images/arw_stop.gif' width='9' height='14' border='0' alt='Start' onClick=\"showstart1('stopstart')\"></a><a href='#'><img src='../images/arw_next.gif' alt='Next' width='12' height='14' border='0' onClick='Nexter()'></a>";
			}
			else
			{
				document.kmgform.start.value = "start";
				document.getElementById('stopplay').innerHTML = "<a href='#'><img src='../images/arw_prev.gif' alt='Previous' width='12' height='14' border='0' onClick='Backer()'></a><a href='#'><img src='../images/arw_stop.gif' width='9' height='14' border='0' alt='Stop' onClick=\"showstart1('stopstart')\"></a><a href='#'><img src='../images/arw_next.gif' alt='Next' width='12' height='14' border='0' onClick='Nexter()'></a>";
			}
			//alert(document.kmgform.start.value);
			if( val == "stopstart" )
			{
				showstart();
			}
		}
	}




/*The code for slide show of Media Highlights - End*/

/*The code for slide show of Customer's Speak - Start*/

	//Function to increment the index.
	custindex = 0;
	function custindexValue()
	{
		if( custindex == ( CustMsg.length - 1 ) )
		{
			custindex = 0;
		}
		else
		{
			custindex = custindex + 1;
		}
	}

	//Function to display the data.
	function show_custtxt(custindex)
	{
		//alert(CustMsg.length);
		if( CustMsg[custindex] == "" )
		{
			
		}
		else
		{
			if( CustMsg[custindex].length < 28 )
			{
				document.getElementById('customermsg').innerHTML = "<a href='"+CustLink[custindex]+"' class='txt'>"+CustMsg[custindex]+"</a><br><br><br><br><br><br><span class='txtbold'>"+CustName[custindex]+"</span><br>"+CustComp[custindex]+"<br>"+CustCity[custindex]+", "+CustState[custindex]+"&nbsp;"+CustZip[custindex];
			}
			else
			{
				if( CustMsg[custindex].length < 55 )
				{
					document.getElementById('customermsg').innerHTML = "<img src='images/"+CustImg[custindex]+"' width='100' height='110' align='right'><a href='"+CustLink[custindex]+"' class='txt'>"+CustMsg[custindex]+"</a><br><br><br><br><br><span class='txtbold'>"+CustName[custindex]+"</span><br>"+CustComp[custindex]+"<br>"+CustCity[custindex]+", "+CustState[custindex]+"&nbsp;"+CustZip[custindex];
				}
				else
				{
					if( CustMsg[custindex].length < 80 )
					{
						document.getElementById('customermsg').innerHTML = "<img src='images/"+CustImg[custindex]+"' width='100' height='110' align='right'><a href='"+CustLink[custindex]+"' class='txt'>"+CustMsg[custindex]+"</a><br><br><br><br><span class='txtbold'>"+CustName[custindex]+"</span><br>"+CustComp[custindex]+"<br>"+CustCity[custindex]+", "+CustState[custindex]+"&nbsp;"+CustZip[custindex];
					}
					else
					{
						if( CustMsg[custindex].length < 115 )
						{
							document.getElementById('customermsg').innerHTML = "<img src='images/"+CustImg[custindex]+"' width='100' height='110' align='right'><a href='"+CustLink[custindex]+"' class='txt'>"+CustMsg[custindex]+"</a><br><br><br><span class='txtbold'>"+CustName[custindex]+"</span><br>"+CustComp[custindex]+"<br>"+CustCity[custindex]+", "+CustState[custindex]+"&nbsp;"+CustZip[custindex];
						}
						else
						{
							document.getElementById('customermsg').innerHTML = "<img src='images/"+CustImg[custindex]+"' width='100' height='110' align='right'><a href='"+CustLink[custindex]+"' class='txt'>"+CustMsg[custindex]+"</a><br><br><span class='txtbold'>"+CustName[custindex]+"</span><span align='left'><br>"+CustComp[custindex]+"<br>"+CustCity[custindex]+", "+CustState[custindex]+"&nbsp;"+CustZip[custindex]+"</span>";
						}
					}
				}
			}
		}
	}

	//Function to show records in a slide form.
	function custshowstart()
	{
		//alert("custindex :"+custindex)
//		if( document.kmgform.start.value == 'start' )
//		{
			show_custtxt(custindex);
			setTimeout("custshowstart()", 50000);
			custindexValue();
//		}
	}


/*The code for slide show of Customer's Speak - End*/


function newwindow(x) 
	{ 
	window.open(x,'new','width=475,height=450,left=115,top=120,scrollbars=no,resizable=no');
	}


