// JavaScript Document

/* Old Script
function openEntities()
{
	if(document.getElementById('entities').value==0)
	{
		return false;
	}
	else if(document.getElementById('entities').value==2)
	{
		window.open('http://www.planbfirst.com/index.htm','_blank');
	}
	else if(document.getElementById('entities').value==5)
	{
		window.open('http://www.cumminsgeneratortechnologiesindia.com','_blank');
	}
	else if(document.getElementById('entities').value==13)
	{
		window.open('http://www.kpitcummins.com','_blank');
	}	
}
Old Script */

var selectmenu1=document.getElementById("entities");
selectmenu1.onchange=function(){ //run some code when "onchange" event fires
 var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
 /*
 if (chosenoption.value=="cil_home.html"){
	window.open(chosenoption.value, "_self", "") //open Automotive site in same window
 } else if (chosenoption.value=="ctil_home.html"){
	window.open(chosenoption.value, "_self", "") //open CIL site in same window
 } else
 */
 if (chosenoption.value!="nothing"){
  window.open(chosenoption.value, "_self", "") //open target site (based on option's value attr) in new window
 }
}

/*New Script
var selectmenu1=document.getElementById("mymenu1");
selectmenu1.onchange=function(){ //run some code when "onchange" event fires
 var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
 if (chosenoption.value!="nothing"){
  window.open(chosenoption.value, "", "") //open target site (based on option's value attr) in new window
 }
}
var selectmenu2=document.getElementById("mymenu2");
selectmenu2.onchange=function(){ //run some code when "onchange" event fires
 var chosenoption=this.options[this.selectedIndex] //this refers to "selectmenu"
 if (chosenoption.value!="nothing"){
  window.open(chosenoption.value, "", "") //open target site (based on option's value attr) in new window
 }
}

New Script */
