function login(url){
	document.forms[0].action=url;
	document.forms[0].submit();
}
function loadScript(url){
	var script = document.createElement("script");
	script.setAttribute("src", url);
	script.setAttribute("type","text/javascript");
	script.setAttribute("language","javascript");
	document.head.appendChild(script);
	// document.head.removeChild(script);
	// return s;
}
function Counter(){
	var path = window.location.pathname;//window.location.href;
	var first =true;// !Cookie.read(path);
//	if(first){
//	   Cookie.write(path, '1', {duration: 1});
//	}
	this.url='http://220.231.15.1:2035/c/common/count.do?path='+path+(first?'1':'0');
	this.id;
}
Counter.prototype.setId = function(id){
	this.id=id;
}
Counter.prototype.load = function(){
	loadScript(this.id?(this.url+"&id="+this.id):this.url);
}
Counter.prototype.setCount = function(count){
	$(this.id).appendText(count);
}
var counter = new Counter();


