
//AddThis variables need to be set globally
var addthis_pub="jbartonastm";
var addthis_brand = "ASTM";
var addthis_disable_flash = true;

//Search Functions
function FixSearch() {
  var Standards="AaBbCcDdEeFfGgPSpsWKwk";
  var Numbers="0123456789";
  var SearchQuery=document.gs.q.value;
  var SpacesSearch=new Array();
  SpacesSearch=SearchQuery.split(" ");
  var SearchQuery2="";
  for(i=0;i<SpacesSearch.length;i++){
    if ((Standards.indexOf(SpacesSearch[i]) > -1) && (Numbers.indexOf(SpacesSearch[i+1].substring(0,1)) > -1)) {
      SearchQuery2 += SpacesSearch[i];
    } 
    else {
      SearchQuery2 += SpacesSearch[i] + " ";
    }
  }
  var DashesSearch=new Array();
  DashesSearch=SearchQuery2.split("-");
  var SearchQuery3="";
  for(j=0;j<DashesSearch.length;j++){
    if ((Standards.indexOf(DashesSearch[j].substring(DashesSearch[j].length-1)) > -1) && (Numbers.indexOf(DashesSearch[j+1].substring(0,1)) > -1) && (j==0||(DashesSearch[j].substring(DashesSearch[j].length-2,DashesSearch[j].length-1) == " "))) {
      SearchQuery3 += DashesSearch[j];
    }
    else {
      SearchQuery3 += DashesSearch[j] + "-";
    }
  }
  SearchQuery=SearchQuery3.substring(0,SearchQuery3.length-2);
  document.gs.q.value=SearchQuery;
}

function SearchFocus(){
        document.gs.q.focus();
}


