var browserName=navigator.appName;
var browserAgent=navigator.userAgent;
if (browserAgent.indexOf('Safari')>0) {
	document.write("<link rel=stylesheet type=text/css href=css/default.saf.css>");
}
if (browserName=="Netscape" || browserName=="Opera") {
	document.write("<link rel=stylesheet type=text/css href=css/default.ff2.css>");
}
if (navigator.appVersion.indexOf("MSIE 6.") < 20 && browserName == 'Microsoft Internet Explorer') {
	document.write("<link rel=stylesheet type=text/css href=css/default.ie6.css>");
}

window.onload = function() {
if (navigator.appVersion.indexOf("MSIE")!=-1) {
	var field = document.getElementsByTagName("input");
	for(var i = 0; i < field.length; i++) {
		if (field[i].type == "text" || field[i].type == "password") {
			field[i].onfocus = function() {
		 		this.className += " focus";
		  };
		  field[i].onblur = function() {
		  	this.className = this.className.replace(/\bfocus\b/, "");
		  };
		};
	};
	field = null;
	};
	MM_preloadImages('images/btn_back_over.gif','images/btn_menu_over.gif','images/btn_next_over.gif')
};

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function getFileName() {
	var currStr;
	currStr = document.location.href;
	currStr = currStr.substring(currStr.lastIndexOf('/')+1,currStr.length);
	return currStr;
}

function writeHeader(currName,breadCrumb) {

	var showTrail = ''
	var showHomeTrail = ''
	if (currName) {
		showTrail = ' > ';
	}
	if (currName || breadCrumb) {
		showHomeTrail = ' > ';
	}
	var recodeBreadCrumb = breadCrumb
	if (recodeBreadCrumb) {
		recodeBreadCrumb = recodeBreadCrumb.replace(/&lt;/g,'<');
		recodeBreadCrumb = recodeBreadCrumb.replace(/&gt;/g,'>');
	}
	document.write('	<div id="sitewrap">')
	document.write('		<div id="masthead">')
	document.write('			<div id="banner"><img src="images/topbanner.gif" alt="CSA" width="785" height="98" /><div>')
	document.write('			<div id="nav_top">')
	document.write('				<img src="images/navbar_left.gif" width="16" height="16" align="left" style="margin-right:260px;" />')
	document.write('				<a href="default.asp">&nbsp;&nbsp; Home &nbsp;&nbsp;</a>|<a href="standards.html">&nbsp;&nbsp; A World of Safety &amp; Standards &nbsp;&nbsp;</a>|<a href="csa_marks.html">&nbsp;&nbsp; CSA Marks &nbsp;&nbsp;</a>|<a href="tips.html">&nbsp;&nbsp; Safety Tips &nbsp;&nbsp;</a>|<a href="forkids.html">&nbsp;&nbsp; Just For Kids &nbsp;</a>')
	document.write('			</div>')
	document.write('			<div id="rightcap"><img src="images/navbar_right.gif" width="17" height="112" /></div>')
	document.write('			<div id="subbanner"><img src="images/under_navbar.gif" width="785" height="20" /></div>')
	document.write('			<div id="breadcrumb"><div style="float:left;"><a href="/consumers/consumer_site/">Home</a> ' + showHomeTrail + '&nbsp;</div><div id="breadcrumb_host">' + recodeBreadCrumb + showTrail + ' <a href="/consumers/consumer_site/' + getFileName() + '">' + currName + '</a></div></div>')
	document.write('		</div>')
	document.write('		<div id="container_content">')
	document.write('			<div id="nav_side">')
	document.write('				<div id="top">')
	document.write('					<div id="a1">&nbsp;</div>')
	document.write('					<div id="b1">&nbsp;</div>')
	document.write('					<div id="b2">&nbsp;</div>')
	document.write('					<div id="c1">&nbsp;</div>')
	document.write('				</div>')
	document.write('				<div id="header">Safety Tips</div>')
	document.write('				<div id="links">')
	document.write('		      <b>Around the Home</b><br />')
	document.write('		      <a href="tips01.html">Basement and garage</a><br />')
	document.write('		      <a href="tips02.html">Carbon monoxide detectors</a><br />')
	document.write('		      <a href="tips03.html">Ladders</a><br />')
	document.write('		      <a href="tips04.html">Power Lawnmowers</a><br />')
	document.write('		      <a href="tips05.html">Power tools</a><br />')
	document.write('		      <a href="tips06.html">Smoke alarms</a><br />')
	document.write('		      <a href="tips07.html">Space heaters</a><br />')
	document.write('		      <a href="tips08.html">Yard and handy work</a>')
	document.write('		      <p />')
	document.write('		      <b>Electrical</b><br />')
	document.write('		      <a href="tips09.html">Electrical cords</a><br />')
	document.write('		      <a href="tips10.html">Fuses and circuit breakers</a><br />')
	document.write('		      <a href="tips11.html">Decorative lighting</a>')
	document.write('		      <p />')
	document.write('		      <b>Seasonal</b><br />')
	document.write('		      <a href="tips21.html">Indoor holiday lighting</a><br />')
	document.write('		      <a href="tips22.html">Outdoor holiday lighting</a>')
	document.write('		      <p />')
	document.write('		      <b>Recreational</b><br />')
	document.write('		      <a href="tips15a.html">Bicycle helmets</a><br />')
	document.write('		      <a href="tips16.html">Boats and cottages</a><br />')
	document.write('		      <a href="tips18.html">Camping stoves and lanterns</a> <br />')
	document.write('		      <a href="tips19.html">Hockey helmets</a><br />')
	document.write('		      <a href="tips20.html">Outdoor gas barbecues</a>')
	document.write('		      <p />')
	document.write('		      <b>Lighting</b><br />')
	document.write('		      <a href="tips12.html">Halogen lights</a><br />')
	document.write('		      <a href="tips13.html">Work (trouble) lights</a><br />')
	document.write('		      <a href="tips11.html">Decorative lighting</a>')
	document.write('		      <p />')
	document.write('		      <b>Appliances</b><br />')
	//document.write('		      <a href="tips14.html">Gas barbecues</a><br />')
	document.write('		      <a href="tips15.html">Gas fireplaces</a><br />')
	document.write('		      <a href="tips17.html">Turkey fryers</a><br />')
	document.write('		      <p />')
	document.write('		      <a href="tips24.html"><b>Counterfeit Products</b></a><br />')
	document.write('		      <p />')
	
	document.write('		      <b><a href="GenericAd.pdf" target="_blank">Click here and get involved.</a></b>')
	document.write('		      <p />')
	document.write('		      <b><a href="CSA_SafetyTips_English_FInal.pdf" target="_blank">CSA Safety Tips Brochure</a></b>')
	document.write('		    </div>')
	document.write('				<div id="bottom">')
	document.write('					<div id="b2">&nbsp;</div>')
	document.write('					<div id="b1">&nbsp;</div>')
	document.write('					<div id="a1">&nbsp;</div>')
	document.write('				</div>')
	document.write('		  </div>')
	document.write('		  <div id="content">')
	document.write('		  	<div id="content_box">')
	document.write('					<div id="top">')
	document.write('						<div id="a1">&nbsp;</div>')
	document.write('						<div id="b1">&nbsp;</div>')
	document.write('						<div id="b2">&nbsp;</div>')
	document.write('						<div id="c1">&nbsp;</div>')
	document.write('					</div>')
	document.write('					<div id="copy">')
}

