// -------------------------------------------------------------------
// Affiliates (C) 2004-2009, Universal Class, Inc.
// -------------------------------------------------------------------

if ( !catid ) { catid = 'default'; }
//catid = 'default';
var rn=Math.floor(Math.random()*11983)
document.write('<script type="text/javascript" src="http://4uc.org/js/aff/'+catid+'.htm?i='+rn+'&catid='+catid+'&affid='+affid+'&adtype='+adtype+'&colorborder='+colorborder+'&colortitle='+colortitle+'&colorbackground='+colorbackground+'&colortext='+colortext+'&colorurl='+colorurl+'&dom='+urlencode(document.domain)+'&path='+urlencode(window.location.pathname)+'"></script>');

function urlencode(stext) {
if (stext) {
stext=escape(stext);
stext=replace(stext,"+", "%2B");
stext=replace(stext,"/", "%2F");
stext=replace(stext,".", "%2E");
return stext;
}
}
function replace(s, t, u) {
// Replace a token in a string
// s  string to be processed
// t  token to be found and removed
// u  token to be inserted
// returns new String
i = s.indexOf(t);
r = "";
if (i == -1) return s;
r += s.substring(0,i) + u;
if ( i + t.length < s.length)
r += replace(s.substring(i + t.length, s.length), t, u);
return r;
}
