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_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_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];}
}


// -------- LAUNCHES INFINITE IN AS MANY FLAVORS AS YOU WANT --------

IE5=NN6=false
if(document.all)IE5=true
else if(document.getElementById)NN6=true

var prodTabIDs = new Array(2);
prodTabIDs[0] = "1169699371977";  	// specifications tabs
prodTabIDs[1] = "1169699372055";  	// product documentation tabs
// prodTabIDs[2] = "1114279567496";  	// application tips tabs
// prodTabIDs[3] = "1114279567697";  	// related links tabs

// no home page tabs on CPP site so commenting this and where homeTabIDs are called  ragentile 1.31.07
// var homeTabIDs = new Array(4);
// homeTabIDs[0] = "1114279829370";	// what's new tabs
// homeTabIDs[1] = "1114279829443";	// best sellers tabs	
// homeTabIDs[2] = "1114279829615";	// literature selector tabs
// homeTabIDs[3] = "1114279829747";	// promotions tabs

function showDiv2(what,which,numdivs) 
{//	PATHS FOR ON AND OFF IMAGES
	var imagePathPrefix = "/3MContentRetrievalAPI/BlobServlet?locale=en_WW&univid=";
	var imagePathPostfix = "&fallback=true&assetType=MMM_Image&blobAttribute=ImageFile&version=current";
	var imagePathPostfixOn = "&fallback=true&assetType=MMM_Image&blobAttribute=ThumbnailImage&version=current";
	var fullImage = document.getElementById("tab"+which);

//	TURN OF ALL LAYERS AND/OR TABS
	for(i=0;i<numdivs;i++) {
		if(IE5) eval("document.all."+what+i+".style.display='none'")
		if(NN6) eval("document.getElementById('"+what+i+"').style.display='none'")
		if (what == "table") {//	PRODUCT FAMILY PAGES
			var current = document.getElementById("tab"+i);
			current.className='';
			fullImage = document.getElementById("tab"+i);
			/*fullImage.src = imagePathPrefix + prodTabIDs[i] + imagePathPostfix;*/
		}
// no home page tabs on CPP site so commenting this and where homeTabIDs are called  ragentile 1.31.07		
//		if (what == "home") {//	HOME PAGE
//			fullImage = document.getElementById("tab"+i);
//			fullImage.src = imagePathPrefix + homeTabIDs[i] + imagePathPostfix;
//		}
	}
//	GO BACK THROUGH AND TURN ON THE DESIRED LAYER AND/OR TABS
	if(IE5) eval("document.all."+what+which+".style.display='block'")
	if(NN6) eval("document.getElementById('"+what+which+"').style.display='inline'")

	if (what == "table") {//	PRODUCT FAMILY PAGES
		var current = document.getElementById("tab"+which);
		current.className='current';
		fullImage = document.getElementById("tab"+which);
		/*fullImage.src = imagePathPrefix + prodTabIDs[which] + imagePathPostfixOn;*/
		}
	}
// no home page tabs on CPP site so commenting this and where homeTabIDs are called  ragentile 1.31.07	
//	if (what == "home") {//	HOME PAGE
//		fullImage = document.getElementById("tab"+which);
//		fullImage.src = imagePathPrefix + homeTabIDs[which] + imagePathPostfixOn;
//	}
//}



// this function will open a remote window/tab
var WindowObjectReference = null; // global variable
function openRequestedPopup(strUrl, strWindowName)
{
  if(WindowObjectReference == null || WindowObjectReference.closed)
  {
		// the line below will open strUrl in a new browser window
    	WindowObjectReference = window.open(strUrl, strWindowName,"resizable=yes,scrollbars=auto,status=yes,toolbar=no,width=655,height=535");   

		// the line below will open open strUrl in a new tab.  Note in IE 7, this will
		// open in a new tab if Tabbed Browser setting is set to "Let IE decide" or "Always open in new tab"
		// if the user is using a non-tab capable browser then strUrl will open in a new browser window

		//WindowObjectReference = window.open(strUrl, strWindowName);
  }
  else
  {
    WindowObjectReference.focus();
  };
}


