﻿document.appendCss=function(url){var c=document.createElement('link');c.type='text/css';c.rel='stylesheet';c.href=''+url;document.getElementsByTagName('head')[0].appendChild(c);}
Array.prototype.removeAt=function(from,c){var to=c?(from+c-1):null;var rest=this.slice((to||from)+1||this.length);this.length=from<0?this.length+from:from;return this.push.apply(this,rest);}
Array.prototype.remove=function(e){for(var i=0;i<this.length;i++)if(this[i]==e)return this.removeAt(i,1);}
Array.prototype.indexOf=function(f){for(var i=0;i<this.length;i++)if((typeof f=='function'&&f(this[i]))||f==this[i])return i;return -1;}
Array.prototype.find=function(f){for(var i=0;i<this.length;i++)if((typeof f=='function'&&f(this[i]))||f==this[i])return this[i];return null;}
window.Ws=function(){};
Ws.$=function(e){if(typeof e=='string'){var fe=document.getElementsByName(e);if(fe&&fe.length>0)return fe[0];return document.getElementById(e);}return e;};
Ws.$target=function(e,tn){e=e||window.event;if (e.target&&e.target.nodeType==3)e.target=e.target.parentNode;else if(e.srcElement)e.target=e.srcElement;var ep=e.target;while(tn!=null&&ep!=null){if(ep.tagName==tn)return ep;ep=ep.parentNode;}return ep;};
Ws.$select=function(e){e=Ws.$(e);try{e.focus();e.select();}catch(ex){}};
Ws.$disable=function(e){e=Ws.$(e);if(!e||e._ws_dsl_a6547bc6hfd7schn7)return false;if(typeof e.disabled!='undefined')e.disabled=true;try{e.style.MozUserSelect='none';}catch(ex){};try{e.style.KhtmlUserSelect='none';}catch(ex){};e.unselectable='on';e.onselectstart=function(){return false;};return e._ws_dsl_a6547bc6hfd7schn7=1;};
Ws.$enable=function(e){e=Ws.$(e);if(!e||!e._ws_dsl_a6547bc6hfd7schn7)return false;if(typeof e.disabled!='undefined')e.disabled=false;try{e.style.MozUserSelect='';}catch(ex){};try{e.style.KhtmlUserSelect='';}catch(ex){};e.unselectable='off';e.onselectstart=function(){return true;};return e._ws_dsl_a6547bc6hfd7schn7=0;};
Ws.$attach=function(e,evname,func) {e=Ws.$(e);if(e.attachEvent)e.attachEvent('on'+evname,func);else if(e.addEventListener)e.addEventListener(evname,func,true);else e['on'+evname]=func;}
Ws.$callback=function(oncallback,context,data,url)
{	
	var x = null;
	var M = ['Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP'];
	
	if (typeof XMLHttpRequest != 'undefined') try { x = new XMLHttpRequest(); } catch (e) { x = null; }
	if (!x)
		for (var i = 0; i < M.length; i++)
		{
			try { x = new ActiveXObject(M[i]); }
			catch (e) { x = null; }
			if (x != null) break;
		}

	if (!x) return false;
	
	var _escape = function(s)
	{
		if (typeof(encodeURIComponent) == 'function')
			return encodeURIComponent(s);
		else
			return escape(s);
	};
	
	if (data == null && url == null && context != null)
	{
		data = context;
		context = null;
	}
	
	if (data == null) data = '';	
	var s = '';
	if (typeof(data) == 'string') s += data;
	else if (typeof(data) == 'object')
	{
		for(var item in data)
		{
			var value = data[item];
			if(typeof(value) != 'object')
			{
				if(s!='')s+='&';
				s += item+"="+_escape(value);
			}
			else
			{
				for(var prop in value)
				{
					var prop_value = value[prop];
					if(s!='')s+='&';
					s += prop+"="+_escape(prop_value);
				}
			}
		}
	}
	data = s;

	x.onreadystatechange = function()
	{
		if (x.readyState != 4)
			return;
		var txt = x.responseText.replace(/^\s+|\s+$/g, '');
		x.onreadystatechange = function() { };
		oncallback(txt, context);
		try { delete x; }
		catch (e) { }
	};
	
	if (url==null) url = ''+location;
	   
	x.open('POST', url.replace(/&amp;/g, '&'), true);
	x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	x.send(data);
	
	return true;
}
Ws.Key = {LEFT:37,UP:38,RIGHT:39,DOWN:40,ESC:27,ENTER:13,
	special: function(e)
	{			
		var evt = window.event || e;
		if (!evt) return {};
		
		var ctrlPressed = 0;
		var altPressed = 0;
		var shiftPressed = 0;
		
		if (Ws.Browser.Browser=='Netscape'&&Ws.Browser.Version<=4)
		{
			var mString = (e.modifiers+32).toString(2).substring(3,6);
			shiftPressed = (mString.charAt(0)=='1');
			ctrlPressed = (mString.charAt(1)=='1');
			altPressed  = (mString.charAt(2)=='1');
		}
		else
		{
			shiftPressed = evt.shiftKey;
			altPressed  = evt.altKey;
			ctrlPressed = evt.ctrlKey;
		}
		
		return { 'ctrl':ctrlPressed,'alt':altPressed,'shift':shiftPressed };
	}
}
Ws.Img = {
	Instances: [],
	preload: function(url)
	{
		if (typeof url == typeof [])
		{
			for(var i=0;i<url.length;i++)
				this.preload(url[i]);
			return;
		}
		for(var i=0;i<Ws.Img.Instances.length;i++)
		{
			if(Ws.Img.Instances[i].src==url)
				return Ws.Img.Instances[i];
		}
		var img = new Image();
		img.src = url;
		Ws.Img.Instances[Ws.Img.Instances.length] = img;
		return img;
	}
}
Ws.Browser = {
	init: function()
	{
		var _db=function(s,ss,i,v,p){return{string:s,subString:ss,identity:i,versionSearch:v,prop:p}}
		var dataBrowser = [
			_db(navigator.userAgent,'Chrome','Chrome'),
			_db(navigator.userAgent,'OmniWeb','OmniWeb','OmniWeb/'),
			_db(navigator.vendor,'Apple','Safari','Version'),
			_db(null,null,'Opera',null,window.opera),
			_db(navigator.vendor,'iCab','iCab'),
			_db(navigator.vendor,'KDE','Konqueror'),
			_db(navigator.userAgent,'Firefox','Firefox'),
			_db(navigator.vendor,'Camino','Camino'),
			_db(navigator.userAgent,'Netscape','Netscape'),
			_db(navigator.userAgent,'MSIE','Explorer','MSIE'),
			_db(navigator.userAgent,'Gecko','Mozilla','rv'),
			_db(navigator.userAgent,'Mozilla','Netscape','Mozilla')
		];
		var _do=function(s,ss,i){return{string:s,subString:ss,identity:i}}
		var dataOS = [_do(navigator.platform,'Win','Windows'),_do(navigator.platform,'Mac','Mac'),_do(navigator.platform,'iPhone','iPhone/iPod'),_do(navigator.platform,'Linux','Linux')];
		var _ss = function (data)
		{
			for (var i=0;i<data.length;i++)
			{
				var s = data[i].string;
				var p = data[i].prop;
				var v = data[i].versionSearch || data[i].identity;
				if (s)
				{
					if (s.indexOf(data[i].subString) != -1)
						return {'i':data[i].identity,'v':v};
				}
				else if (p)
					return {'i':data[i].identity,'v':v};
			}
		}
		var _sv = function (data,v)
		{
			var index = data.indexOf(v);
			if (index == -1) return;
			return parseFloat(data.substring(index + v.length + 1));
		}		
		var b = _ss(dataBrowser);
		this.Browser = b.i || 'unknown browser';
		this.Version = _sv(navigator.userAgent, b.v) || _sv(navigator.appVersion, b.v);
		if(this.Version)this.Version=parseFloat(this.Version);
		this.OS = _ss(dataOS).i || 'unknown OS';
	}
};
Ws.Browser.init();
Ws.$popup=function(e,html,params)
{
	var isIE6=(Ws.Browser.Browser=='Explorer'&&Ws.Browser.Version<7);

	if (!Ws.$popup.handler)
	{
		Ws.$popup.handler = true;
		Ws.$popup.Instances=[];
		Ws.$popup._ie6fix=function(c)
		{
			// overlay selects
			if (isIE6)
			{
				var f=''+c.innerHTML;
				if(f.substr(0, 7).toUpperCase()!='<IFRAME')
					c._innerHTMLie6frame=f;
				f='<iframe style="position:absolute;z-index:-1;filter:mask();border:0;margin:0;padding:0;top:0;left:0;width:'+c.style.width+';height:'+c.style.height+';overflow:hidden;"></iframe>';
				c.innerHTML=c._innerHTMLie6frame+f;
			}
		}
		Ws.$attach((document.all?document:window),'mouseup',function(ev){
			var evt = ev?ev:event;
			var elm = evt.srcElement?evt.srcElement:evt.target;
			var eParent = elm;
			while(eParent!=null)
			{
				if(eParent.WsPopupParent!=null) return;
				eParent=eParent.parentNode;
			}
			for(var i=Ws.$popup.Instances.length-1;i>=0;i--)
			{
				var c=Ws.$popup.Instances[i];
				if (c&&c.params&&c.params.clickHide)
					c.hide();
			}
		});
	}

	if (!params) params = {};
	var k, def = {pos:0,shadow:1,zIndex:12093,maxWidth:0,maxHeight:0,clickHide:1,align:0,minWidth:0,selectable:0};
	for (k in def)
	{
		if (typeof(params[k]) != typeof(def[k]))
			params[k] = def[k];
	}
	
	e=Ws.$(e);
	if (!e.WsPopupContainer)
	{
		var c = document.createElement('DIV');
		c.style.position = 'absolute';
		c.style.overflow = 'hidden';
		c.style.display = 'none';
		c.style.left = '-4000px';
		c.style.top = '-4000px';
		c.style.width = '1px';
		c.style.height = '1px';
		c.style.backgroundColor = '#fff';
		if(!params.selectable)Ws.$deselect(c);
		c.WsPopupParent = e;
		c.hide = function(){if(this.style.display=='none')return false;this.scrollTop=0;this.style.display='none';if(this.sc)this.sc.style.display='none';return true;};
		c.show = function(){Ws.$popup(this.paramsE,null,this.params);};
		c.setHTML=function(html){this.innerHTML=html;Ws.$popup._ie6fix(this);};
		e.WsPopupContainer = c;
		document.body.insertBefore(c, document.body.firstChild);				
		Ws.$popup.Instances[Ws.$popup.Instances.length]=c;
	}
	
	var c = e.WsPopupContainer;	
	if(html!=null||c.paramsE==null)
	{
		c.scrollTop = 0;
		c.style.visibility = 'hidden';
		c.style.left = '-4000px';
		c.style.top = '-4000px';
		c.style.zIndex = 0;
		c.style.width = '1px';
		c.style.height = '1px';
		c.innerHTML = html;
		c.params = params;
		c.paramsE = e;
	}
	else
	{	
		c.style.visibility = 'hidden';
		c.style.left = '-4000px';
		c.style.top = '-4000px';
	}
	if(params.minWidth>0)
		c.style.width=params.minWidth+'px';
	c.style.display = 'block';	
	
	var p_dim = function(e,wh)
	{
		var d = (wh?e.offsetWidth:e.offsetHeight);
		if (e.childNodes&&e.childNodes.length>0)
		{
			e=e.childNodes[0];
			var d2 = (wh?e.offsetWidth:e.offsetHeight);
			if (d2>d) d=d2;
		}
		return d;
	}
		
	var cx=p_dim(c.childNodes[0],1);
	if(cx<params.minWidth)cx=params.minWidth;
	c.style.height = p_dim(c.childNodes[0],0)+'px';	
	c.style.width = cx+'px';
	var bAutoWidth = false;
	
	// adjust height
	if (params.maxHeight==-1)
	{
		var minHeight = e.offsetHeight;
		if (c.childNodes[0].offsetHeight<minHeight)
			c.style.height = minHeight+'px';
	}
	else if (params.maxHeight>0&&params.maxHeight<c.childNodes[0].offsetHeight)
	{
		c.style.overflowY = 'scroll';
		c.style.height = params.maxHeight+'px';
		c.style.width = 'auto';
		bAutoWidth = true;
	}
	else
		c.style.overflowY = '';
		
	// adjust width
	if (params.maxWidth==-1&&!bAutoWidth)
	{
		var minWidth = e.offsetWidth;
		if (c.childNodes[0].offsetWidth<minWidth)
			c.style.width = minWidth+'px';
	}
	
	// shadow	
	var fPNG=function(src,vh){return 'background:url('+src+') '+vh;};
	var sc = document.createElement('DIV');
	sc.style.position = 'absolute';
	sc.style.overflow = 'hidden';
	sc.style.display = 'none';
	sc.style.left = '-4000px';
	sc.style.top = '-4000px';
	sc.style.width = '1px';
	sc.style.height = '1px';
	if(isIE6)
		sc.innerHTML='<div style="margin:4px 0px 0px 4px;width:4px;height:4px;filter:progid:DXImageTransform.Microsoft.Glow(color=#CCCCCC, strength=3)"></div>';
	else
		sc.innerHTML = '<div style="width:4px;height:4px;overflow:hidden"><div style="width:4px;height:4px;'+fPNG(Ws.$popup.s.tr,'no-repeat')+'"></div></div>'
		+ '<div style="width:4px;height:4px;clear:both;'+fPNG(Ws.$popup.s.r,'repeat-y')+'"></div>'
		+ '<div style="width:15px;height:4px;float:left;clear:both;'+fPNG(Ws.$popup.s.bl,'no-repeat')+'"></div>'
		+ '<div style="width:4px;height:4px;float:left"><div style="background:#fff;height:4px;'+fPNG(Ws.$popup.s.b,'repeat-x')+'"></div></div>'
		+ '<div style="width:4px;height:4px;float:left;'+fPNG(Ws.$popup.s.br,'no-repeat')+'"></div>';
	sc.WsPopupDiv = c;
	c.sc = sc;
	document.body.insertBefore(sc, document.body.firstChild);
	
	// params.pos: 0-auto(below or above based on the scroll pos),1-below,2-above,4-left,8-right,15-overlay)
	var sr=Ws.$popup.sr(e);
	var x = sr.x, y = sr.y;
	
	// overlay
	if (params.pos==15)
	{
		// get the scroll pos
		var scroll=Ws.$popup.sp();
				
		// align at center
		y = scroll.y + (scroll.cy - c.offsetHeight) / 2;
		x = scroll.x + (scroll.cx - c.offsetWidth) / 2;
		y-=24;if(y<0)y=0;if(x<0)x=0;	
	}
	else if (params.pos!=0)
	{
		if ((params.pos&1)==1) y += e.offsetHeight;
		if ((params.pos&8)==8) x += e.offsetWidth;
	}	
	else
	{	
		y += e.offsetHeight;
		var scroll=Ws.$popup.sp();

		var cy = e.offsetHeight;
		if (y + c.offsetHeight > scroll.y + scroll.cy)
		{
			var ny = y - (cy + c.offsetHeight);
			if (params.align==1)ny+=e.offsetHeight;
			if (ny >= 0) y = ny;
			else if (params.align==1)y-=e.offsetHeight;
		}
		else if (params.align==1)y-=e.offsetHeight
		if (params.align==1)
			x += e.offsetWidth + 4;
	}
	
	// 101 bottom but rtl
	if (params.align==101)
	{
		x-=(c.offsetWidth-e.offsetWidth-2);
	}
	
	if (c.sc)
	{
		// 5 divs
		if(isIE6)
		{
			var s=c.sc.childNodes[0].style;
			s.width=(c.offsetWidth-7)+'px';
			s.height=(c.offsetHeight-7)+'px';
			s.backgroundColor='#FFF';
		}
		else
		{
			c.sc.childNodes[0].style.marginLeft=c.offsetWidth+'px';
			c.sc.childNodes[1].style.marginLeft=c.offsetWidth+'px';
			c.sc.childNodes[1].style.height=(c.offsetHeight-4)+'px';
			c.sc.childNodes[3].style.width=(c.offsetWidth-15)+'px';
		}
		
		c.sc.style.zIndex = params.zIndex - 1;
		c.sc.style.left = x+'px';
		c.sc.style.top = y+'px';
		
		c.sc.style.width=(c.offsetWidth+4)+'px';
		c.sc.style.height=(c.offsetHeight+4)+'px';
		c.sc.style.display = 'block';	
		c.sc.style.visibility = 'visible';
	}
	
	// overlay activeX in IE6
	if(isIE6)Ws.$popup._ie6fix(c);
	
	c.style.zIndex = params.zIndex;
	c.style.left = x+'px';
	c.style.top = y+'px';
	c.style.display = 'block';
	c.style.visibility = 'visible';	
	
	return c;
}
Ws.$popup.s = {
	b:Ws.Img.preload('js/sb.png').src,
	bl:Ws.Img.preload('js/sbl.png').src,
	br:Ws.Img.preload('js/sbr.png').src,
	tr:Ws.Img.preload('js/str.png').src,
	r:Ws.Img.preload('js/sr.png').src
};
Ws.$popup.sp = function() {
	var scroll_cy = 0;
	if (self.innerHeight) scroll_cy = self.innerHeight;
	else if (document.documentElement&&document.documentElement.clientHeight) scroll_cy = document.documentElement.clientHeight;
	else if (document.body) scroll_cy = document.body.scrollHeight;

	var scroll_y = 0;
	if (window.pageYOffset) scroll_y = window.pageYOffset;
	else if (document.documentElement&&document.documentElement.scrollTop) scroll_y = document.documentElement.scrollTop;
	else if (document.body) scroll_y = document.body.scrollTop;
	else if (window.scrollTop) scroll_y = window.scrollTop;
	
	var scroll_cx = 0;
	if (self.innerWidth) scroll_cx = self.innerWidth;
	else if (document.documentElement&&document.documentElement.clientWidth) scroll_cx = document.documentElement.clientWidth;
	else if (document.body) scroll_cx = document.body.scrollWidth;

	var scroll_x = 0;
	if (window.pageXOffset) scroll_x = window.pageXOffset;
	else if (document.documentElement&&document.documentElement.scrollLeft) scroll_x = document.documentElement.scrollLeft;
	else if (document.body) scroll_x = document.body.scrollLeft;
	
	return {cx:scroll_cx,cy:scroll_cy,x:scroll_x,y:scroll_y};
}
Ws.$popup.sr=function(e)
{
	e=Ws.$(e);
	var x=0, y=0, ep=e;
	while (ep!=null)
	{
		x += ep.offsetLeft;
		y += ep.offsetTop;
		ep = ep.offsetParent;
	}
	return {'x':x,'y':y,cx:e.offsetWidth,cy:e.offsetHeight};
}
Ws.Drag={
	_dragObject:null,
	_mpos:function(e){e=e||window.event;if(e.pageX||e.pageY)return{x:e.pageX,y:e.pageY};else return{x:e.clientX+document.body.scrollLeft-document.body.clientLeft,y:e.clientY+document.body.scrollTop-document.body.clientTop};},
	_pos:function(e){var x=0,y=0;while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent;}return{'x':x,'y':y};},
	_offset:function(e,ep){var m=Ws.Drag._mpos(e);var e=Ws.Drag._pos(ep||e.target);return{'x':m.x-e.x,'y':m.y-e.y};},
	_init:function()
	{
		Ws.$attach(document,'mousemove',function(e){
			if(Ws.Drag._dragObject&&typeof Ws.Drag._dragObject._dragTo=='function')
				Ws.Drag._dragObject._dragTo(Ws.Drag._dragObject,Ws.Drag._mpos(e));
		});
		Ws.$attach(document,'mouseup',function(e){
			try
			{
				if(Ws.Drag._dragObject&&typeof Ws.Drag._dragObject._dragEnd=='function')
					Ws.Drag._dragObject._dragEnd(Ws.Drag._dragObject,Ws.Drag._mpos(e));
			}
			finally { Ws.Drag._dragObject=null; }
		});
	},
	Add:function(e,dragInit,dragTo,dragEnd)
	{
		e=Ws.$(e);
		if(e._dragCk==1)return;
		if(Ws.Drag._init!=null)
		{
			Ws.Drag._init();
			Ws.Drag._init=null;
		}
		e._dragInit=dragInit;
		e._dragTo=dragTo;
		e._dragEnd=dragEnd;
		e._dragCk=1;
		Ws.$deselect(e);
		Ws.$attach(e,'mousedown',function(e) {
			e=e||window.event;
			if (e.target&&e.target.nodeType==3)e.target=e.target.parentNode;
			else if (e.srcElement)e.target=e.srcElement;
			
			var ep = e.target;
			while(ep&&!ep._dragCk)ep=ep.parentNode;
			if(!ep) return;
			
			ep._dragOffset=Ws.Drag._offset(e,ep);				
			Ws.Drag._dragObject=ep;
			if(typeof ep._dragInit=='function')
				if(!ep._dragInit(ep,Ws.Drag._mpos(e)))
					Ws.Drag._dragObject=null;
		});
	}
};