//Draw the left navigation bar
//Takes one argument, which can be used to customize navigation for different pages
function DrawNavBar(special) {

	document.write("<a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/index.shtml\"><img border=\"0\" src=\"http://trans5.convertlanguage.com/img/astm/ES_75379.gif\"></a>");
	
	document.write("<ul id=\"leftnav\">" +
		"<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/Standard/index.shtml\" class=\"dkblue\"><span style=\"font-size:13px; color:#dc1015;\">Ambientales</span></a></li>");
	if(special == 'standards') {
		document.write("<li class=\"submenu\"><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/Standard/index.shtml\" class=\"white\">Buscar normas</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/BOOKSTORE/BOS/index.html\" class=\"white\">Annual Book of Standards</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/DEMO/index.shtml\" class=\"white\">Suscripciones en Internet</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/DEMO/collections.htm\" class=\"white\">Colecciones en DVD</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/BOOKSTORE/COMPS/compsbycategory.htm\" class=\"white\">Recopilaciones</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/Standards/category_index.html\" class=\"white\">Por categor\355a</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/STORE/alert.html\" class=\"white\">Patrones de b\372squeda</a></li>" +
		"<li class=\"submenu\"><a href=\"/COPYRIGHT/\" class=\"white\">Copyright/Permisos</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astmproducts.com/custom_collection.html\" class=\"white\">Portales corporativos</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/IMAGES03/corr_list.doc\" class=\"white\">Correcciones</a></li>");
	}
	document.write("<li><a href=\"http://www.astm.org/DIGITAL_LIBRARY/index.shtml\" class=\"dkblue\">Biblioteca Digital de Normas e Ingenier\355a</a></li>" +
		"<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/Standard/books_journals.shtml\" class=\"dkblue\">Libros y publicaciones</a></li>" +
		"<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/COMMIT/newcommit.html\" class=\"ltblue\">Comit\351s t\351cnicos</a></li>" +
		"<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/MEMBERSHIP/index.html\" class=\"ltblue\">Membres\355a</a></li>" + 
		"<li><a href=\"http://www.astm.org/MEETINGS/index.html\" class=\"ltblue\">Reuniones</a></li>");
	if(special == 'meeting') {
		document.write("<li class=\"submenu\"><a href=\"http://www.astm.org/MEETINGS/directions.htm\" class=\"white\">C\363mo llegar a ASTM</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/MEETINGS/hotels.htm\" class=\"white\">Hoteles cercanos a ASTM</a></li>");	
	}
	document.write("<li><a href=\"http://www.astm.org/SYMPOSIA/index.html\" class=\"ltblue\">Simposios y talleres</a></li>" +
		"<li><a href=\"http://www.astm.org/TRAIN/index.html\" class=\"ltblue\">Cursos de capacitaci\363n</a></li>");
	
	if(special == 'train') {
		document.write("<li class=\"submenu\"><a href=\"http://www.astm.org/TRAIN/courses.html\" class=\"white\">Listado de cursos</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/TRAIN/onsite.html\" class=\"white\">Capacitaci\363n in situ</a></li>" +
		"<li class=\"submenu\"><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/TRAIN/international.html\" class=\"white\">Capacitaci\363n internacional</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/TRAIN/pecontinuing.html\" class=\"white\">Educaci\363n continuada para ingenieros profesionales</a></li>");
	}
	
		document.write("<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/STATQA/index.html\" class=\"ltblue\">Pruebas de aptitud</a></li>" +
		"<li><a href=\"http://www.astm.org/STATQA/index_cert.html\" class=\"ltblue\">Certification Programs</a></li>" +
		"<li><a href=\"http://www.astm.org/EQUIPMENT/index.html\" class=\"orange\">Directorio de equipo</a></li>" +
		"<li><a href=\"http://www.astm.org/LABS/index.html\" class=\"orange\">Directorio de laboratorios</a></li>" +
		"<li><a href=\"http://www.astm.org/CONSULTANTS/index.html\" class=\"orange\">Directorio de especialistas</a></li>" +
		"<li><a href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/ABOUT/aboutASTM.html\" class=\"yellow\">Sobre ASTM International</a></li>");
	
	if(special == 'about') {
		document.write("<li class=\"submenu\"><a href=\"http://www.astm.org/ABOUT/index.html\" class=\"white\">Panorama general</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/NEWS/Mission2.html\" class=\"white\">Declaraci\363n de misi\363n</a></li>" +
		"<li class=\"submenu\"><a href=\"/FAQ/\" class=\"white\">Preguntas frecuentes</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/ABOUT/images/annrep08_web.pdf\" class=\"white\">Informe anual</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/PRESIDENT/lead_index.html\" class=\"white\">Columna del presidente</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/HISTORY/index.html\" class=\"white\">Historia</a></li>" +
		"<li class=\"submenu\"><a href=\"http://www.astm.org/HISTORY/milestones.html\" class=\"white\">Acontecimientos</a></li>");
	}
	
	
	document.write("<li><a href=\"http://www.astm.org/MAGS_NEWSLETTERS/index.html\" class=\"yellow\">Revistas y Boletines Informativos</a></li>" +
		"<li><a rel=\"nofollow\" href=\"http://astmnewsroom.org/newsrelease.aspx\" class=\"yellow\">Comunicados de prensa</a></li>" +
		"<li><a href=\"http://www.astm.org/studentmember/index.html\" class=\"yellow\">Alumnos y profesores</a></li>" +
		"<li><a href=\"http://www.astm.org/GLOBAL/index.html\" class=\"yellow\">Cooperaci\363n global</a></li>" +
		"</ul>");

	document.write("<div id=\"prod_info\">" +
		"<div id=\"prod_info_hdr\">Info. de productos</div>" +
		"<a class=\"bluelinkline_smaller\" href=\"http://www.astm.org/marketing_mail/index.html\">Actualizaciones de prod.</a>" +
		"<a class=\"bluelinkline_smaller\" href=\"http://www.astm.org/CATALOG_REQUEST/index.html\">Pedir cat\341logo gratuito</a>" +
		"<a class=\"bluelinkline_smaller\" href=\"http://www.astm.org/catalog.html\">Ver cat\341logo</a>" +
		"</div>");

	if(special == 'publish') {
		document.write("<div id=\"publish\"><b class=\"boldblack\"><a href=\"http://www.astm.org/PUBLISH/index.html\">Publique en ASTM</a></b></div>");
	}

	if(special == 'digiLib') {
		document.write("<div id=\"dlPublish\">" +
			"<div id=\"dlPublish_hdr\">Publique en ASTM</div>" +
			"<a class=\"bluelinkline_smaller\" href=\"http://www.astm.org/author/index.html\">Gu\355a de libros</a>" +
			"<a class=\"bluelinkline_smaller\" href=\"http://www.astm.org/DIGITAL_LIBRARY/JOURNALS/jrnls.htm\">Revistas especializadas</a>" +
			"</div>");
	}
	if(special == 'snews') {
		document.write("<img src=\"http://www.astm.org/IMAGES03/SN_3lang.gif\" height=\"110\" width=\"140\" border=0 USEMAP=#TRILANG><MAP NAME=TRILANG><AREA SHAPE=rect HREF=http://www.astm.org/SNEWS/index.html COORDS=\"9,39 123,57\"><AREA SHAPE=rect HREF=http://www.astm.org/SNEWS/SPANISH/index.html COORDS=\"3,59 140,91\"><AREA SHAPE=rect HREF=http://www.astm.org/SNEWS/CHINESE/index.html COORDS=\"0,92 147,116\"></MAP>");

		//document.write ("<form name=\"gs\" method=\"GET\" action=\"http://search2.micronexx.com/search\" OnSubmit=\"return FixSearch();GetStoreName();\">" +
		document.write ("<form name=\"gs\" method=\"GET\" action=\"http://www.astm.org/SITESEARCH/search2.cgi\" OnSubmit=\"return FixSearch();GetStoreName();\">" +
		"<input type=\"hidden\" name=\"ie\" value=\"\">" +
		"<input type=\"hidden\" name=\"site\" value=\"SNEWS\">" +
		"<input type=\"hidden\" name=\"output\" value=\"xml_no_dtd\">" +
		"<input type=\"hidden\" name=\"lr\" value=\"\">" +
		"<input type=\"hidden\" name=\"proxystylesheet\" value=\"SNEWS\">" +
		"<input type=\"hidden\" name=\"oe\" value=\"\">" +
		"<input type=\"hidden\" name=\"cartname\" value=\"mystore\">" +
		"<input type=\"hidden\" name=\"client\" value=\"STANDARDS\">" +
		"<table width=\"140\">" +
		"<tr><td><span style=\"font-size: 0.8em\">B\372squeda en Standardization News</span></td></tr>" +
		"<tr>" +
		"<td width=\"140\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" +
		"<td width=\"140\"> <input type=\"test\" name=\"q\" maxlength=\"100\" size=\"12\" > " +
		"</td>" +
		"<td> <div align=\"right\"><input type=\"image\" value=\"Submit\" src=\"http://trans5.convertlanguage.com/img/astm/ES_23432.gif\" border=\"0\" width=\"26\" height=\"16\" alt=\"IR\" title=\"IR\"></div></td></tr>" +
		"</form>" +
		"</table><br />" +
		"</table>");

	}
	document.write("<a href=\"http://www.astm.org/RSS/index.html\"><img src=\"http://www.astm.org/IMAGES03/rss.jpg\" border=\"0\"></a>" +
		"<br /><img src=\"http://www.astm.org/IMAGES03/verisign.jpg\">");
}


