//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Javascript Micro Library / V 05.561 / 17.02.2007 / HK510.com
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function UI1B0(o,s)
{
	this.parent = o;
	this.getObj = function(n,d)
	{
		if(typeof(n)=='object') return n;
		if(typeof(n)=='undefined') return null;
		if(typeof(d)=='string' && this.getObj(d)==null) return null;
		var p,i,x;
		if(!d) d = document;
		if((p=n.indexOf("@"))>0 && parent.frames.length)
		{
			d=parent.frames[n.substring(p+1)].document;
			n=n.substring(0,p);
		}
		if(!(x=d[n]) && d.all) x=d.all[n];
		for (i=0;!x && i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x && d.layers&&i<d.layers.length;i++) x = this.getObj(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n);
		return x;
	};
	this.createNew = function(n)
	{
		return this[n] = new UI1B0(this,'{Object:'+n+'}');
	};
	this.addClass = function(n,c,s,o)
	{
		this[n] 	= new c(this,s);
		this[n].extend 	= (typeof(o)!='undefined' && typeof(o.extendClass)!='undefined')? o.extendClass : UI1B0;
		this[n].extend(this,s);		
		this[n].constructor();
	};
	this.toString = function(){return s;};
};
function UI9B5(o)
{
	this.constructor = function()
	{
		this.type		= this.getType();
		this.platform		= this.getPlatform();
	};
	this.getType = function()
	{
		var v = 'others';
		var d = document;
		if(d.all && d.getElementById) v = 'ie';
		if(d.all && navigator.userAgent.toLowerCase( ).indexOf("opera") != -1) v = 'opera'; 
		if(!d.all && d.addEventListener) v = 'moz';
		if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1) v = 'ff';
		if(document.layers) v = 'ns4';
		return v;
	};
	this.getPlatform = function()
	{
		var v = 'others';
		var s = navigator.appVersion;
		if(s.indexOf('Mac')!=-1) v = 'mac';
		if(s.indexOf('Win')!=-1) v = 'win';
		return v;
	};
	this.popup = function(p,w,h,n,l,t,f)
	{
		var n1 	= (l!=null)? l : this.getHCenter(w);
		var n2 	= (t!=null)? t : this.getVCenter(h);
		var f 	= (f==null)? 'scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no': f;
		var r 	= null;
		r = window.open(p,n,'width='+w+',height='+h+',top='+n2+',left='+n1+','+f);
		if(r!=null && window.focus) r.window.focus();
		return (r!=null)? r : null;
	};
	this.getHCenter = function(w)
	{
		return (this.getScreenWidth()-w)/2;
	};
	this.getVCenter = function(h)
	{
		return (this.getScreenHeight()-h)/2;
	};
	this.getWidth = function()
	{
		var d = document;
		return (this.type=='ie')? d.body.clientWidth : (this.type=='ff')? d.documentElement.clientWidth : window.innerWidth;
	};
	this.getHeight = function()
	{
		var d = document;
		return (this.type=='ie')? d.body.clientHeight : (this.type=='ff')?d.documentElement.clientHeight : window.innerHeight;
	};
	this.getScreenWidth = function()
	{
		return screen.width;
	};
	this.getScreenHeight = function()
	{
		return screen.height;
	};
	this.writeJs = function(s)
	{
		var d 	= document;
		var e 	= d.createElement('script');
		e.type	='text/javascript';
		e.text 	= s;
		d.body.appendChild(e);			
	};
	this.writeCss = function(s)
	{
		var d 	= document;
		var e 	= d.createElement('style');
		var t 	= this.type;
		e.type	= 'text/css';
		if(t=='ie'){e.styleSheet.cssText=s;
		}else if(t=='moz'){e.appendChild(d.createTextNode(s));
		}else{e.innerHTML = s;}
		d.getElementsByTagName('head')[0].appendChild(e);		
	};
};
function SK1x4()
{
	this.constructor 	= function()
	{
		this.enable = this.isEnable();
	};
	this.load 		= function(o){this.engine(o,null,'GET');};
	this.send 		= function(o,d){this.engine(o,d,'POST');};
	this.cancel		= function(o){if(typeof(o.connector)!='undefined' && typeof(o.connector.abort)!='undefined') o.connector.abort();}
	this.isEnable		= function()
	{
		return typeof(this.getConnector())!='undefined';
	};
	this.getConnector	= function()
	{
		var o;
		if(window.XMLHttpRequest)
		{
			o = new XMLHttpRequest();
		}else if(window.ActiveXObject){
			try{o = new ActiveXObject("Msxml2.XMLHTTP");}
			catch(e)
			{
				try{o = new ActiveXObject("Microsoft.XMLHTTP");}
				catch(e){}
			}
		}
		return o;
	};
	this.connection 	= function()
	{
		var url;
		var type;
		var onLoad;
		var onError;
		var connector;
		var timeout;
		var validate;
	};
	this.engine 		= function(o,d,m)
	{
		var h 		= this;
		o.connector 	= this.getConnector();
		if(typeof(o.connector)=='undefined')
		{
			if(typeof(o.onError)=='function') o.onError('Error -> Server class\nXMLHttpRequest/ActiveXObject not supported !');
			return;
		}
		if(typeof(o.url)=='undefined' || typeof(o.url)!='string')
		{
			if(typeof(o.onError)=='function') o.onError('Error -> Server class\nUrl is undefined !');
			return;
		}
		if(typeof(o.type)=='undefined') o.type='text';
		if(typeof(o.timeout)!='undefined') clearInterval(o.timeout);
		o.validate 	= function()
		{
			clearInterval(o.timeout);			
			if(typeof(o.connector.abort)!='undefined') o.connector.abort();
			if(typeof(o.onError)=='function') o.onError('Error -> Server class\nTimeout !\nServer is not responding !');
		};
		o.timeout 	= setInterval(o.validate,20000,this);
		o.connector.onreadystatechange = function()
		{
			var e = o.connector;
			if(e.readyState==4 && e.status==200)
			{
				clearInterval(o.timeout);				
				o.type 	= h.getType(e.getAllResponseHeaders());
				var t = null;
				if(o.type=='text')	t = e.responseText;
				if(o.type=='xml') 	t = (typeof(e.responseXML.xml)!='undefined')? e.responseXML.xml : e.responseXML;
				if(o.type=='js') 	t = e.responseText;
				if(o.type=='css')	t = e.responseText;
				var r 	= (typeof(o.onLoad)=='function')? o.onLoad(t) :  null;
			}
		}
		var c = (m=='GET')? null : this.encode(d);
		var t = (m=='GET')? 'text/xml' : 'application/x-www-form-urlencoded';
		o.connector.open(m,o.url,true);
		o.connector.setRequestHeader("Content-Type",t);
		o.connector.send(c);
	};
	this.encode 		= function(o)
	{
		var s = '';
		for(var i in o) s+=i+'='+o[i]+'&';
		return s.substring(0,s.length-1);
	};
	this.decode 		= function(s)
	{
		var a = s.split('&');
		if(typeof(a.length)!='number') return;
		var o = new Object();
		for(var i=0;i<=a.length-1;i++)
		{
			var b 	= a[i].split('=');
			o[b[0]] = b[1];
		}
		return o;
	};	
	this.getType 		= function(s)
	{
		var r = null;
		var s = s.split('Content-Type')[1];
		if(s.indexOf('xml')!=-1) 	r = 'xml';
		if(s.indexOf('text')!=-1) 	r = 'text';
		if(s.indexOf('javascript')!=-1) r = 'js';
		if(s.indexOf('css')!=-1) 	r = 'css';
		return r;
	};	
}

