//<![CDATA[

  // --------------------------------------------------------------------------

  document.writeln('<script type="text/javascript" src="'+page.baseHref+'/js/swfobject.js"></script>');

  // --------------------------------------------------------------------------

  function printPage() {
    if (window.print) {
      window.print();
    } else {
      alert(page.noPrintMessage);
    }
  }

  // --------------------------------------------------------------------------

  function ZoomediaMenu() {

    // ------------------------------------------------------------------------

    this.ptr    = null;
    this.timer  = null;
    this.delay  = 1000;
    this.liList = new Array();

    // ------------------------------------------------------------------------

    this.init = function(id) {
      if (!document.getElementById) {
        return;
      }
      var element = document.getElementById(id);
      if (element) {
        this.build(element);
      }
    };

    // ------------------------------------------------------------------------

    this.setTimeOut = function(id) {
      this.timer = window.setTimeout("ZoomediaMenu.mouseOut('"+id+"');", this.delay);
    };

    // ------------------------------------------------------------------------

    this.mouseOver = function(id) {
      if (!document.getElementById(id)) {
        return;
      }

      for(var i=0; i < this.liList.length; i++) {
        if (this.liList[i] == id) {
          break;
        }
      }

      if (i == this.liList.length) {
        this.liList[i] = id;
      }

      if (this.timer != null && this.ptr != null) {
        var element = document.getElementById(this.ptr);
        element.firstChild.className = '';
        var ulList = element.getElementsByTagName('ul');
        for(var i=0; i < ulList.length; i++) {
          ulList.item(i).style.visibility = 'hidden';
        }
        window.clearTimeout(this.timer);
        this.timer = null;
        this.liList = new Array();
      }

      this.ptr = id;

      var element = document.getElementById(this.ptr);

      if (element.tagName.toLowerCase() == 'li') {
        element.firstChild.className = 'hover';
      }

      var element = element.getElementsByTagName('ul');

      if (element.length > 0) {
        element.item(0).style.visibility = 'visible';
      }
    };

    // ------------------------------------------------------------------------

    this.mouseOut = function(id) {
      var element = document.getElementById(id);

      if (!element) {
        return;
      }

      if (this.timer != null && this.ptr == id) {
        element.firstChild.className = '';

        var ulList = element.getElementsByTagName('ul');

        for(var i=0; i < ulList.length; i++) {
          ulList.item(i).style.visibility = 'hidden';
        }

        var liList = element.getElementsByTagName('li');

        for(var i=0; i < liList.length; i++) {
          liList.item(i).firstChild.className = '';
        }

        this.ptr = null;
        this.liList = new Array();

        return;
      }

      var className = '';
      for(var i=0; i < this.liList.length; i++) {
        if (this.liList[i] == id) {
          className = 'hover';
          break;
        }
      }

      element.firstChild.className = className;
    };

    // ------------------------------------------------------------------------

    this.build = function(element) {
      for(i=0; i < element.childNodes.length; ++i) {
        if (element.childNodes[i].nodeName.toLowerCase() != 'li') {
          continue;
        }

        for(var j=0; j < element.childNodes[i].childNodes.length; ++j) {
          if (element.childNodes[i].childNodes[j].nodeName.toLowerCase() == 'ul') {
            element.childNodes[i].onmouseover = function() {
              try {
                ZoomediaMenu.mouseOver(this.getAttribute('id'));
              } catch(err) {}
            };
            element.childNodes[i].onmouseout = function() {
              try {
                ZoomediaMenu.setTimeOut(this.getAttribute('id'));
              } catch(err) {}
            };
            //this.build(element.childNodes[i].childNodes[j]);
            //break;
          }
        }
      }
    };

    // ------------------------------------------------------------------------

  }//ZoomediaMenu

  var ZoomediaMenu = new ZoomediaMenu();



  //------------------- bibliography -------------------------
		function toggleitem(fset)
		{
			x = document.getElementById(fset);
			if (x.style.display == 'block') x.style.display = 'none';
			else x.style.display = 'block';
		}

