// JavaScript Document

/*
function MM_showHideLayers(x,y) { 
	var aLayer = document.getElementById(x).style;
    aLayer.display="none";
	var bLayer = document.getElementById(y).style;
	bLayer.display="block";
}*/


function showHideTabXML(id,intlink,count,headlines,xmlFile,more) {
	
	var i = 1;

	while (i <= count) {
	
		if (id == i) {
			document.getElementById(intlink+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublinkover_bg.gif)";
			document.getElementById(intlink+i+"_d").style.display="block";
		}
		
		else {
			document.getElementById(intlink+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublink_bg.gif)";
			document.getElementById(intlink+i+"_d").style.display="none";
		}
		
		i++;
		
		}
			
			loadRSS(id,intlink,headlines,xmlFile,more);
			

}


function showHideTabSax(id,intlink,count) {
	var i = 1;

	while (i <= count) {
	
		if (id == i) {
			document.getElementById(intlink+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublinkover_bg.gif)";
			document.getElementById(intlink+i+"_d").style.display="block";
		}
		
		else {
			document.getElementById(intlink+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublink_bg.gif)";
			document.getElementById(intlink+i+"_d").style.display="none";
		}
		
		i++;
		
		}

}

function showHideIntLink(x,y) {
	var i = 1;

	while (i < 10) {
	
		if (x == i) {
			document.getElementById(y+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublinkover_bg.gif)";
			document.getElementById(y+i+"_d").style.display="block";
		}
		
		else {
			document.getElementById(y+i).style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublink_bg.gif)";
			document.getElementById(y+i+"_d").style.display="none";
		}
		
		i++;
		
		}

}


function hideCommLink(count) {
	
			document.getElementById("communitiestab").style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublinkover_bg.gif)";
			document.getElementById("communities").style.display="block";
			document.getElementById("yourcommunity").style.display="none";
			
			var i = 1;

			while (i <= count) {
			document.getElementById("yourcommunity"+i+"_d").style.display="none";
			i++;
			}
			
			
			
}

function showCommLink(id,community,intlink,headlines,xmlFile,more) {
	
			document.getElementById("communitiestab").style.backgroundImage="url(http://www.delawareonline.com/graphics/beta/sublink_bg.gif)";
			document.getElementById("yourcommunity"+id+"_d").style.display="block";
			document.getElementById("yourcommunity").style.display="block";
			document.getElementById("yourcommunity_name").innerHTML="<strong>" + community + "</strong>";
			document.getElementById("communities").style.display="none";
			
			loadRSS(id,intlink,headlines,xmlFile,more);
}



function overSubNav(x) {
	over.backgroundImage = "url(http://www.delawareonline.com/graphics/beta/nav_" + y + "_over.gif)";
}

function offSubNav(x) {
	image
}

function overImage(x,y) {
	var image = document.getElementById(y + x).style;
	image.backgroundImage = "url(http://www.delawareonline.com/graphics/beta/nav_" + y + "_over.gif)";
}

function offImage(x,y) {
	var image = document.getElementById(y + x).style;
	image.backgroundImage = "url(http://www.delawareonline.com/graphics/beta/nav_" + y + ".gif)";
}

function showLayer(x) {
	var layer = document.getElementById(x).style;
    layer.display="block";
}

function hideLayer(x) {
	var layer = document.getElementById(x).style;
    layer.display="none";
}


function showHideSummary(x) { 
	 
	var summary = document.getElementById("summary_" + x).style;
    
	if(summary.display == "block"){
		summary.display="none";
	
		var collapse = document.getElementById("collapse_" + x).style;
		collapse.display="none";
		
		var expand = document.getElementById("expand_" + x).style;
		expand.display="block";	
	}
	else{
		summary.display="block";
		
		var collapse = document.getElementById("collapse_" + x).style;
		collapse.display="block";
		
		var expand = document.getElementById("expand_" + x).style;
		expand.display="none";		
	}
}





function showSummary(x) { 
	 
	var summary = document.getElementById("summary_" + x).style;
    summary.display="block";
	
	var collapse = document.getElementById("collapse_" + x).style;
	collapse.display="block";
	
	var expand = document.getElementById("expand_" + x).style;
	expand.display="none";
	
}


function hideSummary(x) { 
	
	var summary = document.getElementById("summary_" + x).style;
    summary.display="none";
	
	var collapse = document.getElementById("collapse_" + x).style;
	collapse.display="none";
	
	var expand = document.getElementById("expand_" + x).style;
	expand.display="block";
	
}


function hideSubnav(x) { 
	
	var subnav = document.getElementById("subnav" + x).style;
    subnav.display="none";
	
	var collapse = document.getElementById("collapse" + x).style;
	collapse.display="none";
	
	var expand = document.getElementById("expand" + x).style;
	expand.display="block";
	
}


function showSubnav(x) { 
	
	var subnav = document.getElementById("subnav" + x).style;
    subnav.display="block";
	
}

function showHideSubnav(x) { 
	var i = 1;
	
	var expand = new Array();
	var collapse = new Array();
	var subnav = new Array();
	var nav = new Array();
	var navlink = new Array();

	while (i < 9) {
	
		if (i == x) {
			subnav[i] = this.document.getElementById("subnav" + x).style;
    		subnav[i].display="block";
			
			nav[i] = this.document.getElementById("nav" + x).style;
			nav[i].backgroundImage = "url(http://www.delawareonline.com/graphics/beta/navover_bg.gif)";
			
			navlink[i] = this.document.getElementById("nav" + x + "_link").style;
			navlink[i].backgroundImage = "url(http://www.delawareonline.com/graphics/beta/navover_bg.gif)";
			
			expand[i] = this.document.getElementById("expand" + x).style;
			expand[i].display="none";
			
			collapse[i] = this.document.getElementById("collapse" + x).style;
			collapse[i].display="block";
		}
		
		else {
			subnav[i] = this.document.getElementById("subnav" + i).style;
			subnav[i].display="none";
			
			nav[i] = this.document.getElementById("nav" + i).style;
			nav[i].backgroundImage = "url(http://www.delawareonline.com/graphics/beta/nav_bg.gif)";
			
			navlink[i] = this.document.getElementById("nav" + i + "_link").style;
			navlink[i].backgroundImage = "url(http://www.delawareonline.com/graphics/beta/nav_bg.gif)";
			
			expand[i] = this.document.getElementById("expand" + i).style;
			expand[i].display="block";
			
			collapse[i] = this.document.getElementById("collapse" + i).style;
			collapse[i].display="none";
			
		}
		
		i++;
		
	}
}










function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}