function UI6B6(o)
{
	this.constructor = function(){};
	this.setProperty = function(t,p,v)
	{
		var o = this.getObj(t);
		if(o==null) return;
		if(typeof(v)=='function')
		{
			var s;
			if(p.indexOf('resize')!=-1){s = (o.addEventListener)?'resize':'onresize';}
			if(p.indexOf('load')!=-1){s = (o.addEventListener)?'load':'onload';}
			if(o.addEventListener) return o.addEventListener(s,v,false);
			if(o.attachEvent && root.browser.type!='opera') return o.attachEvent(s,v);
		}
		return (typeof(o.style[p])!='undefined')? o.style[p] = v : (typeof(o[p])!='undefined')? o[p] = v : null;
	};
	this.getProperty = function(t,p)
	{
		var r = null;
		var o = this.getObj(t);
		if(o==null) return;
		if(p == "offsetLeft" || p == "offsetTop")
		{
			r = this.getOffset(o,p);
		}else if(p == "offsetWidth" || p == "offsetHeight"){
			r = o[p];
		}else{
			r = (typeof(o[p])!='undefined')? o[p] : this.getStyle(o,p);
		}
		return r;
	};
	this.trace  	= function(o,b)
	{
		var s='';
		var r = (typeof(b)!='undefined')?(b)?'<br />':'\n':'\n';
		for(var i in o) s+=i+'='+o[i]+', type = '+ typeof(o[i])+r;
		(r=='<br />')? document.write(s) : alert(s);
	};
	this.getStyle = function(o,p)
	{
		return o.style[p].match('[^px]+');		
	};
	this.getOffset = function(o,p)
	{
		var a = o[p];
		o = o.offsetParent;
		while(o!=null){a+=o[p];o=o.offsetParent;}			
		return a;
	};
};
function UI9C8(o)
{
	this.constructor = function()
	{
		this.pageId		= this.getPageId();
		this.version		= this.getVersion();
	};
	this.getPageId = function()
	{
		return this.getUniqueId();
	};
	this.getUniqueId = function(n)
	{
		var e = (typeof(n)!='undefined' && typeof(n)=='number')?n:3001;
		return new Date(e, 00, 01, 00, 00, 00)-new Date();
	};
	this.create = function(o)
	{
		var f 	= o.flash;
		var c	= o.custom;
		var u 	= (f.unique)?'?UID='+this.getUniqueId():'';
		var e 	= '';
		var r 	= '';
		var s	= '<param name=';
		
		for(var i in c) e+= i+'='+c[i]+'&';
		e	+='pageId='+this.pageId;
		r 	= "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'"+
			"codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+f.version+"' "+
			"width='"+f.width+"' height='"+f.height+"' id='"+f.id+"' align='"+f.align+"' >"+
			s+"'allowScriptAccess' value='always' /> "+
			s+"'movie' value='"+f.src+u+"' /> "+
			s+"'quality' value='"+f.quality+"' /> "+
			s+"'menu' value='false' /> ";

			if(f.transparent) r+=s+"'wmode' value='transparent' /> ";

			r+=s+"'bgcolor' value='"+f.color+"' /> "+
			s+"'FlashVars' value='"+e+"'>"+
			"<embed src='"+f.src+u+"' quality='"+f.quality+"' "+
			"FlashVars='"+e+"' bgcolor='"+f.color+"' width='"+f.width+"' height='"+f.height+"' name='"+f.id+"' "+
			"align='"+f.align+"' allowScriptAccess='always' menu='false' type='application/x-shockwave-flash' ";
			if(f.transparent) r+=" wmode='transparent'";
			r+="pluginspage='http://www.macromedia.com/go/getflashplayer' /></object> ";
		root.obj.setProperty(f.container,'innerHTML',r);
	};
	this.getVersion = function()
	{
		var e,r,q;
		var n = navigator.plugins;
		var p = 'ShockwaveFlash.ShockwaveFlash';
		if(root.browser.type=='ie' && root.browser.platform=='win')
		{
			try{q=new ActiveXObject(p+".7");r=q.GetVariable("$version").match('\\d+');}
			catch(e)
			{
				try
				{
					q=new ActiveXObject(p+".6");
					q.AllowScriptAccess="always";
					r=6;
				}
				catch(e)
				{
					try
					{
						q=new ActiveXObject(p);
						r=q.GetVariable("$version").match('\\d+');
					}
					catch(e){r=99;}	
				}
			}
		}
		if(n)
		{
			var s1 	= 'Shockwave Flash';
			var s2 	= ' 2.0';
			var b	= n[s1+s2];
			if(b || n[s1]) r = Number(n[s1+((b)? s2 : '')].description.match('\\d+'));
		}
		return r;
	};
};
function UI7G4(o)
{
	this.constructor = function(){};
	this.create = function(o,f)
	{
		var a1 = arguments;
		var a2 = new Array();
		for(var i=2;i<=a1.length-1;i++) a2[i-2] = a1[i];
        	var r = function()
        	{
        	    return (typeof(f)=='function')? f.apply(o,a2) : (o==null || typeof(o)=='undefined')? window[f].apply(null,a2) : o[f].apply(o,a2);
        	}
	        return r;
	};
};
function UI7J0(o)
{
	this.constructor = function()
	{
		this.r1 	= "\\.[\\D]{3,4}$";
		this.count	= 0;
		this.member 	= new Object();
		this.dump	= new Object();
	};
	this.preload = function()
	{
		this.core(arguments,false);
	};
	this.swap = function()
	{
		this.core(arguments,true);
	};
	this.core = function(a,b)
	{
		for(var i = 0;i<=a.length-1;i++)
		{
			var o = null;
			var e = a[i];
			var s = null;
			var u = null;
			if(typeof(e)=='object')
			{
				o = e;
				s = e.src;
				if(!b) this.push(this.set(e.src,'_o'));
			}
			if(typeof(e)=='string')
			{
				var d = this.extension(e);
				if(d!=null && e.indexOf('|')==-1 && !b) this.push(e);					
				if(d==null || e.indexOf('|')!=-1)
				{
					var g = e.split('|');
					var h = this.getObj(g[0]);
					if(g.length==1 && h!=null)
					{
						o = e;
						s = e.src;
						if(!b) this.push(this.set(e.src,'_o'));						
					}
					if(g.length==2 && h!=null)
					{
						o = h;
						s = h.src;
						u = (this.extension(g[1])!=null)? g[1] : this.set(s,g[1])
						if(!b) this.push(u); 
					}
				}
			}
			if(b)
			{
				var c = this.state(s);
				if(c=='over') u = (u!=null)? u : this.set(s,'');
				if(c=='normal') u = (u!=null)? u : this.set(s,'_o');
				if(u!=null && o!=null) o.src=u;
			}
		}
		
	};
	this.push = function(s)
	{
		if(!this.search(s))
		{
			this.dump[this.count] = s;
			this.count++;
		}
	};
	this.execute = function()
	{
		for(var i in this.dump)
		{
			this.member[i] 		= new Image;
			this.member[i].src 	= this.dump[i];
		}
	};
	this.search = function(u)
	{
		var r = false;
		var o = this.member;
		for(var i in o){if(o[i].src==u){r=true;break;}}
		return r;
	};
	this.set = function(u,s)
	{
		var r = null;
		var t = this.extension(u);
		if(s=='normal') s = '';
		if(s=='over') s = '_o';
		if(s=='active') s = '_a';
		if(u.match('_o.')!=null && r==null) r = '_o'+t;
		if(u.match('_a.')!=null && r==null) r = '_a'+t;
		if(r == null) r = t;
		return u.replace(r,s+t);
	};
	this.state = function(s)
	{
		var r = null;
		var a = new Array(['_o','over'],['_a','active'],['','normal']);
		for(var i= 0;i<=a.length-1;i++){if(s.match(a[i][0]+'.')!=null){r = a[i][1];break;}}
		return r;
	};
	this.extension = function(s)
	{
		return s.match(this.r1);
	};
};
if(!Function.prototype.apply)
{
	Function.prototype.apply = function(o,a)
	{
		var r, e;
		if(!o) var o 	= window;
		if(!a) var a 	= new Array();
		var b 		= new Array();
		for(var i=0;i<a.length;i++) b[i] = 'a['+i+']';
		e = 'o.f(' + b.join(',') + ');';
		o.f = this;
		r = eval(e);
		delete o.f;
		return r;
	}
}
if(!Array.prototype.push)
{
	Array.prototype.push = function()
	{
		var a = arguments;
		var n = this.length;
		for(var i=0;i<=a.length-1;i++) this[n+i] = a[i];
		return this.length;
	};
}
function isset(o)
{
	return typeof(o)!='undefined';
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
var root = new UI1B0(null,'root');
root.addClass('browser',UI9B5,'Browser class');
root.addClass('server',SK1x4,'Server class');
root.addClass('obj',UI6B6,'Object class');
root.addClass('delegate',UI7G4,'Delegate class');
root.addClass('images',UI7J0,'Images class');
root.addClass('flash',UI9C8,'Flash class');
root.obj.setProperty(window,'load',root.delegate.create(root.images,'execute'));
