<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

// side navigation //
function toggle(id)
{
	el = document.getElementById(id);
	var display = el.style.display ? '' : 'none';
	el.style.display = display;
}
// login redirect //

function redirectLogin (){
	var loginValue=document.login.value;
	alert (loginValue);
	/*if (document.login.value=="member")
	{
	alert (member);
	else
	alert (provider);
	}*/
}
// text size change //
/*JavaScript - http://www.damtp.cam.ac.uk/user/bioguest/css/font.html
http://www.damtp.cam.ac.uk/user/bioguest/css/font.html
http://www.damtp.cam.ac.uk/user/bioguest/css/styleswitcher_side.js*/

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}
function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}
function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}
window.onload = function(e) {
  var cookie = readCookie("styleside");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}
window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("styleside", title, 365);
}
var cookie = readCookie("styleside");
var title = cookie ? cookie : getPreferredStyleSheet();
setActiveStyleSheet(title);

function mailsome1(){
who=prompt("Enter recipient's email address: ","none");
what=window.location;
if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true){
parent.location.href='mailto:'+who+'?subject='+what+'';
   }
}



/* MEMBER HTML 3D BUTTON (added by RBiran 12-16-07) */

function m_html_button(displayText,targetURL)
{
    document.write("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>");
    document.write("<TR>");
    document.write("<TD ROWSPAN=5><IMG SRC=\"../images/m_button_left_end.gif\" BORDER=0 WIDTH=8 HEIGHT=23 ALT=\"\"></TD>");
    document.write("<TD BGCOLOR=\"#A76512\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("<TD ROWSPAN=5><IMG SRC=\"../images/m_button_right_end.gif\" BORDER=0 WIDTH=8 HEIGHT=23 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#D3B288\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD HEIGHT=19 BACKGROUND=\"../images/m_button_bg.gif\"><A CLASS=\"m_html_button\" HREF=\"" + targetURL + "\">" + displayText + "</A></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#D3B288\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#A76512\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("</TABLE>");
}



/* PROVIDER HTML 3D BUTTON (added by RBiran 12-16-07) */

function pr_html_button(displayText,targetURL)
{
    document.write("<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>");
    document.write("<TR>");
    document.write("<TD ROWSPAN=5><IMG SRC=\"../images/pr_button_left_end.gif\" BORDER=0 WIDTH=8 HEIGHT=23 ALT=\"\"></TD>");
    document.write("<TD BGCOLOR=\"#BA512B\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("<TD ROWSPAN=5><IMG SRC=\"../images/pr_button_right_end.gif\" BORDER=0 WIDTH=8 HEIGHT=23 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#DDA895\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD HEIGHT=19 BACKGROUND=\"../images/pr_button_bg.gif\"><A CLASS=\"pr_html_button\" HREF=\"" + targetURL + "\">" + displayText + "</A></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#DDA895\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("<TR>");
    document.write("<TD BGCOLOR=\"#BA512B\"><IMG SRC=\"spacer.gif\" BORDER=0 WIDTH=1 HEIGHT=1 ALT=\"\"></TD>");
    document.write("</TR>");
    document.write("</TABLE>");
}
