function renderFlash(src, width, height, features) {
	document.writeln('<embed src="' + src + '" quality="high" bgcolor="#ffffff" width="' + width + 
					 '" height="' + height + '" align="middle" allowscriptaccess="sameDomain" ' +
					 'type="application/x-shockwave-flash" ' + features + 
					 'pluginspage="http://www.macromedia.com/go/getflashplayer" />');
}
function launchImage(url, width, height, title) {
	if (url != "")
		window.open(url, "preview_image", "width=" + (width + 50) + ", height=" + (height + 50) + ", location=0, menubar=0, resizable=0, scrollbars, status=0, titlebar=1, toolbar=0");
	return false;
}

function toggleVisible(index) {
	var id = "a" + index + "f";
	var html = document.getElementById(id);
	var toggler = document.getElementById("a" + index + "toggle");
	if (html.style.display != "none") {
		toggler.innerHTML = "Additional Features";
		animStep(id, false, 200);
	} else {
		toggler.innerHTML = "Hide Additional Features";
		html.style.height = "0px";
		html.style.display = "";
		animStep(id, true, 200);
	}
	return false;
}

function animStep(id, expanding, height) {
	var html = document.getElementById(id);
	var newHeight = parseInt(html.style.height);
	
	if (expanding) {
		newHeight += 20;
		
		if (newHeight >= height) {
			html.style.height = height + "px";
			return;
		}
	} else {
		newHeight -= 20;
		if (newHeight <= 0) {
			html.style.height = "0px";
			html.style.display = "none";
			return;
		}
	}
	
	html.style.height = newHeight + "px";
	setTimeout("animStep('" + id + "', " + expanding + ", " + height + ");", 10);
}

/*function submitForm(id) {
	document.getElementById(id).submit();
	return false;
}*/

function resetForm() {
	var frmRquest = document.getElementById("frmRequest");
	frmRequest.reset();
	return false;
}