var currenturl=document.URL;

if(currenturl.indexOf("products.geindustrial")!=-1 || currenturl.indexOf("gealnx34.appl.ge.com")!=-1 || currenturl.indexOf("americasweb-stg")!=-1 || currenturl.indexOf("localhost")!=-1) 
	menuBaseHref = "http://www.gepowerprotection.com" ;
else menuBaseHref = "" ;

document.write('<!-- row 1 -->');
document.write('<tr valign="top">'); 
 
document.write('<td colspan="2" id="mastheadCell">');
document.write('<div id="head">');
document.write('<div id="businessUnit">');
///document.write('<table border="0" width="100%"><tr><td valign="top" height="4"></td></tr>') ;
document.write('<table border="0" width="100%"><tr>');
///document.write('<td valign="top" height="85"><img src="' + menuBaseHref + '/imgs/topnav/GE_Energy_IS_blue2.jpg" border="0" alt="GE Energy Industrial Solutions" style="margin-top:4px;margin-bottom:4px;" /></a></td>');
document.write('<td width = "450" valign="top" style="padding-bottom:23px;padding-top:10px;padding-left:4px;"><a href="'+ menuBaseHref +'/pt/"><img src="' + menuBaseHref + '/imgs/topnav/GE_Energy_IS_blue2.jpg" border="0" alt="GE Energy Industrial Solutions" style="margin-top:4px;margin-bottom:4px;" align="left" /></a></td>');

/*document.write('<td width="160" height="90" valign="top"><a href="http://www.ge.com/olympicgames/ "><img src="' + menuBaseHref + '/imgs/topnav/ge_olympic_logo_136.gif" width="136" height="77" border="0" alt="GE Worldwide Partner" /></a></td>');
document.write('<td valign="top">&nbsp;<br /><img style="margin-top:10 px" src="' + menuBaseHref + '/imgs/topnav/businessTitle.gif" alt="GE Energy - Industrial Solutions" width="202" height="38" align="left" /></td>');*/

