/**
 * Generic Site Functions
 */
/**
 * Used in /contact/
 */
function HearAboutUs_Change(block){
	if (document.getElementById("hearaboutus"+block+"").value==""){document.getElementById("block"+block+"").style.display="none";}
	if (document.getElementById("hearaboutus"+block+"").value=="Advertisement"){document.getElementById("block"+block+"").style.display="block";}
	if (document.getElementById("hearaboutus"+block+"").value=="Media Coverage"){document.getElementById("block"+block+"").style.display="block";}
	if (document.getElementById("hearaboutus"+block+"").value=="Previous Client"){document.getElementById("block"+block+"").style.display="block";}
	if (document.getElementById("hearaboutus"+block+"").value=="Search Engine"){document.getElementById("block"+block+"").style.display="block";}	
	if (document.getElementById("hearaboutus"+block+"").value=="Reference"){document.getElementById("block"+block+"").style.display="block";}
	if (document.getElementById("hearaboutus"+block+"").value=="Speaking Event"){document.getElementById("block"+block+"").style.display="block";}
	if (document.getElementById("hearaboutus"+block+"").value=="Other..."){document.getElementById("block"+block+"").style.display="block";}	
}

// This is used to embed Flash documents, because Internet Explorer sucks
function embedFlash(src, width, height) {
	document.write('<object type="application/x-shockwave-flash" data="/flash/'+src+'" width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="/flash/'+src+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="wmode" value="transparent" />');
	document.write('</object>');
}
/* Used in multiple areas to show/hide divs */
var listx = new Array();

function hidediv(pass) {
	var divs = document.getElementsByTagName('div');
	for(i = 0; i < divs.length; i++) {
		if (divs[i].id == (pass)) {
			if (document.getElementById) // DOM3 = IE5, NS6
				divs[i].style.display = 'none';
			else {
				if (document.layers) {
					document.layers[divs[i]].display = 'none';
					document.layers[divs[i]].position = 'absolute';
				}
				else {
					document.all.hideShow.divs[i].visibility = 'none';
					document.all.hideShow.divs[i].position = 'absolute';
				}
			}
		}
	}
	
	listx[pass] = "hidden";
}
function showdiv(pass) {
	if (listx[pass] == "shown") hidediv(pass);
	else {
		var divs = document.getElementsByTagName('div');
	for(i = 0; i < divs.length; i++) {
			if (divs[i].id == (pass)) {
				if (document.getElementById) {
					// IE 6+/NN6
					divs[i].style.display = 'block';
				}
				else {
					if (document.layers) {
						//netscape 5
						document.layers[divs[i]].display = 'block';
						document.layers[divs[i]].position = 'relative';
					}
					else {
						// IE 4 and 5 not 5+
						document.all.hideShow.divs[i].visibility = 'block';
						document.all.hideShow.divs[i].position = 'relative';
					}
				}
			}
		}
		listx[pass] = "shown";
	}
}
