// Javascript #1
// Toggle on/off from headline
function toggle(targetId) {
	var target = document.getElementById(targetId);
	if (target.style.display == "none"){
		target.style.display="inline";
	} else {
		target.style.display="none";
	}
}

// Toggle image or text to turn on and turn off as we set.
// onclick=("switchdisplay('work','off')");
// We are using +/- for on/off
function switchdisplay (show,mode) {
	var div = document.getElementById(show);
	if (mode == "on") {
		div.style.display="inline";
	} else {
		div.style.display="none";
	}
}

// Usage:
// Anchor: onClick="toggle(id)"
// Link: <div id="id" style="display: none;"><? include("path/filename"); ?></div>

// Javascript #2
// Popup windows to display document
function popPDFup (URL, pagAct, winSiz) {
	URL = '/files/' + URL;
	window.open(URL, pagAct, winSiz);
}

// Usage:
// inside HREF 
// <a href="javascript:popfaqup('path/filename','','height=600,width=500,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes');">Link</a>
// path/filename, page action, window size

// Javascript #3
// From popup click to open a link in its parent page, then close popup afterward
// Usage:
// <a onclick="javascript:opener.location.href='../contact.php';window.close();">

// Javascript #4
// From popup click to open a link in its parent page
// Usage:
//<a onclick="javascript:opener.location.href='../products/';"> 
