//--------------------------image preload-------------------------//
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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

//--------------------------------------popupwindow----------------------//


function MM_openBrWindow(theURL,winName,features)
	{ 
     window.open(theURL,winName,features);
     }

   
//--------------------------------------Crumbarimage&heading---------------------//
function setcrumbBar(bg,txt){
imagefile = "src='images/" + bg + "'";
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #006946;"><tr><td width="30%">');
document.write('<img ' + imagefile + ' alt="crumbImage" width="242" height="65" title="" /></td>');
//document.write('<td width="3%">&nbsp;</td>');
document.write('<td  width="70%"><dd><div class="crumbBar">' + txt + '</div></dd></td>');
document.write('</tr></table>');
}

function setcrumbBarAboutUs(bg,txt){
imagefile = "src='images/" + bg + "'";
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #006946;"><tr><td width="30%">');
document.write('<img ' + imagefile + ' alt="crumbImage" width="252" height="65" title="" /></td>');
document.write('<td width="13%">&nbsp;</td>');
document.write('<td  width="70%"><dd><div class="crumbBar">' + txt + '</div></dd></td>');
document.write('</tr></table>');
}


function setcrumbBarTxt(bg,txt,txt1){
imagefile = "src='images/" + bg + "'";
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #006946;"><tr><td width="30%">');
document.write('<img ' + imagefile + ' alt="crumbImage" width="252" height="65" title="" /></td>');
document.write('<td  width="100%"><div align="left" class="crumbBar">' + txt + '</div><div align="left" class="crumbBar1"><dd>' + txt1 + '</dd></div></td>');
document.write('<td width="1%">&nbsp;</td></tr></table>');
}

function setcrumbBarTextLarge(bg,txt,txt1){
imagefile = "src='images/" + bg + "'";
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #006946;"><tr><td width="30%">');
document.write('<img ' + imagefile + ' alt="crumbImage" width="252" height="65" title="" /></td>');
document.write('<td  width="100%"><div align="left" class="crumbBar">' + txt + '</div><div align="left" class="crumbBar1">' + txt1 + '</div></td>');
document.write('<td width="1%">&nbsp;</td></tr></table>');
}

function setcrumbBarcontent(bg,txt){
imagefile = "src='images/" + bg + "'";
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-bottom:1px solid #C4CEA7;"><tr><td width="20%">');
document.write('<img ' + imagefile + ' alt="crumbImage" width="200" height="65" title="" /></td>');
document.write('<td  width="63%"><div align="left" class="crumbBar">' + txt + '</div></td>');
document.write('<td width="1%">&nbsp;</td></tr></table>');
}

//--------------slideshow-------------------------------//

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = './images/bannermain.jpg'
Pic[1] = './images/bannerparma.jpg'
Pic[2] = './images/bannerfinancial.jpg'
Pic[3] = './images/bannergovernment.jpg'
Pic[4] = './images/bannerhealth.jpg'
Pic[5] = './images/bannerpublish.gif'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0

var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
	
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
   //j = 0
   // Case Study
	//alert("Slide Show - Case Study")
   /*if (document.all){
      document.images.SlideShowcase.style.filter="blendTrans(duration=2)"
      document.images.SlideShowcase.style.filter="blendTrans(duration=crossFadeDuration1)"
      document.images.SlideShowcase.filters.blendTrans.Apply()      
   }
   document.images.SlideShowcase.src = preLoad[j].src
   if (document.all){
      document.images.SlideShowcase.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
   //j = 0
}





//--------------Slideshow for Case Studies-------------------------------//

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed1 = 4000

// Duration of crossfade (seconds)
var crossFadeDuration1 = 3

// Specify the image files
var Piccase = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Piccase[0] = './images/case-tech.gif'
Piccase[1] = './images/workmaintop.gif'
Piccase[2] = './images/case-training.gif'
Piccase[3] = './images/CDM.gif'
Piccase[4] = './images/casestudiesco.gif'
// =======================================
// do not edit anything below this line
// =======================================

var t1
var j1 = 0

var p1 = Piccase.length

var preLoad1 = new Array()
for (i = 0; i < p1; i++){
   preLoad1[i] = new Image()
   preLoad1[i].src = Piccase[i]
}

// Right side menu onclick javascript funciton
/*function highlightlink(hrefid)
{
//	alert ('HREF Id:' + hrefid);
	var obj = document.getElementById(hrefid);
	obj.className='sitelinknormal';
	if (hrefid == 'caseplanning')
	{
//		alert ('Inside Case Planning');
		alert ('object : '+ obj);
		//document.getElementById('caseplanning').className='tablecontentboldsplit';
		document.getElementById('setHREFValue').value='tablecontentboldsplit';
		obj.className='tablecontentboldsplit';	
	}
}

function setRightMenuClass()
{
	var href = window.location.href;
	var hrefParts = href.split('?');
	if (hrefParts.length == 1)
	{
		document.getElementById('caseplanning').className = 'sitelinknormal';
	}
	else
	{
		var qrystr = hrefParts[1];
		var qrystrParts = qrystr.split('=');
		var qrystrvalue = qrystrParts[1];
		alert ('Query Parts:' + qrystrvalue);
		//document.getElementById(qrystrvalue).className = 'tablecontentboldsplit';
/*		alert ('Query Parts:' + qrystrvalue + ' - caseplanning ');*/
		/*if (qrystrvalue ==  "caseplanning")
		{
			alert ('Query Parts:' + qrystrParts[1]);
			document.getElementById('caseplanning').className = 'tablecontentboldsplit';
		}
	}
	
/*	alert ('hrefparts length:' + hrefParts.length);
	alert ('I am in Right Menu Class');
	alert(document.getElementById('caseplanning').className);
	alert ('Hidden :' + document.getElementById('setHREFValue').value);
	if (document.getElementById('caseplanning').className != 'tablecontentboldsplit')*/
}
/*function runSlideShowCase(){
	if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
   /*if (document.all){
      document.images.SlideShowcase.style.filter="blendTrans(duration=2)"
      document.images.SlideShowcase.style.filter="blendTrans(duration=crossFadeDuration1)"
      document.images.SlideShowcase.filters.blendTrans.Apply()      
   }
   document.images.SlideShowcase.src = preLoad1[j1].src
   if (document.all){
      document.images.SlideShowcase.filters.blendTrans.Play()
   }
   j1 = j1 + 1
   if (j1 > (p1-1)) j=0
   t = setTimeout('runSlideShowCase()', slideShowSpeed1)
}*/

onLoad="initMenu();runSlideShow();"

