//simple rollovers
// patni - kishor - 9/5/03 added this 
	  var needLinkName = "";
	  var aryImages = new Array(10);
	   
	  aryImages[0] = "/bv70/images/homepage_Image1.jpg";
	  aryImages[1] = "/bv70/images/home1.jpg";
	  aryImages[2] = "/bv70/images/home2.jpg";
	  aryImages[3] = "/bv70/images/home3.jpg";
	  aryImages[4] = "/bv70/images/homePhotoMain_01.jpg";
		

	  aryImages[5] = "/bv70/images/mail_Management_On.gif";
	  aryImages[6] = "/bv70/images/doc_Management_On.gif";
	  aryImages[7] = "/bv70/images/outsourcing_ON.gif";
	  aryImages[8] = "/bv70/images/executive_View_On.gif";
	  aryImages[9] = "/bv70/images/buttonOrange.gif"; 

	  for (i=0; i < aryImages.length; i++) 
	  {
		var preload = new Image();
		preload.src = aryImages[i];
	  }

	  function swapImg(imgIndex)
	  {
	  	//document['imgMain'].src = aryImages[imgIndex];
		document.getElementById("imgMain"+selectedNum).src = aryImages[imgIndex];
		bName = navigator.appName
		if(bName != "Netscape")
		{
			if(imgIndex == 4)
			{
				//imageHref.style.cursor="default";
				document.getElementById("imageHref"+selectedNum).style.cursor="default";
			}
			else
			{
				//imageHref.style.cursor="hand";
				document.getElementById("imageHref"+selectedNum).style.cursor="hand";
			}
		}	
	  }
	//Added By Wipro-Start

	function changeImg(imgSrc)
	{
		if(imgSrc=='null')
		{
			swapImg(4);
		}
		else
		{
			//document['imgMain'].src = imgSrc;
			document.getElementById("imgMain"+selectedNum).src = imgSrc;
			//imageHref.style.cursor="default";
			document.getElementById("imageHref"+selectedNum).style.cursor="default";
		}
	}
	//End of Addition By Wipro

	  function swapButton(imgIndex) 
	  {
		if (imgIndex == '1') { 	document['butMain0'].src = aryImages[imgIndex+4]; }
		if (imgIndex == '2') { 	document['butMain1'].src = aryImages[imgIndex+4]; }
		if (imgIndex == '3') { 	document['butMain2'].src = aryImages[imgIndex+4]; }
		if (imgIndex == '4') { 	document['butMain3'].src = aryImages[imgIndex+4]; }
		if (imgIndex == '9') { 	
								document['butMain0'].src = aryImages[9];
								document['butMain1'].src = aryImages[9]; 
								document['butMain2'].src = aryImages[9]; 
								document['butMain3'].src = aryImages[9]; 
							 } 
	  }

function swapButtonNormal(imgIndex)
{
	if (imgIndex == '0') { 	document['butMain0'].src = aryImages[9]; }
	if (imgIndex == '1') { 	document['butMain1'].src = aryImages[9]; }
	if (imgIndex == '2') { 	document['butMain2'].src = aryImages[9]; }
	if (imgIndex == '3') { 	document['butMain3'].src = aryImages[9]; }
}

function swapButtonHome(imgIndex) {
    if (imgIndex == '1') { 	document['butMain0'].src = aryImages[imgIndex+4]; }
	if (imgIndex == '2') { 	document['butMain1'].src = aryImages[imgIndex+4]; }
	if (imgIndex == '3') { 	document['butMain2'].src = aryImages[imgIndex+4]; }
	if (imgIndex == '4') { 	
							document['butMain0'].src = aryImages[9];
							document['butMain1'].src = aryImages[9]; 
							document['butMain2'].src = aryImages[9]; 
						 } 
  }
  
  function swapOtherButtonsToNormal(imgIndex)
  {
  	if (imgIndex == '0') { 	document['butMain1'].src = aryImages[9];document['butMain2'].src = aryImages[9];}
  	if (imgIndex == '1') { 	document['butMain0'].src = aryImages[9];document['butMain2'].src = aryImages[9];}
  	if (imgIndex == '2') { 	document['butMain0'].src = aryImages[9];document['butMain1'].src = aryImages[9];}
  	if (imgIndex == '3') { 	document['butMain0'].src = aryImages[9];document['butMain1'].src = aryImages[9];document['butMain2'].src = aryImages[9]; }
 }
 
 
function getNeedLink(needLink){
	needLinkName = ""+needLink;
}

function getNeedLinkValue(){
	return needLinkName;
}

  
// patni - kishor - 9/5/03 end
//simple rollovers

function roll_on() {
        this.state='on';
        this.update();
}

function roll_off() {
        this.state='off';
        this.update();
}

function current_image_src() {
        if (this.state=='on') {
        return this.lit_source.src;
        } else {
        return this.unlit_source.src;
        }
}

function update_face() {
        document.images[this.name].src = this.src();
}

function rollover_image(image_name, unlit_source, lit_source) {
        this.name = image_name;
        this.unlit_source = new Image();
        this.unlit_source.src = unlit_source;
        this.lit_source = new Image();
        this.lit_source.src = lit_source;
        this.state = 'off';
        this.src = current_image_src;
        this.update = update_face;
        this.on = roll_on;
        this.off = roll_off;
}


//multiple rollovers

function multiple_rollover_image(rollover_name, unlit_source, image_names, image_sources) {
        this.name = rollover_name;
        this.image_names = image_names;
        this.image_sources = image_sources;
        this.unlit_source = new Image();
        this.unlit_source.src = unlit_source;
        this.state = 'multiple_internal_off';
        this.src = multiple_current_image_src;
        this.update = update_face;
        this.on = multiple_roll_on;
        this.off = multiple_roll_off;
}

function multiple_roll_on(desired_image) {
        this.state=desired_image;
        this.update();
}

function multiple_roll_off() {
        this.state='multiple_internal_off';
        this.update();
}

function multiple_current_image_src() {
        if (this.state=='multiple_internal_off') {
        return this.unlit_source.src;
        } else {
                for (i=0; i < this.image_names.length; i++) {
                        if (this.state==this.image_names[i]) {
                          return this.image_sources[i];
                        }
                }
        return this.unlit_source.src;
        }
}


//compound rollovers


function compound_update() {
        for (i=0; i<this.component_image.length; i++) {
                this.component_image[i].update();
        }
}

function compound_off() {
        for (i=0; i<this.component_image.length; i++) {
                this.component_image[i].state='off';
                this.component_image[i].update();
        }
}

function compound_on() {
        for (i=0; i<this.component_image.length; i++) {
                this.component_image[i].state='on';
                this.component_image[i].update();
        }
}

function compound_rollover_image(components) {
        this.component_image = new Array (components.length);

        for (i=0; i<components.length; i++) {
        this.component_image[i] = new rollover_image(components[i]);
        }
        this.update = compound_update;
        this.on = compound_on;
        this.off = compound_off;
}


