// Rollover Start
function init()
{
	MM_preloadImages('http://www.ibef.org/images/opt01r.gif','http://www.ibef.org/images/opt02r.gif','http://www.ibef.org/images/opt03r.gif','http://www.ibef.org/images/opt04r.gif','http://www.ibef.org/images/opt05r.gif','http://www.ibef.org/images/opt06r.gif','http://www.ibef.org/images/opt07r.gif','http://www.ibef.org/images/opt08r.gif','http://www.ibef.org/images/opt09r.gif','http://www.ibef.org/images/opt10r.gif');
}
window.onload = init;

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];}}
	//this function is declared in main.js file
	//initScroller();
}

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];}
}


//End Rollover



function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) 
{
window.print();
}
}
function Print(page)
{
window.open(page,'Print','top=150,left=200,width=600,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=yes')
}




function showDiv(abc)
     {
         var disp = document.getElementById(abc);
         var Design = document.getElementById("Design");                        
         var Research = document.getElementById("Research");
         var Science = document.getElementById("Science");
         var Training = document.getElementById("Training");
		 var Semiconductor = document.getElementById("Semiconductor");
                                 
                                  //alert(disp.id);
         if(disp.id=="Design")
            {
               Design.style.display="block";                                     
               Research.style.display="none";
               Science.style.display="none";
               Training .style.display="none";
			   Semiconductor.style.display="none";
            }
           else if(disp.id=="Research")
            {
               Design.style.display="none";                                     
               Research.style.display="block";
               Science.style.display="none";
               Training.style.display="none";
			   Semiconductor.style.display="none";
                                               
             }
             else if(disp.id=="Science")
               {
                   Design.style.display="none";                                     
                   Research.style.display="none";
                   Science.style.display="block";
                   Training.style.display="none";
				   Semiconductor.style.display="none";
                                                
               }
                 else if(disp.id=="Training")
                    {
                      Design.style.display="none";                                     
                      Research.style.display="none";
                      Science.style.display="none";
					  Semiconductor.style.display="none";
                      Training.style.display="block";
                                               
                    }
				else if(disp.id=="Semiconductor")
                    {
                      Design.style.display="none";                                     
                      Research.style.display="none";
                      Science.style.display="none";
                      Training.style.display="none";
					  Semiconductor.style.display="block";                                               
                    }
                                 
          }                              


function hideDiv(abc)
                         {
                                  var hide = document.getElementById(abc);
                                  var Design = document.getElementById("Design");                        
                                  var Research = document.getElementById("Research");
                                  var Science = document.getElementById("Science");
                                  var Training = document.getElementById("Training");
								  var Semiconductor = document.getElementById("Semiconductor");
								  
                                 
                                  //alert(hide.id);
                                  if(hide.id=="Design")
                                  {
                                                Design.style.display="none";                                     
                                                Research.style.display="none";
                                                Science.style.display="none";
                                                Training.style.display="none";
												Semiconductor.style.display="none";
                                  }
                                  else if(hide.id=="Research")
                                  {
                                                Design.style.display="none";                                     
                                                Research.style.display="none";
                                                Science.style.display="none";
                                                Training.style.display="none";
												Semiconductor.style.display="none";
                                               
                                  }
                                  else if(hide.id=="Science")
                                  {
                                                Design.style.display="none";                                     
                                                Research.style.display="none";
                                                Science.style.display="none";
                                                Training.style.display="none";
												Semiconductor.style.display="none";
                                                
                                  }
                                  else if(hide.id=="Training")
                                  {
                                                Design.style.display="none";                                     
                                                Research.style.display="none";
                                                Science.style.display="none";
                                                Training.style.display="none";
												Semiconductor.style.display="none";                                               
                                  }
								  else if(hide.id=="Semiconductor")
                                  {
                                                Design.style.display="none";                                     
                                                Research.style.display="none";
                                                Science.style.display="none";
                                                Training.style.display="none";
												Semiconductor.style.display="none";                                               
                                  }
                                 
                    } 
		



