
var CMF={showLB:function()
{var ss=this.getOrCreate('wrapperBlocker').style;ss.position='absolute';var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;if(window.innerHeight&&window.scrollMaxY)
{yWithScroll=window.innerHeight+window.scrollMaxY;xWithScroll=window.innerWidth+window.scrollMaxX;}
else if(document.body.scrollHeight>document.body.offsetHeight)
{yWithScroll=document.body.scrollHeight;xWithScroll=document.body.scrollWidth;}
else
{yWithScroll=document.body.offsetHeight;xWithScroll=document.body.offsetWidth;}
var top=(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;var diff=h-top-600;if(yWithScroll>h)
h=yWithScroll;if(xWithScroll>w)
w=xWithScroll;if(diff<0)
h=h-diff;ss.width=w+"px";ss.height=h+"px";ss.display='block';document.body.style.overflow='hidden';},closeLB:function()
{document.body.style.overflow='auto';this.setDisplay('wrapperBlocker','none');},setDisplay:function(fID,s)
{document.getElementById(fID).style.display=s;},getOrCreate:function(fID){var e=document.getElementById(fID);if(e==null){e=document.createElement('div');e.id=fID;document.body.appendChild(e);}
return e;}};if(!window.XMLHttpRequest)
XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP");};var AJAXLib={};AJAXLib.extend=function(){var target=arguments[0],a=1;if(arguments.length==1){target=this;a=0;}
var prop;while(prop=arguments[a++])
for(var i in prop)target[i]=prop[i];return target;};AJAXLib.each=function(obj,fn,args){if(obj.length==undefined)
for(var i in obj)
fn.apply(obj[i],args||[i,obj[i]]);else
for(var i=0,ol=obj.length;i<ol;i++)
if(fn.apply(obj[i],args||[i,obj[i]])===false)break;return obj;};AJAXLib.ajaxGlobal={active:0,lastModified:{}};AJAXLib.ajaxSettings={global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null};AJAXLib.ajaxTimeout=function(timeout)
{AJAXLib.ajaxSettings.timeout=timeout;};AJAXLib.ajaxSetup=function(settings)
{AJAXLib.extend(jQuery.ajaxSettings,settings);};AJAXLib.param=function(a)
{var s=[];if(a.constructor==Array||a.jquery)
AJAXLib.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
$.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&");};AJAXLib.ajax=function(s)
{s=AJAXLib.extend({},AJAXLib.ajaxSettings,s);if(s.data)
{if(s.processData&&typeof s.data!="string")
s.data=$.param(s.data);if(s.type.toLowerCase()=="get")
s.url+=((s.url.indexOf("?")>-1)?"&":"?")+s.data;}
if(s.global&&!AJAXLib.ajaxGlobal.active++)
{}
var requestDone=false;var xml=new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)
xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xml.setRequestHeader("If-Modified-Since",AJAXLib.ajaxGlobal.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(xml.overrideMimeType)
xml.setRequestHeader("Connection","close");if(s.beforeSend)
s.beforeSend(xml);var onreadystatechange=function(isTimeout)
{if(xml&&(xml.readyState==4||isTimeout=="timeout"))
{requestDone=true;var status;try
{status=AJAXLib.httpSuccess(xml)&&isTimeout!="timeout"?s.ifModified&&AJAXLib.httpNotModified(xml,s.url)?"notmodified":"success":"error";if(status!="error")
{var modRes;try
{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
AJAXLib.ajaxGlobal.lastModified[s.url]=modRes;if(s.success)
s.success(data,status);}
else
AJAXLib.handleError(s,xml,status);}
catch(e)
{status="error";AJAXLib.handleError(s,xml,status,e);}
if(s.global&&!--AJAXLib.ajaxGlobal.active)
{}
if(s.complete)
s.complete(xml,status);xml.onreadystatechange=function(){};xml=null;}};xml.onreadystatechange=onreadystatechange;if(s.timeout>0)
setTimeout(function()
{if(xml)
{xml.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);var xml2=xml;try
{xml2.send(s.data);}
catch(e)
{AJAXLib.handleError(s,xml,null,e);}
if(!s.async)
onreadystatechange();return xml2;};AJAXLib.handleError=function(s,xml,status,e)
{if(s.error)s.error(xml,status,e);};AJAXLib.httpSuccess=function(r)
{try
{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304;}
catch(e){}
return false;};AJAXLib.httpNotModified=function(xml,url)
{try
{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==AJAXLib.ajaxGlobal.lastModified[url];}
catch(e){}
return false;};AJAXLib.get=function(url,data,callback,type,ifModified)
{if(AJAXLib.isFunction(data))
{callback=data;data=null;}
return AJAXLib.ajax({url:url,data:data,success:callback,dataType:type,ifModified:ifModified});};AJAXLib.getIfModified=function(url,data,callback,type)
{return $.get(url,data,callback,type,1);};AJAXLib.getScript=function(url,callback)
{return $.get(url,null,callback,"script");};AJAXLib.post=function(url,data,callback,type)
{if(AJAXLib.isFunction(data))
{callback=data;data={};}
return AJAXLib.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});};AJAXLib.isFunction=function(fn)
{return!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&/function/i.test(fn+"");};
