
//here you place the ids of every element you want.
var ids=new Array('jod-conditions','cforms');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}





// dynamically writes flash tags, avoiding activeX protection
function writeFlash (moviePath, w, h, transp) {
	if (transp == null){
		transp = false;
	}
	var transp_ns = "";
	var transp_ie = "";
	if (transp) {
		transp_ns = 'wmode="transparent"';
		transp_ie = '<param name="wmode" value="transparent" />';
	}
	var str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
			+ 'codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '
			+ 'width="' + w + '" height="' + h + '" align="middle">'
			+ '<param name="allowScriptAccess" value="sameDomain" />'
			+ '<param name="movie" value="' + moviePath + '" />'
			+ '<param name="quality" value="high" />'
			+ transp_ie
			+ '<embed src="' + moviePath + '" quality="high" '
			+ 'width="' + w + '" height="' + h + '" align="middle" ' + transp_ns + ' allowScriptAccess="sameDomain" ' 
			+ 'type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
			+ '</object>';
	document.write(str);
}