function spotlightimage(hh)
 {
  open(hh,'newWindow','titlebar=no, fullscreen=no, toolbar=no, scrollbars=no, status=no, resizable=no, top=10 left=10, width=590, height=310'); 
}

function FlagPin()
 {
 
  window.open('FlagPin.aspx','newWindow','titlebar=no,toolbar=no,scrollbars=yes,status=no,resizable=yes, width=400, height=350 top=50 left=50'); 
}

//subscribe
function Subscribe(page)
{
window.open(page,'Subscribe','top=100,left=100,width=400,height=300,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=yes')
}


function Print(page)
{
window.open(page,'Print','top=100,left=100,width=630,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=yes')
}

function Email(page)
{
window.open(page,'Email','top=0,left=0,width=300,height=250,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=no,top=150 left=150')
}

function Comment(page)
{
window.open(page,'Email','top=0,left=0,width=300,height=250,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=no, top=150 left=150')
}
function vote() 
{
    var previuosUrl;
    previuosUrl = window.location.href;
    open("http://www.ibef.org/rate.asp?previuosUrl=" + previuosUrl, "newWindow", "scrollbars= no toolbar=no,location=no,width=320, height=300 top=0 left=10");
}
  

function healthcarereport(page)
{
window.open(page,'healthcarereport','top=0,left=0,width=500,height=300,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=no')
}
  
  
function survey()
  {
   open("survey.aspx","newWindow","scrollbars=yes toolbar=no,location=no,width=600, height=400 top=0 left=10");
  }

function pop(src)
{
	var w = window.open("","_new", "resizable=0,top=10,left=10,toolbar=0,width=700,height=300");
	var d = w.document;
	d.open();
	d.write("<html><body marginwidth=0 marginheight=0 onload='window.opener.ol(window)' leftmargin=0 topmargin=0><img src='" + src + "' id='i1'></body></html>");
	d.close();
}
function ol(w) {
	var d=w.document;
	var iE = d.getElementById("i1");
	w.resizeTo(iE.width+20,iE.height+50);
}

function popup(src,txt)
{
	var ww = window.open("","_new", "resizable=1,top=10,left=10,toolbar=0,width=700,height=300");
	var dd = ww.document;
	dd.open();
	dd.write("<html><body marginwidth=0 marginheight=0 onload='window.opener.ol1(window)' leftmargin=0 topmargin=0><img src='" + src + "' id='i1'><font style='font-family: Arial;font-size:11px; color:#333333; font-weight:normal'>" + txt.replace("\n", "") + "</font></body></html>");
	dd.close();
}
function ol1(w) {
	var dd=w.document;
	var iEE = dd.getElementById("i1");
	w.resizeTo(iEE.width+20,iEE.height+80);
}
function pop1(hh)
 {
  open(hh,'newWindow','titlebar=no,toolbar=no,scrollbars=yes,status=no,resizable=no, top=10 left=10'); 
}
function display(divid)
{
var show = document.getElementById(divid);
show.style.display="block";
}
function disphide(divid)
{
var show = document.getElementById(divid);
show.style.display="none";
}

function poppop(hh)
 {
  open(hh,'newWindow','titlebar=no,toolbar=no,scrollbars=yes,status=no,resizable=no, top=10 left=10'); 
 }
 function popupImage(hh)
 {
  open(hh,'newWindow','titlebar=no,toolbar=no,scrollbars=yes,status=no,resizable=no, width=540, height=370, top=10, left=10');
}
function popupPosters(hh) {
    open(hh, 'newWindow', 'titlebar=no,toolbar=no,scrollbars=yes,status=no,resizable=no, width=470, height=550, top=10, left=10');
}
function popPosters(src)
{
	var w = window.open(src,"_new", "resizable=no,top=10,left=10,toolbar=0,width=700,height=700");
}
function poppop(page)
{
window.open(page,'Subscribe','top=1,left=5,width=760,height=520,fullscreen=no,resizable=no,toolbar=no,menubar=no,location=no,status=no,channelmode=no,directories=no,scrollbars=yes')
}