//Draw header
//Also takes one argument for customization
function DrawHeader(special) {

	document.write("<table cellpadding=0 cellspacing=0 border=0 width=582 id=\"headNav\"><tr>");
	

	//if(special == 'logout' || GetCookie('MyApache2::AuthCookieHandler_MyASTM') != null document.write("<td id=\"login\" align=\"center\"><a id=\"login_link\" href=\"http://myastm.astm.org/CUSTOMERS/logout.cgi\">Logout</A></td>");

	if(special == 'logout') document.write("<td id=\"login\" align=\"center\"><a id=\"login_link\" href=\"http://myastm.astm.org/CUSTOMERS/logout.cgi\">Salir</A></td>");
	else document.write("<td id=\"login\" align=\"center\"><a id=\"login_link\" href=\"http://myastm.astm.org/CUSTOMERS/checkpassword_landing_page.cgi\">Ingresar</a></td>");


	document.write("<td class=\"headerNav\" align=\"right\"><a class=\"hvLink\" href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/index.shtml\">Inicio</a>" +
		"<a class=\"hvLink\" href=\"http://www.astm.org/SITEMAP/index.html\">Mapa</a>" +
		"<a class=\"hvLink\" href=\"http://www.astm.org/SUPPORT/index.html\">Ayuda en Internet</a>" +
		"<a class=\"hvLink\" href=\"http://www.astm.org/CONTACT/index.html\">Contacto</a>" +
		"<a class=\"hvLink\" href=\"http://www.astm.org/prpolicy.html\">Pol\355ticas Web/IP</a>" +
		"<a class=\"hvLink\" href=\"/COPYRIGHT/\">Copyright/Permisos</a>" +
		"</tr></table>");

	document.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"582\"><tr><td id=\"search\">" +
		"<table border=0 cellspacing=5><tr>" +
		//"<td><form name=\"gs\" method=\"GET\" action=\"http://search.micronexx.com/search\" OnSubmit=\"return FixSearch();\">" +
		"<td><form name=\"gs\" method=\"GET\" action=\"http://www.astm.org/SITESEARCH/search.cgi\" OnSubmit=\"return FixSearch();\">" +
		"<input type=\"hidden\" name=\"ie\" value=\"UTF-8\">" +
		"<input type=\"hidden\" name=\"site\" value=\"STANDARDS\">" +
		"<input type=\"hidden\" name=\"output\" value=\"xml_no_dtd\">" +
		"<input type=\"hidden\" name=\"lr\" value=\"\">" +
		"<input type=\"hidden\" name=\"proxystylesheet\" value=\"STANDARDS\">" +
		"<input type=\"hidden\" name=\"oe\" value=\"UTF-8\">" +
		"<input type=\"hidden\" name=\"cartname\" value=\"mystore\">" +
		"<input type=\"hidden\" name=\"client\" value=\"STANDARDS\">" +
		"<input type=\"test\" name=\"q\" maxlength=\"100\" size=\"12\" ></td>" +
		"<td><input type=\"submit\" value=\"Buscar\">" +
		"</form></td>");

	document.write("<td align=\"right\" id=\"addThisCell\" width=\"100%\"><a href=\"http://www.addthis.com/bookmark.php?v=250\" onmouseover=\"return addthis_open(this, '', '[URL]', '[TITLE]')\" onmouseout=\"addthis_close()\" onclick=\"return addthis_sendto()\"><img src=\"http://trans5.convertlanguage.com/img/astm/ES_109238.gif\" width=\"83\" height=\"16\" alt=\"Favoritos y recurso compartido\" style=\"border:0\"/></a></td>");


	document.write("</tr></table></td><td id=\"cart\">" +
		"<a href=\"http://www.astm.org/STORE/showcart.html\"><img src=\"http://trans5.convertlanguage.com/img/astm/ES_23433.gif\" border=\"0\" alt=\"Ver carrito de compras\" title=\"Ver carrito de compras\"></a>" +
		"</td></tr></table>");
}





