// fuction to use target blank in xhtml strict
function transformExternalAnchors()
{
	var i,a,f,im;
	if ( document.getElementsByTagName )
	{

		a = document.getElementsByTagName("a");
		i = 0;

		// for using in normal href tag, you you have to add: rel="external"
		// example: <a href="http://affiliate.dptsportsgroup.com" rel="external">Affiliate program</a>
		for(i=0;i<a.length;i++)
		{
			if ( a[i].getAttribute('href') && ( a[i].getAttribute("rel")=="external" ) )
			{
				a[i].target = "_blank";
			}
		} // for

		f = document.getElementsByTagName("form");
		i = 0;

		// for using in forms, you have to add in the form tag: title="external"
		// example: 		<form action="#" id="frmId" title="external"></form>
		for(i=0;i<f.length;i++)
		{
			if ( f[i].getAttribute('action') && ( f[i].getAttribute("title")=="external" ) )
			{
				f[i].target = "_blank";
			}
		} // for

		im = document.getElementsByTagName("area");
		i = 0;

		// for using in image map areas, you have to add in the form tag: class="external"
		// example: 		<area alt="" href="http://www.domain.com/page.html" class="external" />
		for(i=0;i<im.length;i++)
		{
			if ( im[i].getAttribute('href') && ( im[i].getAttribute("class")=="external" ) )
			{
				im[i].target = "_blank";
			}
		} // for
	} // if
} // transformExternalAnchors

