//FOR ALL POPUPS
function popUp(url,nWidth,nHeight,sResize, sMenu, sWindowName) {

   if (sWindowName == "") {
       sWindowName = "popupwin";
   }

   if (nWidth == "news") {
       nWidth=500;
       nHeight=600;
       sResize="yes";
       sMenu="no";

   } 

   if (nWidth == "press") {
       nWidth=580;
       nHeight=600;
       sResize="yes";
       sMenu="no";

   } else if (nWidth == "alternativewin") {
       nWidth=476;
       nHeight=362;
       sResize="yes";
       sMenu="no";

   } else if (nWidth == "videowin") {
       nWidth=420;
       nHeight=440;
       sResize="yes";
       sMenu="no";

   } else {
       if (nHeight == "") {
           nHeight=400;          }
       if (nWidth == "") {
           nWidth=553;          }
       if (sResize == "" || sResize == "no") {
           sResize = "no";          }
       if (sMenu == "" || sMenu == "no") {
           sMenu = "no";          }
   }              window.open(url,sWindowName,'toolbar='+sMenu+',location='+sMenu+',directories=no,status='+sMenu+',menubar='+sMenu+',scrollbars='+sResize+',resizable='+sResize+',copyhistory=no,width='+nWidth+',height='+nHeight);

}



function showDiv(sContentDivName,tr_ID) {
	document.getElementById(sContentDivName).style.display="block";
	document.getElementById(tr_ID).className="SN_on";
}

function hideDiv(sContentDivName,tr_ID) {
	document.getElementById(sContentDivName).style.display="none";
	document.getElementById(tr_ID).className="SN_off";
}



function ToggleDiv(sDiv,tr_ID){
//	alert(document.getElementById(sDiv).style.display);
//alert(document.getElementById(tr_ID).className);
	if (cur_lyr && cur_li) hideDiv(cur_lyr, cur_li);
	showDiv(sDiv,tr_ID);
	cur_lyr = sDiv;
	cur_li = tr_ID;
};

function ToggleDiv2(sDiv,tr_ID){
//	alert(document.getElementById(sDiv).style.display);
//alert(document.getElementById(tr_ID).className);
	if (cur_lyr2 && cur_li2) hideDiv(cur_lyr2, cur_li2);
	showDiv(sDiv,tr_ID);
	cur_lyr2 = sDiv;
	cur_li2 = tr_ID;
};




/*

//FOR "expansion/contraction" EFFECT OF BIO TEXT ON "CLINICAL PROOF" PAGE
function showHideExtended(elID,anchorEl) {
	var obj1 = document.getElementById('showHideExtendedDiv_'+elID);
	var obj2 = document.getElementById('showHideExtendedButtonOpen_'+elID);
	if (obj1) {
		if (obj1.style.display == 'inline') {
			// close
			obj1.style.display = 'none';
			obj2.style.display = 'inline';
			location.href = '#'+anchorEl;
		} else {
			// open
			obj1.style.display = 'inline';
			obj2.style.display = 'none';
		}
	}
}

function showHide(e1) {
	var obj1 = document.getElementById(e1);
	if (obj1) {
		if (obj1.style.display == 'block') {
			obj1.style.display = 'none';
		} else {
			obj1.style.display = 'block';
		}
	}
}



// FOR TOGGLING VISIBLITITY OF DIVS (USED ON SUPPORT HOME FOR PDF LANGUANGE DROPDOWN)
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "block";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.display = "none";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
*/