// enhanced string manipulation
String.prototype.trim=function(){return this.replace(/^[\s]+|[\s]+$/g,'');}
String.prototype.normalize=function(){var bs='áâãäåāăąǎǻćĉċčďđèéêëēĕėęěĝğġģħìíîïĩīĭįıǐĵĺļľŀłñńņňŉŋòóôõöøōŏőǒŕŗřśŝşšţťŧùúûüũūŭůűųǔǖǘǚǜŵýÿŷźżžÁÂÃÄÅĀĂĄǍǻĆĈĊČĎĐÈÉÊËĒĔĖĘĚĜĞĠĢĦÌÍÎÏĨĪĬĮIǏĴĹĻĽĿŁÑŃŅŇŉŊÒÓÔÕÖØŌŎŐǑŔŖŘŚŜŞŠŢŤŦÙÚÛÜŨŪŬŮŰŲǓǕǗǙǛŴÝŸŶŹŻŽ';var br='aaaaaaaaaaccccddeeeeeeeeegggghiiiiiiiiiijlllllnnnnnnoooooooooorrrsssstttuuuuuuuuuuuuuuuwyyyzzzAAAAAAAAAaCCCCDDEEEEEEEEEGGGGHIIIIIIIIIIJLLLLLNNNNNNOOOOOOOOOORRRSSSSTTTUUUUUUUUUUUUUUUWYYYZZZ';var s='';for(var i=0;i<this.length;i++){var j=bs.indexOf(this.charAt(i));s+=(j!=-1?br.charAt(j):this.charAt(i));}return s;}
String.prototype.htmlEscape=function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}
String.prototype.htmlAttributeEscape=function(){return this.htmlEscape().replace(/"/g,'&quot;').replace(/'/g,'&#039;');}
String.prototype.jsEscape=function()
{
	var s = '';
	for(var i=0;i<this.length;i++)
	{
		var c=this.charAt(i);
		switch (c)
		{
			case '"':s+='\\x22';break;
			case '&':s+='\\x26';break;
			case '\'':s+='\\x27';break;
			case '-':s+='\\x2d';break;
			case '<':s+='\\x3c';break;
			case '>':s+='\\x3e';break;
			case '\t':s+='\\t';break;
			case '\r':s+='\\r';break;
			case '\n':s+='\\n';break;
			case '\\':s+='\\\\';break;
			default:s+=c;break;
		}
	}
	return s;
}
String.prototype.mark=function(p,cs,cn)
{
	var b=this.normalize();
	p=p.normalize();
	if (!cs)
	{
		b=b.toLowerCase();
		p=p.toLowerCase();
	}
	var i = b.indexOf(p);
	if(i==-1)return this.htmlEscape();
	return this.substr(0,i).htmlEscape()
		+'<b'+(cn?' class="'+cn+'"':'')+'>'
		+this.substr(i,p.length).htmlEscape()
		+'</b>'
		+this.substr(i+p.length,this.length).htmlEscape();
}
String.prototype.toHandler=function()
{
	var h = '', cPrev = 0, cLast = '', v=this.normalize();
	for(var i=0;i<v.length;i++)
	{
		var c = v.charAt(i);
		if ((c>='0'&&c<='9')||(c>='A'&&c<='Z')||(c>='a'&&c<='z'))
		{
			if (cLast!='')
			{
				h += cLast;
				cLast = '';
			}
			h += c;
			cPrev = c;
		}
		else if (c==' '||c=='\t'||c=='\r'||c=='\n')
		{
			c = '-';
			if (c!=cPrev) cLast = c;
			cPrev = c;
		}
	}
	return h.toLowerCase();
}
