/***********************************************
* dropdown CSS Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)

/////No further editting needed

var ie5=document.all
var ns6=document.getElementById&&!document.all


function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden){
if (ie5||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie5 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie5 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function showmenu(obj, e, dropmenuID){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
if (typeof dropmenuobj!="undefined") //hide previous menu
dropmenuobj.style.visibility="hidden"
clearhidemenu()
if (ie5||ns6){
obj.onmouseout=delayhidemenu
dropmenuobj=document.getElementById(dropmenuID)
if (hidemenu_onclick) dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
dropmenuobj.onmouseover=clearhidemenu
dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){ dynamichide(event)}
showhide(dropmenuobj.style, e, "visible", "hidden")
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}
return clickreturnvalue()
}

function clickreturnvalue(){
if ((ie5||ns6) && !enableanchorlink) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie5&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function delayhidemenu(){
delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

function spartan() {
    var allTheCode='';
    var theContent=document.getElementById("column1").innerHTML;
    var headContent=document.getElementsByTagName("head")[0].innerHTML;
    var theCrumbs='';//document.getElementById("breadcrumbs").innerHTML;
    var bodyClass=document.getElementsByTagName("body")[0].className;
    /*
    var badStyleSheets="<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"/FCWSite/Include/printFriendly.css\" title=\"printFriendly\"><link rel=\"stylesheet\" type=\"text/css\" media=\"print\" href=\"/FCWSite/Include/print.css\">";
    if (headContent.indexOf(badStyleSheets)!=-1) {
        headContent=headContent.substring(0,headContent.indexOf(badStyleSheets))+headContent.substring(headContent.indexOf(badStyleSheets)+badStyleSheets.length);
    }
    */
    headContent=headContent.substring(0,headContent.indexOf('general.css'))+"printable.css"+headContent.substring(headContent.indexOf('general.css')+11);
    
    allTheCode+="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
    allTheCode+="<html xmlns=\"http://www.w3.org/1999/xhtml\">";
    allTheCode+="<head>"+headContent+"</head>";
    allTheCode+="<body class=\""+bodyClass+"\" onload=\"javascript:document.close();\"><form name=\"Form1\" id=\"Form1\"><div class=\"container\"><div class=\"content\"><table class=\"twocol\"><tr><td>";
    
    allTheCode+="<img src=\"/FCWSite/Img/logo_us_bw_webprintbio.jpg\" style=\"display:block;margin-left:12px;\">";
    allTheCode+=theCrumbs+"<br \>";
    allTheCode+="<div class=\"column1\" id=\"column1\">"+theContent+"</div>";
    allTheCode+="</td></tr></table></div></div></form>";
    //allTheCode+="<script language=\"javascript\">document.close();</script>";
    allTheCode+="</body></html>";
    
    var newWin=window.open("","","width=900,height=700,resizable=yes,menubar=yes,status=1,scrollbars=1");
    newWin.document.write(allTheCode);
    newWin.document.close();
}
