var widget_width;
var widget_type;
var types = new Array('aerzte', 'institutionen', 'versicherung');
var am_location_cleared = false;

function am_location_clear(form){
	if (am_location_cleared == false){
		form.where.style.color = '#000';
		form.where.value = '';
	}
	am_location_cleared = true
}

if (!widget_type)
	widget_type = 1;
	
if (!widget_width)
	widget_width = 170;

if (widget_width < 170)
	widget_width = 170;

if (widget_width < 400){
document.writeln('<div style="margin: 0; margin-top: 0px; margin-bottom: 10px; width: '+(widget_width - 2)+'px; height: 133px; text-align: center; font-family: Sans-serif; font-size: 12px; color: #000; border: 1px solid #C3D9FF; background: #FFF url(\'http://www.annuairemedecin.ch/images/small_logo_x.gif\') top right no-repeat;" >');
document.writeln('	<p style="margin: 0; padding-bottom: 5px; padding-top: 2px; padding-left: 2px; text-align: left; font-size: 10px;">');
document.writeln('		<a href="http://www.arzteindex.ch/" style="text-decoration: none; color: #1254A4;">annuairemedecin.ch</a>');
document.writeln('	</p>');
document.writeln('	<form action="http://www.arzteindex.ch/" method="post" style="margin: 0;">');
document.writeln('		<p style="margin: 0;">');
document.writeln('			<input type="hidden" name="section" value="search" />');
document.writeln('			NAME<br />');
document.writeln('			<input type="text" name="who" value="" style="padding: 0; margin-bottom: 5px; width: '+(widget_width - 30)+'px;" /><br />');
document.writeln('			ORT<br />');
document.writeln('			<input type="text" name="where" value="Kanton, Stadt, PLZ"  style="padding: 0; margin-bottom: 5px; width: '+(widget_width - 30)+'px; color: #AAAAAA" onfocus="am_location_clear(this.form)"/><br />');
document.writeln('			<input type="submit" value="Suche" style="width: '+(widget_width - 24)+'px;"  onmousedown="am_location_clear(this.form)" onclick="am_location_clear(this.form)" />');
document.writeln('		</p>');
document.writeln('	</form>');
document.writeln('</div>');
} 

else 

{
document.writeln('<div style="margin: 0; margin-top: 0px; margin-bottom: 10px; width: '+(widget_width - 2)+'px; height: 48px; text-align: center; font-family: Sans-serif; font-size: 12px; color: #000; border: 1px solid #C3D9FF; background: #FFF url(\'http://www.annuairemedecin.ch/images/small_logo_x.gif\') top right no-repeat;" >');
document.writeln('	<p style="margin: 0; padding-bottom: 5px; padding-top: 2px; padding-left: 2px; text-align: left; font-size: 10px;">');
document.writeln('		<a href="http://www.arzteindex.ch/" style="text-decoration: none; color: #1254A4;">annuairemedecin.ch</a>');
document.writeln('	</p>');
document.writeln('	<form action="http://www.arzteindex.ch/" method="post" style="margin: 0;">');
document.writeln('		<p style="margin: 0;">');
document.writeln('			<input type="hidden" name="section" value="search" />');
document.writeln('			NAME <input type="text" name="who" value="" style="padding: 0; width: '+((widget_width / 3) - 16)+'px;" />');
document.writeln('			ORT <input type="text" name="where" id="am_location" value="Kanton, Stadt, PLZ" style="padding: 0; width: '+((widget_width / 3) - 16)+'px; color: #AAAAAA" onfocus="am_location_clear(this.form)" /> ');
document.writeln('			<input type="submit" value="Suchen" style="width: '+((widget_width / 3) - 55)+'px; height: 22px;" onmousedown="am_location_clear(this.form)" onclick="am_location_clear(this.form)" />');
document.writeln('		</p>');
document.writeln('	</form>');
document.writeln('</div>');
}