// for cancertype dropdown
function jmp(form, elt)
   // The first parameter is a reference to the form.
   {
      if (form != null) { // if valid form
         with (form.elements[elt]) {
            if (0 <= selectedIndex) // if valid selection
               location = options[selectedIndex].value; // jump to that option's value
         }
      }
   } 
// for Tools box top right
window.onload=montre;
function montre(id) {
var d = document.getElementById(id);
if (document.getElementById('smenu1')) {document.getElementById('smenu1').style.display='none';}
if (d) {d.style.display='block';}
}
// for pop-up window
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'toolbar=yes,width=800,height=600,status=yes,scrollbars=yes,resizable=yes,location=yes,screenX=50,screenY=50');
return false;
}
// for larger pop-up window
function popup2(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'toolbar=yes,width=950,height=650,status=yes,scrollbars=yes,resizable=yes,location=yes,screenX=50,screenY=50');
return false;
}
// for image switch on mouseover
function roll_over(img_name, img_src)
{
document[img_name].src = img_src;
}
// for Clnician Contact Information
$(function(){
	$('<style media="screen, projection"> .content .contactinfo {display: none} ul.medist a.contactlink {border-bottom: 1px solid #999; font-weight: normal; } .content p a.contactlink {display: inline;} </style>').appendTo('head'); 
});

$(function(){
	$('a#contactlink-ct').click(function(c){
		c.preventDefault();		
		c.stopPropagation();
		$('#contactinfo-ct').toggle(750);
	});
	$('a#contactlink-phone').click(function(c){
		c.preventDefault();	
		c.stopPropagation();
		$('#contactinfo-phone').toggle(750);
	});
	$('a#contactlink-fax').click(function(c){
		c.preventDefault();	
		c.stopPropagation();
		$('#contactinfo-fax').toggle(750);
	});
	$('a#contactlink-addr').click(function(c){
		c.preventDefault();	
		c.stopPropagation();
		$('#contactinfo-addr').toggle(750);
	});
	$('a#contactlink-prof').click(function(c){
		c.preventDefault();	
		c.stopPropagation();
		$('#contactinfo-prof').toggle(750);
		$('#profile-excerpt').toggle(0);
	});
});
/*Search box focus*/
$(document).ready(function(){
	var searchBoxtext = $(".text");
	var searchBox = $("#searchbox");
	var searchBoxDefault = "Search...";
	searchBoxtext.focus(function(e){
		$(this).addClass("active");
	});
	searchBoxtext.blur(function(e){
		$(this).removeClass("active");
	});
	searchBox.focus(function(){
		if($(this).attr("value") == searchBoxDefault) $(this).attr("value", "");
	});
	searchBox.blur(function(){
		if($(this).attr("value") == "") $(this).attr("value", searchBoxDefault);
	});
});
/*Every second table row striped*/
$(function() {
	$("table.basic tr:nth-child(odd)").addClass("darkerrow");
});


