// Copyright (c) 2002 by IBM Corporation

if (typeof debug_sa == "undefined"){var debug_sa=false;}

function SurfAidLog(u){
sa_gif    = "//stats.www.ibm.com/rc/images/uc.GIF";
sa_ver    = "1.12";
s9="";sh="";sg="sauid";s2="sasid";sk="SESSION_ID";s5=document;sd="undefined";
if((typeof(SA_ID)!=sd)&&(SA_ID!=null)){
		var s6=SA_ID.split(';');
		s9=s6[0];
		sh=s6[1];
}
sf=new Date();
s4=Math.random().toString().substring(2,10)+sf.getTime().toString();
sc=s5.cookie;
sa="U"+s4;
s5.cookie=sg+"="+sa+";path=/;expires="+(new Date(2010,0)).toGMTString();
sa=(s5.cookie.indexOf(sg)==-1)?"":"1";
se="S"+s4;
s5.cookie=s2+"="+se+";path=/";
se=(s5.cookie.indexOf(s2)==-1)?"":"1";
if(sa=="1"){
	s5.cookie=sg+"="+"U"+s4+";path=/;expires="+(new Date(2000,0)).toGMTString();
}
if(se=="1"){
	s5.cookie=s2+"="+"S"+s4+";path=/;expires="+(new Date(2000,0)).toGMTString();
	if((sb=s5.cookie.indexOf(sk))!=-1){
		s3=sb+sk.length+1;s8=sc.indexOf(";",s3);
		if(s8==-1)s8=sc.length;
		se=escape(sc.substring(s3,s8));
	}
}
si=(typeof(screen)==sd||screen==null)?'0x0x0':screen.colorDepth+"x"+screen.width+"x"+screen.height;
s1="?"+sa_ver+"&"+escape(s9)+"&"+escape(sh)+"&"+escape(u)+"&"+escape(s5.referrer)+"&"+((location==s5.URL)?"":escape(s5.URL))+"&"+se+"&"+sa+"&"+sf.getTimezoneOffset()+"&"+si+"&"+s5.images.length.toString()+"&"+((typeof(SA_Title)==sd||SA_Title==null)?"":escape(SA_Title))+"&"+((typeof(SA_Message)==sd||SA_Message==null)?"":escape(SA_Message))+"&"+s4;
if(typeof(s5.s7)==sd||s5.s7==null){
	s5.s7=new Image();
}
s5.s7.src=sa_gif+s1;
//alert(u);
}

function SALogSimple(obj){
	var caller=location.href;
	var callee=obj.href;
	var new_href=caller+"_click_"+callee;
	if (debug_sa){alert("caller: "+caller+"; callee: "+callee+"; new href: "+new_href);}
	SurfAidLog(new_href);
}
