function cmsVS(){	
	var rUrl = document.referrer;	
	var sW = window.screen.width;	
	var sH = window.screen.height;	
	var bs = "";	
	var os="";  
	var agt=navigator.userAgent.toLowerCase();  
	var is_major = parseInt(navigator.appVersion);  
	var is_minor = parseFloat(navigator.appVersion);  
	var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1) && (agt.indexOf('safari')==-1));  
	var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));  
	var is_opera = (agt.indexOf("opera") != -1);
	var is_safari = (agt.indexOf("safari") != -1);
	if(is_nav){	
		bs = _checkBS(agt,"firefox/","Firefox");
	}else if(is_ie){
		bs = _checkBS(agt,"msie ","IE");
	}else if(is_opera){	
		bs = _checkBS(agt,"opera/","Opera");
	}else if(is_safari){
		bs = _checkBS(agt,"version/","Safari");
	}else{		
		bs = "Other Browser";	
	}
	var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );	
	var is_mac = (agt.indexOf("mac")!=-1);  
	var is_linux = (agt.indexOf("linux")!=-1);	
	var is_unix  = (agt.indexOf("x11")!=-1);	
	if(is_win){		
		if((agt.indexOf("win95")!=-1) || (agt.indexOf("windows 95")!=-1)){			
			os = "Windows 95";		
		}else if((agt.indexOf("win 9x 4.90")!=-1)){			
			os = "Windows Me";		
		}else if((agt.indexOf("windows nt 5.0")!=-1)){			
			os = "Windows 2000";		
		}else if((agt.indexOf("windows nt 5.1")!=-1)){			
			os = "Windows xp";	
		}else if((agt.indexOf("windows nt 5.2")!=-1)){
			os = "Windows 2003";
		}else if((agt.indexOf("windows nt 6.0")!=-1)){
			os = "Windows Vista";
		}else{          
			os = "Other Windows";      
		}	
	}else if(is_mac){		
		if((agt.indexOf("68k")!=-1) || (agt.indexOf("68000")!=-1)){			
			os = "Mac 68000";		
		}else if((agt.indexOf("ppc")!=-1) || (agt.indexOf("powerpc")!=-1)){			
			os = "Mac Power PC";		
		}else{          
			os = "Other Mac";      
		}	
	}else if(is_linux){		
		os = "Linux";	
	}else if(is_unix){		
		os = "Unit";	
	}else{		
		os = "Other OS";	
	} 

	var channelE = $('_channelSID'); 
	var channelSID = (channelE) ? channelE.value : "";  
	var pChannelE = $('_pChannelSID'); 
	var pChannelSID = (pChannelE) ? pChannelE.value : "";  
	var contentE = $('_contentSID'); 
	var contentSID = (contentE) ? contentE.value : ""; 	
	rUrl = escape(rUrl);	
	var sUrl = _contextPath + "/vs?stat=1&rUrl=" + rUrl + "&sW=" + sW + "&sH=" + sH + "&bs=" + bs + "&os=" + os + "&cSID=" + channelSID + "&pcSID=" + pChannelSID + "&contentSID=" + contentSID;	
	sUrl = encodeURI(sUrl);	
	sendVSInfo(sUrl);
} 
	
function _checkBS(agt,mark,browser){
	var index = agt.indexOf(mark);
	return (index != -1) ? (browser +" " + agt.charAt(index + mark.length)) : browser;
}

function sendVSInfo(url){  
	new Ajax.Request(url,{
		method: 'GET',
		onSuccess: function(transport){}
	});
}

cmsVS();