// --------------------------------------------------------------------------

  var ZoomediaGlossaryItemFormat = '<div class="defclose">&nbsp;</div><div class="definition"><div class="term">%POPUP_TITLE%</div>%POPUP_CONTENT%</div>';


  function ZoomediaGlossary() {
    this.current = null;

    this.show = function(a, id, event) {
      if (this.current) {
        this.hide(this.current);
      }

      var tpl = ZoomediaGlossaryItemFormat;

      var div = document.createElement('div');
          div.setAttribute('id', 'div_'+id);
          div.onclick = function(){ZoomediaGlossary.hide('div_'+id);};
          div.className = 'gloss_def';
          div.style.position = 'absolute';
          div.style.display = 'block';
          div.style.zIndex = 2000;

          offset = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
          if (!offset) {
            offset = 0; // stupid ie5/mac
          }

          div.style.top = (offset + event.clientY)+'px';
          div.style.left = event.clientX+'px';


          div.innerHTML = tpl.replace('%GLOSSARY_ID%', id).replace('%POPUP_TITLE%', ZoomediaGlossaryItems[id].title).replace('%POPUP_CONTENT%', ZoomediaGlossaryItems[id].content);

      //insert div before anchor tag
      a.parentNode.insertBefore(div, a);

      this.current = 'div_'+id;

      //close removes the dynamically created div
      //div.parentNode.removeChild(div);
    };

    this.hide = function(eleId) {
      var div = document.getElementById(eleId);
      if (div) {
        div.parentNode.removeChild(div);
      }
    };

  }//ZoomediaGlossary

  // --------------------------------------------------------------------------

  var ZoomediaGlossary = new ZoomediaGlossary();

  // --------------------------------------------------------------------------


	function jumpMenu (targ, selObj, restore){
	  if (targ == "new") {
	  	eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");
	  	if (restore) selObj.selectedIndex=0;
	  } else {
	  	eval("window.location='"+selObj.options[selObj.selectedIndex].value+"'");
	  	if (restore) selObj.selectedIndex=0;
	  }
	}

	function toggle(show, hide) {

			var x;
			var y;

			if (hide != "") {
				hide = hide.split(",");
				for (x in hide) {
					if (hide[x] != show && hide[x] != "") {
						document.getElementById(hide[x]).style.display = "none";
					}
				}
			}

			if (show != "") {
				show = show.split(",");
				for (y in show) {
					if (show[y] != hide) {
						document.getElementById(show[y]).style.display = "block";
					}
				}
			}

	}

	function tabSet(tabs, front, width) {
		var tab;
		var name;
		var tabscontent;
		var counter = 1;
		var showContent;
		var hideContent;

		name = front.replace(" ", "_");
		tabs = tabs.split(",");

		tabscontent = '<div id="'+ name +'"><div class="tab_block" style="background: url(\'/img/tab_anchor_left.gif\') no-repeat 0 0; width: 16px; height: 32px;"></div>';
		for (tab in tabs) {
			if (tabs[tab] == front) {

				tabscontent += '<div class="tab_block" style="background: url(\'/img/tab_left.gif\') no-repeat 0 0; width: 16px; height: 32px;"></div><div class="tab_block" style="background: url(\'/img/tab_top.gif\') repeat-x 0 0;"><span class="on_tab">' + tabs[tab] + '</span></div><div class="tab_block" style="background: url(\'/img/tab_right.gif\') no-repeat 0 0; width: 16px; height: 32px;"></div>';

			} else {

				var divimg;
				if (counter == tabs.length || tabs[(counter-1) + 1] == front) {
					divimg = '';
				} else {
					divimg = 'background: url(\'/img/divider_footer.gif\') repeat-y right;';
				}

				tabs[tab] = tabs[tab].replace(/(\')/g,'`');
					for (y in tabs) {
						if (tabs[y] == tabs[tab]) {
							thistab = tabs[y].replace("`", "");
							thistab = tabs[y].replace("/", "");
							thistab = tabs[y].replace(" /", "");
							showContent = thistab.replace(" ", "") + '_content';
						}
					}
					var countx = 1;
					for (x in tabs) {
						if (tabs[x] != tabs[tab]) {
							thistab = tabs[x].replace("`", "");
							thistab = tabs[x].replace("/", "");
							thistab = tabs[x].replace(" /", "");
							hideContent += thistab.replace(" ", "") + '_content,';
						}
					countx = countx + 1;
					}

				hideContent = hideContent.replace("undefined", "");
				tabscontent += '<div class="tab_block" style="background: url(\'/img/tab_bottom.gif\') repeat-x 0 0;"><span class="off_tab" style="'+ divimg +'"><a class="tab_links" href="#" onclick="tabSet(\''+ tabs +'\', \'' + tabs[tab] + '\', \''+ width +'\'); toggle(\''+ showContent +'\',\''+ hideContent +'\'); return false;">' + tabs[tab] + '</a></span></div>';
			}
			counter = counter + 1;
		}

		tabscontent += '<div class="tab_block" style="background: url(\'/img/tab_bottom.gif\') repeat-x 0 0; width:'+ width +';"></div><div class="tab_block" style="background: url(\'/img/tab_anchor_right.gif\') no-repeat 0 0; width: 16px; height: 32px;"></div></div>';

		document.getElementById("tabs_Holder").innerHTML = tabscontent;

	}

// -------------------------------------------------------------------------

	function createRequestObject() {
		var ro;
		var browser = navigator.appName;
		if(browser == "Microsoft Internet Explorer"){
			ro = new ActiveXObject("Microsoft.XMLHTTP");
		}else{
			ro = new XMLHttpRequest();
		}
		return ro;
	}

	var http = createRequestObject();

	function sndReq(action) {
		if (action == '') {
			return;
		}
		http.open('get', '/'+action);
		http.onreadystatechange = handleResponse;
		http.send(null);
	}

	var response;
	function handleResponse() {
		if(http.readyState == 4){
			response = http.responseText;
			if(response) {
			   //return response;
			   //alert(response);
			   document.getElementById('clin_trial_results').innerHTML = response;
			}
		}
	}

// --------------------------------------------------------------------------

  function printPage() {
    if (window.print) {
      window.print();
    } else {
      alert(page.noPrintMessage);
    }
  }


// -------------------------------------------------------------------------

  function toggleVideo(show, hide, videoinfo) {
		
		var x;
		var y;
		var viddata = videoinfo.split("|");
		
		if (hide != "") {
			hide = hide.split(",");
			for (x in hide) {
				if (hide[x] != show) {
					document.getElementById(hide[x]).style.display = "none";
				}
			}
		}
		
		if (show != "") {
			show = show.split(",");
			for (y in show) {
				if (show[y] != hide) {
					document.getElementById(show[y]).style.display = "block";
					document.getElementById(show[y]).innerHTML = "";
					document.getElementById(show[y]).innerHTML = "<embed width=\"527\" height=\"280\" flashvars=\"div_container=" + show[y] + "\" allowscriptaccess=\"always\" wmode=\"transparent\" quality=\"high\" bgcolor=\"#000000\" src=\"/swf/flv_cti.swf?div_container=" + show[y] + "&divName=" + show[y] + "\" type=\"application/x-shockwave-flash\"/>";
				}
			}
		}
		
  }

  function close_div (divid) {
		document.getElementById(divid).innerHTML = "";
		document.getElementById(divid).style.display = "none";
  }



// -------------------------------------------------------------------------





//]]>
