function flapImage(img) {
	//flap-image
	document.getElementById('flap-image').src = img;
}

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 ChangeIssue(id) {
	//window.location.href = "manageContentForm.php?parent="+parentID+"&orderby="+orderby+"&show=section&showid="+sectionID;
	window.location.href = 'toc.php?id='+id;
}

function changeCountries(country) {
	if (country == "United States") {
		document.getElementById('select-states').style.display = 'inline';
	} else {
		document.getElementById('select-states').style.display = 'none';
		window.location.href = 'calendar-results.php?country='+country;
	}
}	

function changeStates(state) {
	window.location.href = 'calendar-results.php?country=United States&state='+state;
}

function changeCategory(cat) {
	window.location.href = 'calendar-results.php?category='+cat;
}

function changeCalResults(sort,country,state,category) {
	window.location.href = 'calendar-results.php?sort='+sort+'&country='+country+'&state='+state+'&category='+category;
}


function searchForm(searchTerm) {
	alert(searchTerm);
}


function animateIssue(img) {
	document.getElementById('animatedCover').src = img;
}

function HomePageImages(div) {
	Effect.Fade(div);
	Effect.Fade(div, { duration: 5.0 });
}

function FlapOff() {
	document.getElementById('flapIMG').style.display = 'none';
}

function FlapOn() {
	document.getElementById('flapIMG').style.display = 'inline';
}


function showSS() {
	document.getElementById('slideshow-container').style.display = 'block';
	document.getElementById('map').style.display = 'none';
	document.getElementById("mapview").setAttribute("class", "toggle-inactive");
	document.getElementById("ssview").setAttribute("class", "toggle-active");
}

function showMAP() {
	document.getElementById('slideshow-container').style.display = 'none';
	document.getElementById('map').style.display = 'block';
	document.getElementById("mapview").setAttribute("class", "toggle-active");
	document.getElementById("ssview").setAttribute("class", "toggle-inactive");
}

function xpopup() {
	document.getElementById('popup-subscribe').style.display = 'none';
}