function writeFooter() {
	document.write('					</div>')
	document.write('					<div id="bottom">')
	document.write('						<div id="c1">&nbsp;</div>')
	document.write('						<div id="b2">&nbsp;</div>')
	document.write('						<div id="b1">&nbsp;</div>')
	document.write('						<div id="a1">&nbsp;</div>')
	document.write('					</div>')
	document.write('				</div>')
	document.write('				<br class="clearing" clear="all" />')
	document.write('			</div>')
	document.write('			<br class="clearing" clear="all" />')
	document.write('			<a href="http://checker.atrc.utoronto.ca/servlet/Checkacc?file=referer&amp;guide=wcag-2-0-aa"><img width="102" src="images/iconAA.png" height="32" alt="WCAG2 Level 2, check it with ATRC Accessibility Checker" align="absmiddle" /></a>')
	document.write('			<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" align="absmiddle" height="31" width="88" /></a>')
	document.write('			<a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-css2" alt="Valid CSS!" align="absmiddle" /></a>')
	document.write('		</div>')
	document.write('		<div id="footer">')
	document.write('		  <div id="copywright">')
	document.write('		  	Copyright &copy; 2005 Canadian Standards Association. <br />')
	document.write('		    All rights reserved.')
	document.write('		  </div>')
	document.write('		</div>')
	document.write('		</div>')
}

function writeNav(prv,main,nxt) {
document.write('	<div id="subnav">')
document.write('		<div id="previous"><a href="tips' + prv + '.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'back\',\'\',\'images/btn_back_over.gif\',1)"><img src="images/btn_back_out.gif" alt="Back to the previous safety tip" name="back" width="88" height="17" border="0" id="back" /></a></div>')
document.write('		<div id="main"><a href="tips' + main + '.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'tipsmenu\',\'\',\'images/btn_menu_over.gif\',1)"><img src="images/btn_menu_out.gif" alt="Back the main list of safety tips" name="tipsmenu" width="158" height="17" border="0" id="tipsmenu" /></a></div>')
document.write('		<div id="next"><a href="tips' + nxt + '.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'next\',\'\',\'images/btn_next_over.gif\',1)"><img src="images/btn_next_out.gif" alt="Next safety tip" name="next" width="88" height="17" border="0" id="next" /></a></div>')
document.write('	</div>')
document.write('	<br class="clearing" clear="all" />')
}

function writeStandardsNav(prv,main,nxt) {
document.write('	<div id="subnav">')
document.write('		<div id="previous"><a href="standards' + prv + '.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'back\',\'\',\'images/btn_back_over.gif\',1)"><img src="images/btn_back_out.gif" alt="Back to the previous safety tip" name="back" width="88" height="17" border="0" id="back" /></a></div>')
document.write('		<div id="next"><a href="standards' + nxt + '.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'next\',\'\',\'images/btn_next_over.gif\',1)"><img src="images/btn_next_out.gif" alt="Next safety tip" name="next" width="88" height="17" border="0" id="next" /></a></div>')
document.write('	</div>')
document.write('	<br class="clearing" clear="all" />')
}