var disclaimerText = '<p><b>Please check with your local 3Com office for availability <br>in your area.</b></p>';
var l_opt = 'Options:';
var l_req = 'Required Products:';
var l_sup = 'This Product Supports:';
var l_pro = 'Product#:';


      function test()
      {
      alert("ok");
      }
      
function SwapImage(id,name) {
	document.images[id].src = eval(name+".src");
}

function openAwindow(page){
	window.open(page,'Smallbusiness','toolbar=yes,location=yes,directories=yes,status=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=640,height=328');
}

//This Function will pop up a window and diplay the contents of a varaible passed to it.
//You can also pass the desired window width and height 
function popupWindow(displaytext,popWidth,popHeight){
        newWindow = window.open('javascript:document.write();','popup', 'scrollbars=yes,resizable=yes,width=' + popWidth + ',height=' + popHeight);
        newWindow.document.write(displaytext);
		newWindow.document.close();
}

function select_url(x) { 
  var ext = x.split("//");
  if ( ext[0] == "http:" ) {
    window.open(x);
  } else { self.location = x; }
}


function pageHeader(swName)
{
return '<!-- start Navigation Banner Table -->\
<table border="0" width="600" cellspacing="0" cellpadding="0">\
  <tr>\
    <td rowspan="2">\
      <a href="/index.html"><img src="/assets/3com153-76.gif" width="153" height="76" border="0" alt="3Com homepage"></a>\
    </td>\
    <td valign="bottom"><img src="/assets/it_bnr4_' + swName + '.gif" alt="' + altText(swName) + '" width="336" height="56" align="right" border="0"></td>\
  </tr>\
  <tr>\
    <td align="right"><img src="/assets/it-topnav4.gif" usemap="#topnav4" alt="Prodotti, Servizi &amp; Supporto, Come Contattarci, Mappa del sito, nel Mondo" width="447" height="19" border="0"></td>\
  </tr>\
</table>\
<!-- end Navigation Banner Table -->\
\
<!-- begin Search table -->\
<table border="0" cellpadding="0" cellspacing="0" width="600">\
  <tr>\
    <td valign="top" width="128">\
      <form name="seek" method="GET" action="/cgi-bin/htsearch.cgi"><input type="text" name="words" size="20" value="" maxlength="100">\
    </td>\
    <td rowspan="2" valign="top" width="46">\
      <input type="Image" name="go" align="MIDDLE" alt="go" border="0" src="/assets/search.gif" width="46" height="30">\
    </td>\
    <td width="426" rowspan="2" valign="top">\
      </form>\
    </td>\
  </tr>\
</table>\
<!-- end Search table -->\
\
<map name="topnav4">\
  <area shape="RECT" coords="24,1,75,16" href="http://www.3com.com/prod/it_IT_EMEA/productsindex.jsp?tab=cat" alt="Prodotti" title="Prodotti">\
  <area shape="RECT" coords="76,1,175,16" href="/supporto/index.html" alt="Supporto" title="Supporto">\
  <area shape="RECT" coords="176,2,269,16" href="/contact/index.html" alt="Come Contattarci" title="Come Contattarci">\
  <area shape="RECT" coords="270,2,351,16" href="/local/sitemap.html" alt="Mappa del sito" title=Mappa del sito"">\
  <area shape="RECT" coords="362,1,438,16" href="http://www.3com.com/selectcountry.html"  target="_blank" alt="nel Mondo" title="nel Mondo">\
</map>\
\
<map name="botnav4">\
  <area shape="RECT" coords="13,2,86,15" href="http://pa.3com.com/it" target="_blank" alt="Login" title="Login">\
  <area shape="RECT" coords="90,2,226,15" href="/tecnologia/index.html" alt="Tecnolgia" title="Tecnolgia">\
  <area shape="RECT" coords="227,2,373,15" href="/training/3comu/index.html" alt="Corsi Tecnici" title="Corsi Tecnici">\
  <area shape="RECT" coords="375,1,486,15" href="/chisiamo.html" alt="3Com" title="3Com">\
  <area shape="RECT" coords="489,1,592,15" href="http://www.3com.com/corpinfo/en_US/legal/index.html" target="_blank" alt="Legal" title="Legal">\
</map>';
}

