addthis_options = 'google, twitter, live, favorites, reddit, delicious, studivz, meinvz, hellotxt, technorati, myspace, facebook, email, more';
addthis_brand = document.domain.replace("www.", "");
if (parent.frames.length > 0) top.location.replace(document.location);

function gallery_status () {
var F=document.links;
 for (i = 0; i < F.length; i++) {
	urlStart=F[i].href.lastIndexOf("http://");
	if ( urlStart > 1 ) {
		urlLen=F[i].href.length;
		urlString=F[i].href.substring(urlStart,urlLen);
		if ( urlString.indexOf("?") > -1) {
		 urlString = urlString.substring(0,urlString.indexOf("?")); }
		if ( urlString.indexOf("&") > -1) {
		 urlString = urlString.substring(0,urlString.indexOf("&")); } 
		F[i].realurl = F[i].href;
		F[i].showurl = urlString;
		F[i].href=F[i].showurl;
	} else if ( F[i].name.length > 0 ) {
		F[i].showurl = F[i].href;
		F[i].realurl = "/sr/out.php?l=" + F[i].name + "&u=scj/cgi/out.php?fc=1&p=75&link=thumbs&url=" + F[i].href;
//	} else if ( F[i].href.search(/\/(channels|tag)\//g) > -1 ) {
	} else if ( F[i].href.indexOf("/channels/") > -1 ) {
		var urlParts = F[i].href.substring(F[i].href.lastIndexOf("/channels/") + 10, F[i].href.length).split('/');
		channelName = urlParts[0];
		F[i].showurl = F[i].href;
		F[i].realurl = "/scj/cgi/out.php?p=100&link=" + channelName + "&url=" + F[i].href;
	} else if ( F[i].href.indexOf("/tag/") > -1 ) {
		F[i].showurl = F[i].href;
		F[i].realurl = "/scj/cgi/out.php?p=100&link=tags&url=" + F[i].href;
	}

	if ( F[i].showurl ) {
//		F[i].onclick = s1; 
		F[i].onmousedown = s1; 
		F[i].onmouseout = s0; 
		F[i].onblur = s0; 
	}
 }
}

function s1 () { 
  this.href=this.realurl;
  pageTracker._trackEvent('Click',this.showurl);
} 

function s0 () { 
  this.href=this.showurl;
} 
