//NEW WEB JAVASCRIPT Functions

function OpenItem(page, view, type, id) {
	//location="default.asp?view="+view+"&type="+type+"&item="+id+"#"+id
	location=page+view+"&type="+type+"&item="+id+"#"+id
	//var url;
	//url = "news_pop.asp?item="+id
	//window.open(url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=550,height=600,left=30,top=0")
}


function OpenItemPrint(page, id) {
	var url;
	url = "generic_print_pop.asp?item="+id+"&printer=YES&page_type="+page
	window.open(url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=600,left=30,top=0")
}


function Opensearch(page, query) {
	
	
	if (query==null||query=="")
	{
	location=page+"searchbar=yes";
	}
	else
	{
		if( page.indexOf('searchbar=no') != -1)
		{
		var page_new
		page_new = page.replace("searchbar=no", "searchbar=yes");
		location=page_new;
		}
		else
		{
		page_new = page.replace("&searchbar=yes", "");
		location=page_new+"&searchbar=yes";
		}
	}
}


function Closesearch(page) {
	
	if( page.indexOf('searchbar=yes') != -1)
	{
	var page_new
	page_new = page.replace("searchbar=yes", "searchbar=no");
	location=page_new;
	}
	else
	{
	location=page+"&searchbar=no"
	
	}
}


function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'none')
	{
      document.getElementById(divid).style.display = 'block';
    }
	else if (document.getElementById(divid).style.display == 'block')
	{
      document.getElementById(divid).style.display = 'none';
    }
	else
	{
      document.getElementById(divid).style.display = 'block';
    }
//javascript:toggleDiv('search_drop')
  }
  

function openDisclaimers() {
	var url;
	url = "disclaimers.asp"
	window.open(url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=450,height=450,left=100,top=120")
                }
				
function openAccess() {
	var url;
	url = "access.asp"
	window.open(url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=550,height=450,left=100,top=120")
                }
				
function openSitemap() {
	var url;
	url = "sitemap.asp"
	window.open(url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=840,height=670,left=50,top=50")
                }
				
function roll_over(img_id, img_2)
 {
   document.getElementById(img_id).src = img_2;
}

