if (document.images) {

		faculty_off = new Image();
		faculty_off.src = "web/images/main/c1182_m_faculty_off.gif";
		faculty_on = new Image();
		faculty_on.src = "web/images/main/c1182_m_faculty_on.gif";
		
		help_off = new Image();
		help_off.src = "web/images/main/c1182_m_help_off.gif";
		help_on = new Image();
		help_on.src = "web/images/main/c1182_m_help_on.gif";
		
		home_off = new Image();
		home_off.src = "web/images/main/c1182_m_home_off.gif";
		home_on = new Image();
		home_on.src = "web/images/main/c1182_m_home_on.gif";
		
		outline_off = new Image();
		outline_off.src = "web/images/main/c1182_m_outline_off.gif";
		outline_on = new Image();
		outline_on.src = "web/images/main/c1182_m_outline_on.gif";
		
	}
	
	var popUpBottomFr;
	
var n;
var e;
var pc;
var mac;

	
if (document.layers) {n=1;e=0}
if (document.all) {n=0;e=1}
if (navigator.userAgent.indexOf("Mac") != -1) {
	pc=0;
	mac=1;
} else {
	pc=1;
	mac=0;
}	
	
	
// BEGIN VIDEO VARIABLES
var spacerW = 157;
var vidSource = '';
var rate = '';
var vidName = '';
var vidCapName ='';
var vidCrName = '';
var vidWinW = null;
var vidWinH = null;
var realPlayWinW = null;
var realPlayWinH = null;
var positionFieldW = null;
var elgWinH;
var elgWinW;
// END VIDEO VARIABLES

// BEGIN ENLARGE VARIABLES
var imgEnlarge;
var imgEnlargeW;
var imgEnlargeH;
var enlargeCaption;
var enlargeCredit;
// END ENLARGE VARIABLES

// BEGIN GLOSSARY VARIABLES
var trans2;
var firstT = 1;
var anc = "hi";
// END GLOSSARY VARIABLES

//PLAY VIDEO FUNCTION
function playvideo(viSource,vcpName,vName,vcName) {
	vidSource = "../video/" + viSource;
	vidCapName = vcpName;
	if (vidCapName == null) vidCapName = "";
		if (document.cookie.indexOf('c1182video') != -1 || document.cookie == -1) {
			if (document.cookie.indexOf('c1182video=hi') != -1) {
				spacerH1 = 7;
				spacerH2 = 10;
				vidWinW = 360;
				vidWinH = 410; 
				realPlayWinW = 320;
				realPlayWinH = 240; 
				positionFieldW = 260; 
				rate = "_fast.rpm"; 
				} else {
				spacerH1 = 80;
				spacerH2 = 51;
				vidWinW = 360;
				vidWinH = 410; 
				realPlayWinW = 160;
				realPlayWinH = 120; 
				positionFieldW = 100; 
				rate = "_slow.rpm"; 
			}
			openVWin("../main/c1182_videoshell.html",vidWinW,vidWinH);
		} else {
			openVPWin("videoPref");  
		}
 	}	


//END PLAYVIDEO FUNCTION

//OPEN VIDEO WINDOW
function openVWin(url,w,h) { 
	topWin = (screen.availHeight - h) / 2;
	leftWin = (screen.availWidth - w) / 2;
	props="status=no,width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",resizable=no";
	var myVideo = window.open(url,"vidWin",props);
	myVideo.focus();
}
//END OPEN VIDEO WINDOW

// VIDEO PREFERENCE WINDOW
function openVPWin(vPrefname) { 
	topWin = (screen.availHeight - 350) / 2;
	leftWin = (screen.availWidth - 400) / 2;
	props="status=yes,width=400,height=320,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",resizable=no";
	myVPref = window.open("../main/c1182_vidpref.html",vPrefname,props);
	myVPref.focus();
}

// TRANSCRIPT WINDOW


function opentrans(url,winname) {
	topWin = (screen.availHeight - 440) / 2;
	leftWin = (screen.availWidth - 500) / 2;
	props="scrollbars=yes,status=yes,width=440,height=500,top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",resizable=yes";
	var myTrans = window.open(url,winname,props);
	myTrans.focus();
}
	
	
	
