//TOGGLES THE SIGN-UP TEXT AREAS
function showText(bl) {
	document.getElementById("signup-intro").style.display = "none";
	document.getElementById("signup-havesite").style.display = "none";
	document.getElementById("signup-nosite").style.display = "none";
	document.getElementById("signup-details").style.display = "none";
	document.getElementById("signup-faq").style.display = "none";
	if (bl == "havesite") {
		document.getElementById("signup-havesite").style.display = "block";
	} else if (bl == "nosite") {
		document.getElementById("signup-nosite").style.display = "block";
	} else if (bl == "details") {
		document.getElementById("signup-details").style.display = "block";
	} else if (bl == "faq") {
		document.getElementById("signup-faq").style.display = "block";
	} else {
		document.getElementById("signup-intro").style.display = "block";
	}
	//window.location = "index.cfm#top";
}

function toggleWins(cmd) {
	if (cmd == "winBiz") {
		cmd = document.getElementById("win-business").getElementsByTagName("ul")[0];
	} else if (cmd == "winVisit") {
		cmd = document.getElementById("win-visitors").getElementsByTagName("ul")[0];
	} else if (cmd == "winChamber") {
		cmd = document.getElementById("win-chamber").getElementsByTagName("ul")[0];
	} else {
	
	}
	if (cmd.style.display == "block") {
		cmd.style.display = "none";
	} else {
		//toggleWinsInit();
		cmd.style.display = "block";
	}
}

function toggleWinsInit() {
	winBiz = document.getElementById("win-business").getElementsByTagName("ul")[0];
	winVisit = document.getElementById("win-visitors").getElementsByTagName("ul")[0];
	winChamber = document.getElementById("win-chamber").getElementsByTagName("ul")[0];
	winBiz.style.display = "none";
	winVisit.style.display = "none";
	winChamber.style.display = "none";
}

function faqToggle() {
	var ps,tohide,newlink,newtext;
	// get all P elements, loop over them
	ps=document.getElementsByTagName('p');
	for (i=0;i<ps.length;i++) {	
		// check if the class contains trigger
		if(/faq/.test(ps[i].className)) {
			paraHide = ps[i].getElementsByTagName("span")[0];
			paraHide.style.display = "none";
			paraLink = ps[i].getElementsByTagName("a")[0];
			divHTML = "<b><img src='/gw-templates/delnorte/bullet_plus.gif' width='16' height='16' alt='Expand' border='0' style='position:relative;display:inline;float:left;margin-right:5px'></b>";
			paraLink.innerHTML = divHTML + paraLink.innerHTML;
			paraLink.colobj = paraHide;
			paraLink.linkState = 0;
			paraLink.onclick = function(){
				showhide(this.colobj);
				if (this.linkState == 0) {
					this.getElementsByTagName("b")[0].innerHTML = "<img src='/gw-templates/delnorte/bullet_minus.gif' width='16' height='16' alt='Collapse' border='0' style='position:relative;display:inline;float:left;margin-right:5px'>";
					this.linkState = 1;
				} else {
					this.getElementsByTagName("b")[0].innerHTML = "<img src='/gw-templates/delnorte/bullet_plus.gif' width='16' height='16' alt='Expand' border='0' style='position:relative;display:inline;float:left;margin-right:5px'>";
					this.linkState = 0;
				}
				//alert(initLinkState);
				return false;
			}
		}
	}
}

function showhide(o) {
	if(o) {
		o.style.display = o.style.display == 'none'?'block':'none';
	}
}