function pageFooter()
{
return '<!-- start Footer Area -->\
<table cellpadding="0" cellspacing="0" border="0" width="600">\
  <tr>\
    <td align="center">\
      <br>\
      <img src="/assets/it-botnav4.gif" alt="Login, Tecnologia, Corsi Tecnici, 3Com &amp; Legal" usemap="#botnav4" border="0" width="600" height="20"><br>\
      <br>\
      <font face="arial,helvetica,sans-serif" size="-2">\
      <a HREF="/index.html">Pagina Principale</a> |\
      <a HREF="http://www.3com.com/prod/it_IT_EMEA/productsindex.jsp?tab=cat">Prodotti</a> |\
      <a HREF="/supporto/index.html">Supporto</a> |\
      <a HREF="/contact/index.html">Come Contattarci</a> |\
      <a HREF="/local/sitemap.html">Mappa del sito</a> |\
      <a HREF="http://www.3com.com/selectcountry.html" target="_blank">nel Mondo</a>\
      <br>\
      <a HREF="http://pa.3com.com/it" target="_blank">Log In</a> |\
      <a HREF="/tecnologia/index.html">Tecnolgia</a> |\
      <a href="/training/3comu/index.html">Corsi Tecnici</a> |\
      <a HREF="/chisiamo.html">3Com</a> |\
      <a HREF="http://www.3com.com/corpinfo/en_US/legal/index.html" target="_blank">Legal</a> |\
      <a HREF="/legal/privacy.html">Privacy Statement</a>\
      <br>\
      <a href="http://www.3com.com/corpinfo/en_US/legal/index.html" target="_blank">Copyright &#169; 2001 3Com Corporation. All rights reserved.</a></font></td></tr>\
      </font>\
    </td>\
  </tr>\
</table>\
<!-- end Footer Area -->';
}

function write_header(swName){ 
document.write(pageHeader(swName.toLowerCase()));
}
function write_footer(){document.write(pageFooter());}


//You can use any of the following as an argument to write_header(...)
//images will be called emea_bnr4_xxxx.gif for EMEA. The xxxx bit MUST be exactly the same for all 5 euro sites if we are to seamlessly move pages about.
//the Alt text for each header image is defined below.
arrAlt = new Array();
arrAlt['products']   = 'Prodotti';
arrAlt['soho']       = 'Personal Communication';
arrAlt['mobile']     = 'Personal Communication';
arrAlt['enterprise'] = 'Enterprise';
arrAlt['partners']   = 'Partners';
arrAlt['news']       = 'Novit&agrave;';
arrAlt['sitemap']    = 'Mappa del Sito';
arrAlt['corporate']  = 'Corporate Info';
arrAlt['contact']    = 'Come Contattarci';
arrAlt['promotion']  = 'Promozione';
arrAlt['search']     = 'Cerca sul sito';
arrAlt['blank']      = 'Blank Template';
arrAlt['eaudit']     = 'e-audit';
arrAlt['events']     = 'Eventi';
arrAlt['gls']        = 'GLS';
arrAlt['legal']      = 'Benvenuti in 3Com';
arrAlt['market']     = 'Ricerca di mercato';
arrAlt['planet']     = 'Planet Project';
arrAlt['solutions']  = 'Solutions Guide';
arrAlt['srvpro']     = 'Service Provider';
arrAlt['profserv']   = 'Professional Services';
arrAlt['support']    = 'Supporto';
arrAlt['technology'] = 'Tecnologia';
arrAlt['training']   = 'Training';
arrAlt['404error']   = '404 Error'; 


function altText(argImagePortion)
{
  if(arrAlt[argImagePortion] == null)
    alert("HEY - WEB DEVELOPER - STOP!!\n\nSwoosh image will not display because the call to function write_header('...'); has an invalid argument: " + argImagePortion + "\n\nSee source code of /js-css4/page_templates.js for allowed values."); 
  return arrAlt[argImagePortion];
}


//used by the sidenavs to get a safe word to send through the quesrystring - accented chars, even if escaped, will break the page.
function safeTitleString() // return the title of the page (minus any unwanted waffle), OR just "return" if there's an accented char (which would break the browser)
{
  
//  ret = document.title.replace( /(([\w\d ]*\|)*| {2,})/ig , '' );
  s = document.title.split("|");
  ret = s[s.length-1];
  ret = ret.replace(/(&reg;|®)/ig,'');
  for(i=0;i<ret.length;i++)
    if(ret.charCodeAt(i) > 127)
     return "Return";
  return escape(ret);
}