function chgimg(imgField,newImg) {
	
	if(document.images) {
		document[imgField].src = eval(newImg + ".src");
		
	}
}


function launchwin(url,w,h) {
				topWin = (screen.availHeight - h) / 2;
				leftWin = (screen.availWidth - w) / 2;
				props = "resizable=yes,width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
				var win = window.open(url,'ColumbiaInteractive',props);
				win.focus();
			}
			
function launchscrollwin(url,w,h) {
				topWin = (screen.availHeight - h) / 2;
				leftWin = (screen.availWidth - w) / 2;
				props = "scrollbars=yes,resizable=yes,width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
				var win = window.open(url,'ColumbiaInteractive',props);
				win.focus();
			}

function gohere(bottomLoc) {
	popUpBottomFr = bottomLoc;
	framePage = '../main/c1182_go_fr.html';
	var frmWnd = window.open(framePage, '_blank', "statusbar,status,menubar,titlebar,toolbar,location,width=760,height=400,resizable=yes,scrollbars=yes");
	frmWnd.focus();
}

//FUNCTION TO OPEN PDF WINDOW

	function launchpdf(pSource) {
	
	pdfSource = pSource;
		
	var pdfWin = window.open('../main/c1182_pdf_fset.html','_blank');

	}


// ENLARGE WINDOW
function launchenlarge(imgurl,imgwidth,imgheight,eCaption,eCredit) {
	imgEnlarge = imgurl;
	imgEnlargeW = imgwidth;
	imgEnlargeH = imgheight;
	enlargeCaption = eCaption;
	enlargeCredit = eCredit;
	
	if (imgEnlargeW < imgEnlargeH) {
		extraSpace = 25;
	} else {
		extraSpace = 0;
	}
	
	
	elgWinW = (imgwidth + 40);
	elgWinH = (imgheight + 100 + extraSpace);
	topWin = (screen.availHeight - elgWinW) / 2;
	leftWin = (screen.availWidth - elgWinH) / 2;
	//05.17.02 removes height limit
	/*if (elgWinH > 480) {
		elgWinH = 480;
	}*/
	
	props="scrollbars,status=no,width="+elgWinW+",height="+elgWinH;
	openewin("../main/c1182_m_enlarge.html",'Enlarged',props);
}

//OPEN FLASH WINDOW
function openewin(url,w,h) {
	topWin = (screen.availHeight - h) / 2;
	leftWin = (screen.availWidth - w) / 2;
	props="status=no,width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin+",resizable=no";
	var myEng = window.open(url,"engWin",props);
	myEng.focus();
}
//END OPEN FLASH WINDOW


function openciwin() {
topWin = (screen.availHeight - 580) / 2;
leftWin = (screen.availWidth - 780) / 2;
props = "location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,width="+780+",height="+480+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
var win = window.open('http://ci.columbia.edu/ci/','theName',props);
win.focus();
}

function openbook(url) {
	topWin = (screen.availHeight - 500) / 2;
	leftWin = (screen.availWidth - 600) / 2;
	props = "location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,width="+600+",height="+500+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
	var win = window.open(url,'Readings',props);
	win.focus();
}
			
			
function launchglossarywin(url,w,h,theanchor) {
				anc = theanchor;
				trans2 = 0;
				firstT = 1;
				topWin = (screen.availHeight - h) / 2;
				leftWin = (screen.availWidth - w) / 2;
				props = "resizable=yes,width="+w+",height="+h+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
				var win = window.open(url,'ColumbiaInteractive',props);
				win.focus();

}

function launchclad() {
				topWin = (screen.availHeight - 500) / 2;
				leftWin = (screen.availWidth - 700) / 2;
				props = "scrollbars=no,resizable=no,width="+700+",height="+500+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
				var win = window.open('../main/c1182_m_clad.html','MasterCladogram',props);
				win.focus();
			}

//OPENS WINDOW FOR CREDITS PAGE		
function opendkvwin(url) {
topWin = (screen.availHeight - 480) / 2;
leftWin = (screen.availWidth - 800) / 2;
props = "location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,width="+leftWin+",height="+topWin+",top="+topWin+",screenY="+topWin+",left="+leftWin+",screenX="+leftWin;
var win = window.open(url,'theName',props);
win.focus();
}

			
		
	