//Draw digital library head/tabs
function DrawDigiLib_Old(special) {
	document.write("<div><img src=\"http://trans5.convertlanguage.com/img/astm/ES_113525.jpg\" /></div>");
	document.write("<div id=\"dl_tabs\" class=\"dl_hl_" + special +"\">");

	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_home\"><a id=\"dl_tab_home\" href=\"http://www.astm.org/DIGITAL_LIBRARY/index.shtml\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_journals\"><a id=\"dl_tab_journals\" href=\"http://www.astm.org/DIGITAL_LIBRARY/JOURNALS/index.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_stps\"><a id=\"dl_tab_stps\" href=\"http://www.astm.org/DIGITAL_LIBRARY/STP/stp_toclist.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_mnls\"><a id=\"dl_tab_mnls\" href=\"http://www.astm.org/DIGITAL_LIBRARY/MNL/mnl_toclist.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_topics\"><a id=\"dl_tab_topics\" href=\"http://www.astm.org/DIGITAL_LIBRARY/TOPICS/topics_toclist.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_subs\"><a id=\"dl_tab_subs\" href=\"http://www.astm.org/DIGITAL_LIBRARY/SUBSCRIPTIONS/index.html\"></a></div>");


	document.write("<div id=\"end_shadow\"></div><div style=\"clear:both;\"></div></div>");

}


function DrawDigiLib(special) {
	document.write("<div><img src=\"http://www.astm.org/IMAGES03/dl_tech_banner.jpg\" /></div>");
	document.write("<div id=\"dl_tabs\" class=\"dl_hl_" + special +"\">");

	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_home\"><a id=\"dl_tab_home\" href=\"http://www.astm.org/DIGITAL_LIBRARY/index.shtml\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_mystan\"><a id=\"dl_tab_mystan\" href=\"http://trans5.convertlanguage.com/astm/enes/24/_www_astm_org/Standard/index.shtml?complete\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_journals\"><a id=\"dl_tab_journals\" href=\"http://www.astm.org/DIGITAL_LIBRARY/JOURNALS/index.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_stps\"><a id=\"dl_tab_stps\" href=\"http://www.astm.org/DIGITAL_LIBRARY/STP/stp_toclist.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_mnls\"><a id=\"dl_tab_mnls\" href=\"http://www.astm.org/DIGITAL_LIBRARY/MNL/mnl_toclist.htm\"></a></div>");
	document.write("<div class=\"dl_wrap\" id=\"dl_wrap_subs\"><a id=\"dl_tab_subs\" href=\"http://www.astm.org/DIGITAL_LIBRARY/SUBSCRIPTIONS/index.html\"></a></div>");


	document.write("<div id=\"end_shadow\"></div><div style=\"clear:both;\"></div></div>");

}

