// Archive List Function

function sel(UrlAdress){
UrlAdress=document.frm.arch[document.frm.arch.selectedIndex].value;
window.open(UrlAdress,"NewWindow");
}




// VMenu Function

var persistmenu="yes" //"yes" or "no" Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DD change
document.write('<style type="text/css">\n')
document.write('.VMenuSub{display: none;}\n')
document.write('</style>\n')
}

function SwitchMainMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("MainVMenu").getElementsByTagName("table"); 
		if(el.style.display != "block"){ 
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="VMenuSub") 
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="block"
}
}

function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}

if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate








<!--photo scroll animation-->
var counter=0;
	var counter1=0;
	var counter2=0;
	var TD;
	var R_array = new Array();
	R_array[4] = "300";
	R_array[3] = "240";
	R_array[2] = "180";
	R_array[1] = "120";
	R_array[0] = "60";
	//document.images['preview'].src =fimg;

	function Hover(ImgSrc) 
		{
			ImgStartResize(ImgSrc);
			document.images['preview'].src = ImgSrc;
			//document.images['preview'].width=0;
			document.images['preview'].height=0;
					}

	function ImgStartResize(ImgS)
		{
		var CallFn = "ImgDisplay()";
		TD = window.setInterval(CallFn,100);
		}
		
	function ImgDisplay()
		{
			//document.images['preview'].width=R_array[counter2] ;
			document.images['preview'].height=R_array[counter2] ;
			if (counter2 > 3)
				{
				window.clearInterval(TD)
				counter2=0
				}
			counter2++;
		}

	function Stop_mov(ImgSrc) 
		{
			window.clearInterval(TD)
			document.images['preview'].src = ImgSrc;
			//document.images['preview'].width=300;
			document.images['preview'].height=300;
			counter2=0
		}



/***********************************************
* DD Tab Menu
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "sc1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes

////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false")
if (document.getElementById){
highlighttab(aobject)
if (turntosingle==0){
if (previoustab!="")
document.getElementById(previoustab).style.display="none"
document.getElementById(cid).style.display="block"
previoustab=cid
}
}
}

function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collecttablinks()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}

function collecttablinks(){
var tabobj=document.getElementById("tablist")
tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
collecttablinks()
expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload
