sOutput = "";
	
switch(podscope_format) {
	case "HalfBanner":
		sOutput = HalfBanner(podscope_sourceid, podscope_sourcename, podscope_outlinecolor);
		break;
	case "SmallRect":
		sOutput = SmallRect(podscope_sourceid, podscope_sourcename, podscope_outlinecolor);
		break;
	case "SmallButton":
		sOutput = SmallButton(podscope_sourceid, podscope_sourcename, podscope_outlinecolor, podscope_tab_color, podscope_link_color);
		break;
	default:
		sOutput = "Invalid Podscope Format";
}
document.write(sOutput);

function HalfBanner (iSourceID, sSourceName, sOutlineColor) {
	sOut   = "<DIV STYLE=\"width: 234px; height: 60px; border: 1px solid " + sOutlineColor + "; font-family: arial; font-size: 8pt; background-color: white\">";
	sOut  += "	<DIV STYLE=\"\">";
	sOut  += "		<FORM NAME=\"PodscopeSearch\" Action=\"http://www.podscope.com/search.php\" Method=\"get\" style=\"margin: 0px;\">";
	sOut  += "			<DIV STYLE=\"\">";
	sOut  += "				<A HREF=\"http://www.podscope.com\"><IMG STYLE=\"border: 0px;\" SRC=\"http://www.podscope.com/remote/podscope_halfbanner.gif\" ALT=\"Podscope\"></A>";
	sOut  += "				<INPUT TYPE=\"text\" NAME=\"q\" VALUE=\"\" STYLE=\"width: 40%; border: 1px solid #333333; font-size: 8pt; margin-top: 12px; vertical-align: top\">";
	sOut  += "				<INPUT TYPE=\"submit\" VALUE=\"Go\" STYLE=\"padding: 1px; width: 2em; font-size: 8pt; color: white; background-color: #6699CC; border: 1px solid white; margin-top: 11px; vertical-align: top\"/>";
	sOut  += "			</DIV>";
	sOut  += "			<DIV STYLE=\"height: 1em;\">";
	sOut  += "					<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"" + iSourceID + "\" CHECKED STYLE=\"vertical-align: middle;\"/>";
	sOut  += "						<SPAN STYLE=\"vertical-align: middle\">Search " + sSourceName +"</SPAN>";
	sOut  += "					<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"0\" STYLE=\"vertical-align: middle;\"/>";
	sOut  += "						<SPAN STYLE=\"vertical-align: middle\">All of Podscope</SPAN>";
	sOut  += "			</DIV>";
	sOut  += "		</FORM>";
	sOut  += "	</DIV>";
	sOut  += "</DIV>";
	return(sOut);
}

function SmallButton (iSourceID, sSourceName, sOutlineColor, sTabColor, sLinkColor) {
	sOut   = "<DIV STYLE=\"width: 120px; height: 120px; border: 1px solid " + sOutlineColor + "; font-family: arial; font-size: 8pt; background-color: white\">";
	sOut  += "	<DIV STYLE=\"\">";
	sOut  += "		<FORM NAME=\"PodscopeSearch\" Action=\"http://www.podscope.com/search.php\" Method=\"get\" style=\"margin: 0px;\">";
	sOut  += "			<TABLE WIDTH=\"100%\" BORDER=\"0\" HEIGHT=\"100%\" CELLPADDING=\"0\" CELLSPACING=\"0\" STYLE=\"font-size: 10pt;\">";
	sOut  += "				<TR><TD STYLE=\"padding: 2px; vertical-align: top;\">";
	sOut  += "					<DIV STYLE=\"font-size: 8pt; text-align: center; /*font-variant: small-caps;*/; letter-spacing: +1;\">Spoken Word Search</DIV>";
	sOut  += "					<INPUT TYPE=\"text\" NAME=\"q\" VALUE=\"\" STYLE=\"width: 100%; border: 1px solid #333333; font-size: 8pt; vertical-align: top\">";
	sOut  += "					<DIV STYLE=\"font-size: 8pt; margin-top: 1px;\">";
	sOut  += "						<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"" + iSourceID + "\" CHECKED STYLE=\"vertical-align: middle\"/><SPAN STYLE=\"vertical-align: middle\">" + sSourceName +"</SPAN><BR/>";
	sOut  += "						<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"0\" STYLE=\"vertical-align: middle;\"/><SPAN STYLE=\"vertical-align: middle\">All of Podscope</SPAN>";
	sOut  += "					</DIV>";		
	sOut  += "					<DIV STYLE=\"padding-top: 2px; margin-right: 2px; text-align: right\">";
	sOut  += "						<INPUT TYPE=\"SUBMIT\" VALUE=\"Go\" STYLE=\"padding: 1px; width: 3em; font-size: 8pt; color: black; border: 2px solid gray; background-color: white; vertical-align: top\">";
	sOut  += "					</DIV>";		
	sOut  += "				</TD></TR>";
	sOut  += "				<TR STYLE=\"text-align: right; font-size: 8pt; color: " + sLinkColor + "; vertical-align: bottom; height: 1em; background-color: " + sTabColor + "\"><TD>";
	sOut  += "					<A STYLE=\"color: " + sLinkColor + "; text-decoration: none;\" HREF=\"http://www.podscope.com/\" TITLE=\"Podscope: The Internet's Spoken-Word Search Engine\">podscope</A>";
	sOut  += "				</TD></TR>";	
	sOut  += "			</TABLE>";	
	sOut  += "		</FORM>";
	sOut  += "	</DIV>";
	sOut  += "</DIV>";
	return(sOut);
}

function SmallRect(iSourceID, sSourceName, sOutlineColor) {
	sOut   = "<DIV STYLE=\"width: 180px; height: 150px; border: 1px solid " + sOutlineColor + "; font-family: arial; font-size: 10pt; padding: 1px; background-color: white\">";
	sOut  += "	<A HREF=\"http://www.podscope.com\"><IMG STYLE=\"border: 0px;\" src=\"http://www.podscope.com/remote/podscope_smallrect.gif\" alt=\"Podscope\"/></A>";
	sOut  += "	<FORM NAME=\"PodscopeSearch\" Action=\"http://www.podscope.com/search.php\" Method=\"get\" style=\"padding: 0px; margin: 0px; text-align: center\">";
	sOut  += "		<DIV STYLE=\"color: gray; font-size: 8pt; text-align: center; margin-bottom: 2px;\">The Spoken-Word Search Engine</DIV>";
	sOut  += "		<DIV STYLE=\"width: 75%; text-align: left; color: #333333; font-size: 8pt\">";
	sOut  += "			";
	sOut  += "			<INPUT TYPE=\"text\" NAME=\"q\" VALUE=\"\" STYLE=\"width: 80%; font-size: 8pt; border: 1px solid #333333\">";
	sOut  += "			<INPUT TYPE=\"submit\" VALUE=\"Go\" STYLE=\"width: 2em; font-size: 8pt; color: white; background-color: #6699CC; border: 1px solid white;\"/>";
	sOut  += "			<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"" + iSourceID + "\" CHECKED />Search " + sSourceName +"<br/>";
	sOut  += "			<INPUT TYPE=\"radio\" NAME=\"sourceID\" VALUE=\"0\"/>All of Podscope<br/>";
	sOut  += "		</DIV>";
	sOut  += "	</FORM>";
	sOut  += "	</DIV>";
	sOut  += "</DIV>";
	return(sOut);
}