//*****************************************function for increasing or decreasing font on website*****************************************
global_var = 0;
function GetElementsByPrefix(inPrefix,inRoot)
{ 
	var elem_array = new Array; 
	if(typeof inRoot.firstChild!= 'undefined')
	{ 
		var elem = inRoot.firstChild; 
		while (elem!= null)
		{ 
			if(typeof elem.firstChild!= 'undefined')
			{ 
				elem_array = elem_array.concat(GetElementsByPrefix(inPrefix,elem)); 
			} 
			if(typeof elem.id!= 'undefined')
			{ 
				var reg = new RegExp ( '^'+inPrefix+'.*' ); 				
				if(elem.id.match(reg))
				{ 
				//alert(reg);
				elem_array.push(elem); 
				} 
			} 
		elem = elem.nextSibling; 
		} 
	} 
	return elem_array; 
} 

function DisplayPlusElements(in_elem_array)
{
if(in_elem_array.length)
	{ 
		var fs;
		for(var c=0; c<in_elem_array.length; c++)
		{ 
			if(document.getElementById(in_elem_array[c].id).className)
			{
			//alert(in_elem_array[c].id); 
			fs = document.getElementById(in_elem_array[c].id).className;
			//alert(fs);
			var sp = fs.split("_");
			document.getElementById(in_elem_array[c].id).style.fontSize = parseInt(sp[1])+2 + "px";
		     }
		} 
		
	} 
} 

function DisplayPlus2Elements(in_elem_array)
{
if(in_elem_array.length)
	{ 
		var fs;
		for(var c=0; c<in_elem_array.length; c++)
		{ 
			if(document.getElementById(in_elem_array[c].id).className)
			{
			//alert(in_elem_array[c].id); 
			fs = document.getElementById(in_elem_array[c].id).className;
			//alert(fs);
			var sp = fs.split("_");
			//alert(sp);
			document.getElementById(in_elem_array[c].id).style.fontSize = parseInt(sp[1])+4 + "px";
			//alert(parseInt(sp[1])+global_var+2 + "px");			
			}
		} 
		//global_var = global_var + 2;
		//alert("after plus value of global var is " + global_var);
	}
} 


function DisplayMinusElements(in_elem_array)
{ 
//alert("hello");		
if(global_var==0)
	{
		var abc=10;
		//alert("It's minimum size of font.\n Can't decrease now!!!!!!!!!");		
	}
	else
	{
	if(in_elem_array.length)
	{ 		
		var fs;
		for(var c=0; c<in_elem_array.length; c++)
		{ 
			if(document.getElementById(in_elem_array[c].id).className)
			{
			//alert(in_elem_array[c].id); 
			fs = document.getElementById(in_elem_array[c].id).className;
			//alert(fs);
			var sp = fs.split("_");
			var f_size = parseInt(sp[1])+global_var-2 + "px";
			//alert(f_size);
			document.getElementById(in_elem_array[c].id).style.fontSize = f_size;		
			//alert(f_size);	
			}
		} 
		global_var = global_var - 2;
		//alert("after minus value of global var is " + global_var);
	} 
	}
} 


function DisplayResetElements(in_elem_array)
{ 
//alert("hello");		
if(in_elem_array.length)
	{ 
		var fs;
		global_var = 0;
		for(var c=0; c<in_elem_array.length; c++)
		{ 
			if(document.getElementById(in_elem_array[c].id).className)
			{
			//alert(in_elem_array[c].id); 
			fs = document.getElementById(in_elem_array[c].id).className;
			//alert(fs);
			var sp = fs.split("_");
			var f_size = parseInt(sp[1]) + "px";
			//alert(f_size);
			document.getElementById(in_elem_array[c].id).style.fontSize = f_size;		
			//alert(document.getElementById(in_elem_array[c].id).className);	
			}
		} 		
		//alert("after minus value of global var is " + global_var);
	} 
} 

//*****************************************functionality for increasing or decreasing font ends here*************************************
