function pPluridocFocus()
	{
		var pluridocPesquisa = document.getElementById("pluridocPesquisa");
		
		if ( pluridocPesquisa.value != "" )
			{
				document.all.btnpluridocpesquisa.focus();
				window.open('http://www.pluridoc.com/site/frontoffice/default.aspx?q=' + pluridocPesquisa.value,'Pluridoc','','');
			}
		else
			{
				alert('Tem de preencher o campo de pesquisa');
			}
	}
function pPluridocKeyPress() 
	{
		if (window.event.keyCode == 13)
			pPluridocFocus();
	}

function pPluridocSearchBoxConst(ppType, ppLang)//, ppWidth, ppWidthBox
	{

		if (ppType != null && ppLang != null )//&& ppWidth != null && ppWidthBox != null 
			{
				switch (ppType) 
					{
						case 1:

							document.write('<table width="120px" height="59px" id="Table1" border="0" cellpadding="0" cellspacing="0">');  
							document.write('	<tr>'); 
							document.write('		<td width="7" height="7">'); 
							document.write('		<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_tl.gif" width="7" height="7" alt="" /></td>'); 
							document.write('		<td height="7" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_T.gif" ><!--bgcolor="#e1e7de"--></td>'); 
							document.write('		<td width="7" height="7"><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_tr.gif" width="7" height="7" /></td>'); 
							document.write('	</tr>'); 
							document.write('	<tr>'); 
							document.write('		<td width="7" rowspan="2" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_L.gif">&nbsp;</td>'); 
							document.write('		<td background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search.gif" align="left" valign="center"> &nbsp;&nbsp;'); 
							document.write('		<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_bg.gif" width="80" height="19"></td>'); 
							document.write('		<td width="7" rowspan="2" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_1px_R.gif">&nbsp;</td>'); 
							document.write('	</tr>'); 
							document.write('	<tr>'); 
							document.write('		<td background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search.gif" align="center" valign="center">'); 
							document.write('		<input id="pluridocPesquisa" type="text" name="pluridocPesquisa" onKeyPress="javascript:pPluridocKeyPress();" style="width:100px; height:18;float:left;" />'); 
							document.write('		<input id="btnpluridocpesquisa" type="button" name="btnpluridocpesquisa" onClick="javascript:pPluridocFocus();" style="background:#FFFFFF url(http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_btn_search_ok_empty.gif) no-repeat center;color:#157aa8;border:0; width:22; height:18;"  value="ok" /></td>'); 
							document.write('	</tr>'); 
							document.write('	<tr>'); 
							document.write('		<td width="7" height="7">'); 
							document.write('		<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_bl.gif" width="7" height="7" alt="" /></td>'); 
							document.write('		<td height="7" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_B.gif"></td>'); 
							document.write('		<td width="7" height="7"><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_br.gif" width="7" height="7"></td>'); 
							document.write('  </tr>'); 
							document.write('</table>');

							break;

						case 2:

							document.write('<table width="120" height="81px" id="Table2" border="0" cellpadding="0" cellspacing="0">'); 
							document.write('	<tr>');
							document.write('		<td width="7" height="81" valign="top">');
							document.write('			<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search3_left.gif" width="7" height="81" alt="" /></td>');
							document.write('		<td width="100%" align="center" style="background:#FFFFFF url(http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_box2.gif) no-repeat;">');
							document.write('			<table width="100%" height="81" border="0" align="right" cellpadding="0" cellspacing="0" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search2_bg2.gif" id="Table3">');
							document.write('				<tr>');
							document.write('					<td align="right"><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search3_bkg.gif" /></td>');
							document.write('				</tr>');
							document.write('			</table>');
							document.write('			<table width="100%" border="0" cellspacing="10" cellpadding="0" id="Table4">');
							document.write('				<tr>');
							document.write('					<td><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_pluridoc.gif" /></td>');
							document.write('				</tr>');
							document.write('				<tr>');
							document.write('					<td>');
							document.write('						<input id="Text1" type="text" name="pluridocPesquisa" onKeyPress="javascript:pPluridocKeyPress();" style="width:100px; height:18;float:left;" />');
							document.write('						<input id="Button1" type="button" name="btnpluridocpesquisa" onClick="javascript:pPluridocFocus();" style="background:#FFFFFF url(http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_btn_search_ok_empty.gif) no-repeat center;color:#157aa8;border:0; width:22; height:18;"  value="ok" />');
							document.write('					</td>');
							document.write('				</tr>');
							document.write('			</table>');
							document.write('		</td>');
							document.write('		<td width="9" valign="top" ><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search3_right.gif" width="8" height="81"></td>');
							document.write('	</tr>');
							document.write('</table>');
							
							break;			            

						case 3:

							document.write('<table width="120px" height="59px" id="Table5" border="0" cellpadding="0" cellspacing="0">'); 
							document.write('	<tr>');
							document.write('		<td width="7" height="7">');
							document.write('			<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_tl.gif" width="7" height="7" alt="" /></td>');
							document.write('		<td height="7" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_T.gif" ></td>');
							document.write('		<td width="7" height="7"><img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_tr.gif" width="7" height="7" /></td>');
							document.write('	</tr>');	
							document.write('	<tr>');
							document.write('		<td width="7" rowspan="2" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_L.gif">&nbsp;</td>');
							document.write('		<td background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search.gif" align="left" valign="center" style="font-family:verdana, sans-serif;font-size:10px;color:#167eae;">&nbsp;&nbsp;Pesquisa Pluridoc </td>');
							document.write('		<td width="7" rowspan="2" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_1px_R.gif">&nbsp;</td>');
							document.write('	</tr>');
							document.write('	<tr>');
							document.write('		<td background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search.gif" align="center" valign="center">');
							document.write('			<input id="Text2" type="text" name="pluridocPesquisa" onKeyPress="javascript:pPluridocKeyPress();" style="width:100px; height:18;float:left;" />');
							document.write('			<input id="Button2" type="button" name="btnpluridocpesquisa" onClick="javascript:pPluridocFocus();" style="background:#FFFFFF url(http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_btn_search_ok_empty.gif) no-repeat center;color:#157aa8;border:0; width:22; height:18;"  value="ok" /></td>');
							document.write('	</tr>');
							document.write('	<tr>');
							document.write('		<td width="7" height="7">');
							document.write('			<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_bl.gif" width="7" height="7" alt="" /></td>');
							document.write('		<td height="7" background="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_1px_search_B.gif"></td>');
							document.write('		<td width="7" height="7">');
							document.write('			<img src="http://www.pluridoc.com/Site/FrontOffice/images/Bg_Box_search_br.gif" width="7" height="7" alt="" /></td>');
							document.write('	</tr>');
							document.write('</table>');

							break;

					}
			}
		else
			{
				document.write('<table style="font:14px; border:1px solid red;">');
				document.write('	<tr>');
				document.write('		<td>');
				document.write('			<img src="http://www.pluridoc.com//GlobalElements/Images/Icons/error.gif" alt="Aviso" />&nbsp;&nbsp;Faltam parâmetros para a construção da caixa de pesquisa.</td>');
				document.write('	</td></tr>');
				document.write('</table>');
							
			}

	}