/*
 *
 * Document Root defined
 * Usage:
 *  - 
 * 
 */
var documentroot = 'DR';






/*
 *
 * Roll Over Graphics for Home Page
 * Usage:
 *  - 
 * 
 */

var homeText_off = new Image();
homeText_off.src = 'graphics/home_notext.jpg';



var homeText_about_on = new Image();
homeText_about_on.src = 'graphics/home_text_about.jpg';

function swapHomeText_about(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_about_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}

	
var homeText_readingrooms_on = new Image();
homeText_readingrooms_on.src = 'graphics/home_text_readingroom.jpg';

function swapHomeText_readingrooms(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_readingrooms_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	

var homeText_research_on = new Image();
homeText_research_on.src = 'graphics/home_text_research.jpg';

function swapHomeText_research(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_research_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
var homeText_reporter_on = new Image();
homeText_reporter_on.src = 'graphics/home_text_reporter.jpg';

function swapHomeText_reporter(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_reporter_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
var homeText_glossary_on = new Image();
homeText_glossary_on.src = 'graphics/home_text_glossary.jpg';

function swapHomeText_glossary(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_glossary_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	

var homeText_resources_on = new Image();
homeText_resources_on.src = 'graphics/home_text_resources.jpg';

function swapHomeText_resources(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_resources_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}

var homeText_extension_on = new Image();
homeText_extension_on.src = 'graphics/home_text_extension.jpg';

function swapHomeText_extension(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_extension_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}

var homeText_bibliography_on = new Image();
homeText_bibliography_on.src = 'graphics/home_text_bibliography.jpg';

function swapHomeText_bibliography(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_bibliography_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
	
var homeText_farmbills_on = new Image();
homeText_farmbills_on.src = 'graphics/home_text_farmbills.jpg';

function swapHomeText_farmbills(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_farmbills_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
var homeText_reference_on = new Image();
homeText_reference_on.src = 'graphics/home_text_reference.jpg';

function swapHomeText_reference(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_reference_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
var homeText_graduate_on = new Image();
homeText_graduate_on.src = 'graphics/home_text_graduate.jpg';

function swapHomeText_graduate(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_graduate_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	

var homeText_community_on = new Image();
//homeText_community_on.src = 'graphics/home_text_community.jpg';
homeText_community_on.src = 'graphics/home_text_clearinghouse.jpg';

function swapHomeText_community(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_community_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}
	
	
var homeText_contact_on = new Image();
homeText_contact_on.src = 'graphics/home_text_contact.jpg';

function swapHomeText_contact(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_contact_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}


var homeText_crs_on = new Image();
homeText_crs_on.src = 'graphics/home_text_crs.jpg';

function swapHomeText_crs(onOff){
		if (onOff == 'on'){
			document.homeText.src = homeText_crs_on.src;
		}else{
			document.homeText.src = homeText_off.src;
		}
	}

	
	
	
/*
 *
 * Disclaimer Pop-Up Launcher
 * Requires:
 *   - N/A
 * Usage:
 *   - onClick="disclaimerPopUp ();"
 *
 */
function disclaimerPopUp ()
	{
	window.open( DR + '_disclaimer.phtml', 'disclaimer', 'toolbar=1,status=0,scrollbars=1,resizable=1,height=410,width=600');
	}
	
	
/*
 *
 * Privacy Policy Pop-Up Launcher
 * Requires:
 *   - N/A
 * Usage:
 *   - onClick="privacypolicyPopUp ();"
 *
 */
function privacypolicyPopUp ()
	{
	window.open( DR + '_privacypolicy.phtml', 'privacypolicy', 'toolbar=1,status=0,scrollbars=1,resizable=1,height=410,width=600');
	}

	
/*
 *
 * Glossary Pop-Up Launcher
 * Requires:
 *   - N/A
 * Usage:
 *   - <a href="javascript:launchGlossary ('term name');"> Term Name</a>
 *
 */
function launchGlossary (searchTerm)
	{
	if (searchTerm)
		{
		searchTerm = '?term=' + searchTerm;
		}
	else
		{
		searchTerm = '';
		}
	var openerArgs = 'toolbar=0,status=0,resizable=1,height=402,width=504';
	window.open( DR + 'glossary/index.phtml' + searchTerm,'glossary',openerArgs);
	}



/*
 *
 * Glossary Pop-Up Launcher
 * Requires:
 *   - N/A
 * Usage:
 *   - <a href="javascript:launchGlossary ('term name');"> Term Name</a>
 *
 */
function launchAssetsGlossary (searchTerm)
	{
	if (searchTerm)
		{
		searchTerm = '?term=' + searchTerm;
		}
	else
		{
		searchTerm = '';
		}
	var openerArgs = 'toolbar=0,status=0,resizable=0,height=402,width=504';
	window.open('../../glossary/index.phtml' + searchTerm,'glossary',openerArgs);
	}
	
	
	

function openPhoto(p,w,h)
	{
	var window_width = String(Number(w) + 20);
	var window_height = String(Number(h) + 20);
	var window_scroll = "no";
	
	if(screen.width)
		{
		if((Number(w) + 20) > screen.width)
			{
			window_width = String(Number(screen.width) - 80);
			window_scroll = "yes";
			}
		if((Number(h) + 20) > screen.height)
			{
			window_height = String(Number(screen.height) - 80);
			window_scroll = "yes";
			}
		}
	else
		{
		if(w > 560)
			{
			window_height = "560";
			window_scroll = "yes";
			}
		if(h > 400)
			{
			window_height = "400";
			window_scroll = "yes";
			}
		}
	var open_specs = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=" + window_scroll + ",resizable=no,copyhistory=no,height=" + window_height + ",width=" + window_width + ",top=10,left=10";
	window.open(p,'one',open_specs);
	}

	
	



