// script to open links in new windows, except for this domain.
var excludedomains=["audioplayerinformer.com|google.com|localhost"]
var auto=1

var excludedomains=excludedomains.join("|")
rexcludedomains=new RegExp(excludedomains, "i")

function dynamiclink(){
if (auto||(!auto&&document.targetmain.targetnew.checked)){
for (i=0; i<=(document.links.length-1); i++) {
if (document.links[i].hostname.search(rexcludedomains)==-1&&document.links[i].href.indexOf("http:")!=-1)
document.links[i].target="_blank"
}
}
else
for (i=0; i<=(document.links.length-1); i++) {
if (document.links[i].hostname.indexOf(mydomain)==-1)
document.links[i].target=""
}
}


// Emailscript version 5 for hiding adresses for e-mail robots
var dom_ = new Array()
dom = "enwtrogkaesropt";
dom_[0] = ".com";
var mt_ = "mailto:";
var sa_ = "@";
var p_ = ".";

function mailin(name, tl, params)
{
	var s = eo(name,dom,tl);
	document.write('<a href="'+mt_+s+dom_[0]+'">'+params+'</a>');
}

function eo(name, dom, tl)
{
	var s = name+sa_;
	if (tl!=-2)
	{
		s+= dom;
		if (tl>=0)
			s+= p_+tld_[tl];
	}
	else
		s+= swapperin(dom);
	return s;
}
function swapperin(d)
{
	var s = "";
	for (var i=0; i<d.length; i+=2)
		if (i+1==d.length)
			s+= d.charAt(i)
		else
			s+= d.charAt(i+1)+d.charAt(i);
	return s.replace(/\?/g,'.');
}


// script that sets elements to equal height
function P7_colH2()
{
var i,oh,h=0,tg,el,np,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){ for(i=1;i<dA.length;i+=2){dA[i+1].style.paddingBottom='';}for(i=1;i<dA.length;i+=2){ oh=dA[i].offsetHeight;h=(oh>h)?oh:h;}for(i=1;i<dA.length;i+=2){oh=dA[i].offsetHeight; if(oh<h){np=h-oh;if(!an&&dA[0]==1){P7_eqA2(dA[i+1].id,0,np);}else{ dA[i+1].style.paddingBottom=np+"px";}}}document.p7eqa=1; document.p7eqth=document.body.offsetHeight; document.p7eqtw=document.body.offsetWidth;}
}

function P7_eqT2()
{
if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){P7_colH2();}
}

function P7_equalCols2()
{
var c,e,el;if(document.getElementById){document.p7eqc=new Array(); document.p7eqc[0]=arguments[0];for(i=1;i<arguments.length;i+=2){el=null; c=document.getElementById(arguments[i]);if(c){e=c.getElementsByTagName(arguments[i+1]); if(e){el=e[e.length-1];if(!el.id){el.id="p7eq"+i;}}}if(c&&el){ document.p7eqc[document.p7eqc.length]=c;document.p7eqc[document.p7eqc.length]=el}} setInterval("P7_eqT2()",10);}
}

function P7_eqA2(el,p,pt)
{
var sp=10,inc=20,g=document.getElementById(el);np=(p>=pt)?pt:p; g.style.paddingBottom=np+"px";if(np<pt){np+=inc; setTimeout("P7_eqA2('"+el+"',"+np+","+pt+")",sp);}
}


// rating script
function fAJAXRequest( sTargetID , sURL , sPost , sWait , sError )
{
	var e = document.getElementById( sTargetID );

	if( e )
	{
		if( sWait != "" )
			e.innerHTML = sWait;

		new oAJAXRequest( e , sURL , sPost , sError );
	}
}

function fAJAXStateChange( hAJAXRequest )
{
	if( hAJAXRequest && hAJAXRequest.mRequest && hAJAXRequest.mRequest.readyState == 4 )
	{
		var s = hAJAXRequest.mRequest.responseText;
		//DEBUG: alert( s );

		if( hAJAXRequest.mRequest.status == "200" && s.substr(0,3) == "200" )
		{
			hAJAXRequest.mhTarget.innerHTML = s.substring(4);
		}
		else
		if( hAJAXRequest.msError != "" )
		{
			hAJAXRequest.mhTarget.innerHTML = hAJAXRequest.msError;
		}
	}
}

function oAJAXRequest( hTarget , sURL , sPost , sError )
{
	var me = this;
	this.mRequest	= null;
	this.mhTarget	= hTarget;
	this.msError	= sError;

	//do NOT use try{}catch as it is not supported in very old browsers and the script will not compile
	if( window.XMLHttpRequest )	//FF,NS,OP,IE7
	{
		this.mRequest = new XMLHttpRequest();
	}
	else
	if( window.ActiveXObject )	//IE5 & 6
	{
		this.mRequest = new ActiveXObject("Microsoft.XMLHTTP");
	}

	if( this.mRequest )
	{
		if( sPost != "" )
		{
			this.mRequest.open( 'POST', sURL , true );
			this.mRequest.setRequestHeader('Content-type','application/x-www-form-urlencoded');
			this.mRequest.onreadystatechange = function(){ fAJAXStateChange(me); };
			this.mRequest.send( sPost );
		}
		else
		{
			this.mRequest.open( 'GET', sURL , true );
			this.mRequest.onreadystatechange = function(){ fAJAXStateChange(me); };
			this.mRequest.send( null );
		}
	}
}


// Hide status bar message
function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus


// Google Analytics
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-6975348-2");
pageTracker._trackPageview();
} catch(err) {}