//FOR ALL POPUPS
function popUp(url,nWidth,nHeight,sResize, sMenu, sWindowName) {

   if (sWindowName == "") {
       sWindowName = "popupwin";
   }

  	if (nWidth == "SD") { //standard definition ratio - 320x240
       nWidth=500;
       nHeight=320;
       sResize="yes";
       sMenu="no";
	   sWindowName ="spotwin_sd"
   } 

   else if (nWidth == "HD1") { // pop dimensions for movies at 640x432
       nWidth=668;
       nHeight=512;
       sResize="yes";
       sMenu="no";
	   sWindowName ="spotwin_hd1"
	}

   else if (nWidth == "HD2") { // pop dimensions for movies at 640x480
       nWidth=668;
       nHeight=560;
       sResize="yes";
       sMenu="no";
	   sWindowName ="spotwin_hd2"

   } 

   else if (nWidth == "HD3") { // pop dimensions for movies at 720x486
       nWidth=744;
       nHeight=566;
       sResize="yes";
       sMenu="no";
	   sWindowName ="spotwin_hd3"

   } 

   else if (nWidth == "HD4") { // pop dimensions for movies at 864x486
       nWidth=888;
       nHeight=566;
       sResize="yes";
       sMenu="no";
	   sWindowName ="spotwin_hd4"

   } 
   
   else { //just for a random popup
       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);

}



//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, li_ID) {
  if (cur_lyr) hideLayer(cur_lyr, cur_li);
  showLayer(id, li_ID);
  cur_lyr = id;
  cur_li = li_ID;
}

function showLayer(id, li_ID) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) {
  	lyr.css.display = "block";
	document.getElementById(li_ID).className="SN_on";
  	}
}

function hideLayer(id, li_ID) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) {
 	 lyr.css.display = "none";
	 document.getElementById(li_ID).className="SN_off";
  }

}

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;
}
*/




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 checkCheckBox(f) {
  if (f.agree.checked == false) {
    alert('Please check the box to continue.');
    return false;
  } else
    return true;
}





var checkobj

function agreesubmit(el){
checkobj=el
if (document.all||document.getElementById){
for (i=0;i<checkobj.form.length;i++){  //hunt down submit button
var tempobj=checkobj.form.elements[i]
if(tempobj.type.toLowerCase()=="submit")
tempobj.disabled=!checkobj.checked
}
}
}

function defaultagree(el){
if (!document.all&&!document.getElementById){
if (window.checkobj&&checkobj.checked)
return true
else{
alert("Please read/accept terms to submit form")
return false
}
}
}