if(currenturl.indexOf("products.geindustrial")!=-1 || currenturl.indexOf("gealnx34.appl.ge.com")!=-1 || currenturl.indexOf("americasweb-stg")!=-1) {
 document.write('<td width="60"valign="bottom"><img src="' + menuBaseHref + '/imgs/e-catalogus_logo_60.jpg" border="0" alt="" /></td>');
}
document.write('</div>');
document.write('</div>');
document.write('<!-- navbar table begins -->');
document.write('<div>');
document.write('<table id="nav1" cellspacing="0" cellpadding="0">');
document.write('<tr valign="middle">');
document.write('<td id="searchCell" width="10">');
function validateQuickSearchForm2(obj){
   var charLength = obj.search.value;
   var testRegExp = /[#%<>]/ig  
   if (charLength.length >= 3){
       if(testRegExp.test(charLength)){
         alert('Invalid special character used');
         return false;
       }else{
     obj.REQUEST.value = "QUICKSEARCHINTERMEDIATE";    
     return true;
       }
   }else{
    alert('Minimum 3 characters needed for Quick Search');
    return false;    
   }
}
//if(currenturl.indexOf("products.geindustrial")!=-1 || currenturl.indexOf("gealnx34.appl.ge.com")!=-1 || currenturl.indexOf("americasweb-stg")!=-1) {
//if(currenturl.indexOf("gealnx34.appl.ge.com")!=-1) {
	document.write('<form action="http://products.geindustrial.com/IndustrialProducts/Dispatcher" id="frmSearch" name="frmSearch" method="post" onsubmit="return validateQuickSearchForm2(this);">');
	document.write('    <input type="hidden" name="REQUEST" />');
	document.write(' <input type="hidden" name="CATALOG" value="PP" />');
	document.write('<input type="hidden" name="lang" value="pt_PT" />');
	document.write('<table cellspacing="0" cellpadding="0">');
	document.write('<tr valign="middle">');
	document.write('<td style="text-transform:none;"><input type="text" class="text" name="search" value="" style="width: 100px;"/></td>');
	document.write('<td><a href="#" onclick="if(validateQuickSearchForm2(document.frmSearch)){frmSearch.submit();}" style="text-decoration: none;">PESQUISA<br />RÁPIDA</a>');
	document.write('</tr>');
	document.write('</table>');
	document.write('</form>');
//}
document.write('</td>');
document.write('<td width="8%" id="navbarCell_0" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_0" width="9" height="8" border="0" alt="" /><a href="'+menuBaseHref+'/pt/index.html">In&iacute;cio</a></span><br />&nbsp;</td>');
document.write('<td width="12%" id="navbarCell_1" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_1" width="9" height="8" border="0" alt="" /><a href="'+menuBaseHref+'/pt/product_portfolio/index.html">Gama de &nbsp;&nbsp;&nbsp;Produtos</a></span></td>');
document.write('<td width="15%" id="navbarCell_2" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_2" width="9" height="8" border="0" alt="" /><a href="' + menuBaseHref + '/pt/index_surv_e-cat.html">Cat&aacute;logo &nbsp;&nbsp;&nbsp;Electr&oacute;nico</a></span></td>');
document.write('<td width="16%" id="navbarCell_3" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_3" width="9" height="8" border="0" alt="" /><a href="'+menuBaseHref+'/pt/market_segments/index.html">Segmentos de &nbsp;&nbsp;&nbsp;mercado</a></span></td>');
document.write('<td width="14%" id="navbarCell_4" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_4" width="9" height="8" border="0" alt="" /><a href="'+menuBaseHref+'/pt/after_sales/index.html">P&oacute;s-venda e &nbsp;&nbsp;&nbsp;Servi&ccedil;os</a></span></td>');
document.write('<td width="12%" id="navbarCell_5" align="left"><span style="text-align: left;"><img src="' + menuBaseHref + '/imgs/topnav/nav1Link.gif" id="navbarImg_5" width="9" height="8" border="0" alt="" /><a href="'+menuBaseHref+'/pt/resources/index.html">Recursos</a></span><br /></td>')
document.write('</tr>');
document.write('</table>');
document.write('</div>');
document.write('<!-- navbar table ended -->');

document.write('</td>');
document.write('</tr>');
document.write('<!-- row 1 ended -->');
document.write('<!-- row 2 -->');
document.write('<tr>');
//document.write('<td id="ecatsearch">&nbsp;</td>');
document.write('<td colspan=2 valign="top">');
document.write('<table width="737" border="0"><tr><td valign="top">');
document.write('<table><tr><td style="padding:3px 0 0 0">');
//document.write('Text Size:&nbsp;');
document.write('</td><td>');
document.write('<div id="topleft">');
document.write('<a href="javascript:void(0);" onclick="javascript:makeSmall();"><img id="ts" src="' + menuBaseHref + '/imgs/topnav/s.gif"/></a><a href="javascript:void(0);" onclick="javascript:makeMedium();"><img id="tm" src="' + menuBaseHref + '/imgs/topnav/ma.gif"/></a><a href="javascript:void(0);" onclick="javascript:makeBig();""><img id="tb" src="' + menuBaseHref + '/imgs/topnav/b.gif" /></a>');
document.write('</div>');

document.write('</td><td valign="middle">&nbsp;&nbsp;&nbsp;<span style="font-size: 13px"><b>Portugal</b></span>');

document.write('</td></tr></table>');
document.write('</td><td valign="top">');
document.write('<div id="topright">');
//document.write('<a href="http://www.ge.com/eu/consumerindustrial/index.htm?PO">Bienvenido a GE Energy</a> | ') ;
document.write('<a href="'+menuBaseHref+'/pt/product_portfolio/keywords.html">A-Z</a> | ') ;
document.write('<a href="'+menuBaseHref+'/pt/resources/literature_library/index.html">Cat&aacute;logos</a> | ');
document.write('<a href="'+menuBaseHref+'/pt/contact_us/index.html">Contacte-nos</a> | ');
document.write('<a href="javascript:confirmsite(\'http://www.geGE Energyshop.com\');">GE EnergyShop</a>&nbsp;');
document.write('</div>');
document.write('</td></tr></table>');
document.write('</td>');
document.write('</tr>');
document.write('<!-- row 2 ended -->');
turnonTab2();
