//<class name='base' version='8.28' date='01.04.2006' author='hk510.com' />
function __class(o)
{
	this.parent 			= o;
	this.extendClass		= _extendClass;
	this.createEmptyObject	= _createEmptyObject;
	this.getObject			= _getObject;
	this.exist				= _exist;
	function _extendClass(n,c){this[n] = new c(this);};
	function _createEmptyObject(n){return this[n] = new __class(this);}
	function _getObject(n,d)
	{
		if(typeof(n)=='object') return n;
		if(typeof(n)=='undefined') 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.getObject(n,d.layers[i].document);
		if(!x && d.getElementById) x=d.getElementById(n);
		return x;
	};
	function _exist(o)
	{
		var e = (typeof(o)=='string')? this[o] : o;
		return typeof(e)!='undefined';	
	};
};
//<class name='root' version='2.38' date='01.04.2006' author='hk510.com' />
function __root()
{
	this.extend = __class;
	this.extend(null);
	this.toString	= _toString;
	this.browser 	= new __browser(this);
	this.images 	= new __images(this);
	this.div 		= new __div(this);
	this.events 	= new __events(this);
	function _toString(){return "root";};
};
//<class name='browser' version='4.12' date='01.04.2006' author='hk510.com' />
function __browser(o)
{
	this.extend = __class;
	this.extend(o);
	this.toString			= _toString;
	this.openPopup			= _openPopup;
	this.getHorizontalCenterPoint 	= _getHorizontalCenterPoint;
	this.getVerticalCenterPoint		= _getVerticalCenterPoint;
	this.getWidth			= _getWidth;
	this.getScreenWidth		= _getScreenWidth;
	this.getHeight			= _getHeight;
	this.getScreenHeight		= _getScreenHeight;
	this.type 				= _getType();
	this.platform 			= _getPlatform();
	this.flash 			= new __flash(this);
	function _toString(){return "root.browser";};
	function _openPopup(p,w,h,n,l,t,f)
	{
		var n1 	= (l!=null)? l : this.getHorizontalCenterPoint(w);
		var n2 	= (t!=null)? t : this.getVerticalCenterPoint(h);
		var f 	= (f==null)? 'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes,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;
	};
	function _getHorizontalCenterPoint(w)
	{
		return (this.getScreenWidth()-w)/2;
	};
	function _getVerticalCenterPoint(h)
	{
		return (this.getScreenHeight()-h)/2;
	};
	function _getWidth()
	{
		return (this.type=='ie')? document.body.clientWidth : window.innerWidth;
	};
	function _getScreenWidth()
	{
		return screen.width;
	};
	function _getHeight()
	{
		return (this.type=='ie')? document.body.clientHeight : window.innerHeight;
	};
	function _getScreenHeight()
	{
		return screen.height;
	};
	function _getType()
	{
		var v = 'others';
		if(document.all && document.getElementById) v = 'ie';
		if(document.all && navigator.userAgent.toLowerCase( ).indexOf("opera") != -1) v = 'opera'; 
		if(!document.all && document.addEventListener) v = 'moz';
		if(document.layers) v = 'ns4';
		return v;
	};
	function _getPlatform()
	{
		var v = 'others';
		 if(navigator.appVersion.indexOf('Mac')!=-1) v = 'mac';
		 if(navigator.appVersion.indexOf('Win')!=-1) v = 'win';
		return v;
	};
};
function __flash(o)
{
	this.extend = __class;
	this.extend(o);
	this.toString			= _toString;
	this.requiredVersion 		= null;
	this.setRequiredVersion		= _setRequiredVersion;
	this.createContainer		= _createContainer;
	this.version 			= _getFlashVersion(this);
	function _toString(){return "root.browser.flash";};
	function _setRequiredVersion(v){this.requiredVersion = v;};
	function _createContainer(o)
	{

		var o1 	= o.flash;
		var o2	= o.custom;

		var e = '';
		for(var i in o.custom) e+=i+'='+o.custom[i]+'&';
		var n = e.lastIndexOf('&');
		if(n==e.length-1)e = e.substring(0,n);

		var n1 	= new Date();
		var n2 	= new Date(3001, 00, 01, 00, 00, 00);

		var FID = (o1.unique==true || typeof(o1.unique)=='undefined')? '@id='+(n2-n1) : '';

		var s 	= 	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' "+
				"codebase='../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=/#version=/.class/#version=/#version=/.class/.class"+o1.version+"' "+
				"width='"+o1.width+"' height='"+o1.height+"' id='"+o1.id+"' align='"+o1.align+"' >"+
				"<param name='allowScriptAccess' value='sameDomain' /><param name='movie' value='"+o1.src+FID+"' />"+
				"<param name='quality' value='"+o1.quality+"' /><param name='menu' value='false' />"+
				"<param name='bgcolor' value='"+o1.color+"' /><param name='FlashVars' value='"+e+"' />";
				if(o1.transparent==true) s+="<param name='wmode' value='transparent' />";
				s+="<embed src='"+o1.src+FID+"' quality='"+o1.quality+"' FlashVars='"+e+"' bgcolor='"+o1.color+"' width='"+o1.width+"' "+
				"height='"+o1.height+"' name='"+o1.id+"' align='"+o1.align+"' allowScriptAccess='sameDomain' ";
				if(o1.transparent==true ) s+= "wmode='transparent'";
				s+=" menu='false' type='application/x-shockwave-flash' pluginspage='../www.macromedia.com/go/getflashplayer' />";
				s+="</object>";
		this.getObject(o1.container).innerHTML = s;
	};
	function _getFlashVersion(w)
	{
		var o 		= w.parent;
		var max 		= 20; 
		var min 		= 4;
		var n 		= navigator.plugins;
		var r		= null;
		if(o.type == 'ie' && o.platform=='win')
		{	
			document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
			document.write('Function HKFPV(i)\non error resume next\nDim hswc, hswv\nhswv = 0\n');
			document.write('set hswc = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
			document.write('if (IsObject(hswc)) then\nhswv = hswc.GetVariable("$version")\nhswv = hswc.GetVariable("$version")\nend if\n');
			document.write('HKFPV = hswv\nEnd Function\n');
			document.write('<\/SCR' + 'IPT\> \n');
  			for(var i=max;i>=min;i--){r = HKFPV(i);if(r!=0 && r!=null) break;}
			r = r.split(' ')[1].split(',')[0];
		}
		if(n)
		{
			var s1 	= "Shockwave Flash";
			var s2 	= " 2.0";
			var b	= n[s1+s2];
			if(b || n[s1])
			{
				var s3 = (b)? s2 : "";
				var s4 = Number(n[s1+s3].description.match('\\d'));
				for(var i=max;i>=min;i--){if(s4 == i){r = i; break;}}
			}
		}
		return r;
	};
};
//<class name='image' version='9.56' date='01.04.2006' author='../download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=/HK510.com' />

function __images(o)
{
	this.extend = __class;
	this.extend(o);
	this.toString 		= _toString;
	this.registerToPreload	= _registerToPreload;
	this.swap			= _swap;
	this.execPreload		= _execPreload;
	this.members		= new Array();
	this.dump		= new Object();
	function _toString(){return "root.images";};
	function _registerToPreload()
	{
		var a = arguments;
		var o = _scope(this);
		for(var i = 0;i<=a.length-1;i++)
		{
			if(!o.members.__searchIn(a[i])._found) o.members.push(a[i]);
		}
	};
	function _swap()
	{
		var a = arguments;
		var o = _scope(this);
		for(var i = 0;i<=a.length-1;i++)
		{
			var _i = a[i];
			if(typeof(_i)=='object') _core(_i,null,o);
			if(typeof(_i)=='string')
			{
				var a1	= _i.split(',');
				var l 	= a1.length-1;
				if(l==1)	_core(a1[0],a1[1],o);
				if(l==0)
				{
					if(_validate(_i,true) == null) _core(_i,null,o);
				}
			}
		}
	};
	function _execPreload(){_epCore(_scope(this));};
	function _scope(s){return (s==root.images)?s:root.images;};
	function _epCore(w)
	{
		var a 	= w.members;
		var d	= w.dump;
		for(var i = 0;i<=a.length-1;i++)
		{
			var _i = a[i];
			var nsrc = null;
			if(typeof(_i)=='string')
			{
				var a1	= _i.split(',');
				var l 	= a1.length-1;
				if(l==1)
				{
					var s2 = _validate(a1[1],true);
					if(s2!=null) nsrc = _getState(w.getObject(a1[0]).src,s2);
				}
				if(l==0) nsrc = _i;
			}
			if(typeof(_i)=='object') nsrc = _getState(_i.src,'_o');
			if(nsrc!=null)
			{
				var n = d['___i__'+i] = new Image;
				n.src = nsrc;
			}
		}
	};
	function _core(o,v,w)
	{
		var o1 	= w.getObject(o);
		if(o1==null) return;
		var s1 	= o1.src;
		var s2 	= _validate(_validate(s1,false),true);
		var s3 	= _validate(v,true);
		var s6;
		if(v==null)
		{
			var s5 = null;
			if(s2=='_o') s5 = '';
			if(s2=='') s5 = '_o';
			if(s2=='_a') s5 = '_a';
			s6 = _getState(s1,s5);
		}else{
			s6 = (s3!=null)? _getState(s1,s3) : v;		
		}
		o1.src = s6;
	};
	function _validate(v,b)
	{
		var a1 	= new Array('over','active','normal');
		var a2 	= new Array('_o','_a','');
		var r 	= null;
		if(v!=null)
		{
			for(var i = 0;i<=a1.length-1;i++)
			{
				var _i1 	= a1[i];
				var _i2 	= a2[i];
				if(b)
				{
					if(v==_i1)
					{
						r = _i2;
						break;
					}
				}
				if(!b)
				{
					var a3 	= v.split(_i2+'.');
					if(a3.length>=2)
					{
						r = _i1;
						break;
					}
				}
			}
		}
		return r;
	};
	function _getState(u,s)
	{
		return _removeState(u,_validate(_validate(u,false),true))+s+_getExtension(u);
	};
	function _removeState(r,s)
	{
		if(s==null) s='';
		return r.substring(0,r.lastIndexOf(s+'.'));
	};
	function _getExtension(s)
	{
		return s.match('[\\.\\D]{4}$');
	};
};
//<class name='div' version='4.59' date='01.04.2006' author='hk510.com' />
function __div(o)
{
	this.extend = __class;
	this.extend(o);
	this.toString		= _toString;
	this.setProperty 		= _setProperty;
	this.getProperty 		= _getProperty;
	function _toString(){return "root.div";};
	function _setProperty(t,p,v){_setCore(t,p,v,_scope(this));};
	function _getProperty(t,p){return _getCore(t,p,_scope(this));};
	function _scope(s){return (s==root.div)?s:root.div;};
	function _setCore(t,p,v,w)
	{
		var o = w.getObject(t);
		if(o==null) return;
		var p = p.toLowerCase( );
		var v = v.toString();
		var s = '';
		if(v.indexOf('%')==-1)
		{
			if(p=='left' || p=='top' || p=='width' || p=='height') s='px';
		}
		(w.parent.browser.type=='ns4')? o[p] = v+s : o.style[p] = v+s;
	};
	function _getCore(t,p,w)
	{
		var r = null;
		var o = w.getObject(t);
		if(o==null) return;
		if(p == "offsetLeft" || p == "offsetTop")
		{
			r = _getOffset(o,p,w);
		}else if(p == "offsetWidth" || p == "offsetHeight"){
			r = o[p];
		}else{
			r = _getStyle(o,p,w);
		}
		return r;		
	};
	function _getStyle(o,p,w)
	{
		var p = p.toLowerCase( );
		var r = (w.parent.browser.type=='ns4')? o[p] : o.style[p];
		return r.match('[^px]+');		
	}
	function _getOffset(o,p,w)
	{
		if(w.parent.browser.type=='ns4')
		{
			return (p=='offsetWidth')? o.pageX : o.pageY;
		}else{
			var a = o[p];
			o = o.offsetParent;
			while(o!=null){a+=o[p];o=o.offsetParent;}			
			return a;
		}
	};
};
//<class name='event' version='3.38' date='01.04.2006' author='hk510.com' />
//==========================================

function __events(o)
{
	this.extend = __class;
	this.extend(o);
	this.toString		= _toString;
	this.register		= _register;
	this.remove		= _remove;
	this.runEvent		= _runEvent;
	this.onresize 		= new Object();
	this.onload		= new Object();
	function _toString(){return "root.events";};
	function _register(f,e){_regCore(f,e,_scope(this));};
	function _remove(f,e){_remCore(f,e,_scope(this));};
	function _runEvent(e)
	{
		_runCore(e,_scope(this));
	};
	function _scope(s){return (s==root.events)?s:root.events;};
	function _regCore(f,e,w)
	{
		var o = w[e];
		if(!w.exist(o)) return;
		if(!w.exist(o.members)) o.members = new Array();
		if(!o.members.__searchIn(f)._found) o.members.push(f);
	};
	function _remCore(f,e,w)
	{
		var o = w[e];
		if(!w.exist(o)) return;
		if(!w.exist(o.members)) return;
		return (o.members.__deleteIn(f)._deleted);
	};
	function _runCore(e,w)
	{
		var o = w[e];
		if(!w.exist(o)) return;
		if(!w.exist(o.members)) return;
		var a = o.members;
		var n = a.length-1;
		for(var i=0;i<=n;i++)
		{
			var _i 	= a[i];
			var t 	= typeof(_i);
			if(t=='string') eval(_i)();
			if(t=='function') _i();
			if(t=='object')
			{
				var t1 	= typeof(_i._method);
				var t2 	= typeof(_i._arguments);
				if((t1=='string' || t1=='function' || t1=='object') && (t2=='string' || t2=='object'))
				{
					if(t2=='string')
					{
						eval(_i._method)(_i._arguments);	
					}else{
						if(t1=='string') 	eval(_i._method).apply(null,_i._arguments);
						if(t1=='function') 	_i._method.apply(null,_i._arguments);
						if(t1=='object') 	_i._method.apply(null,_i._arguments);
					}
				}
			}
		}
	};
};

//<prototype name='null' version='6.07' date='01.04.2006' author='hk510.com' />
String.prototype.analysePackage = function(c)
{
	var v = (c=='{')? '}' : ']' ;
	var a = this.substring(0,this.indexOf(v)).split(c);
	return (a.length==2)? a : null ;
};
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;
	};
}
if(!Array.prototype.splice)
{
	Array.prototype.splice = function()
	{
		var a = arguments;
		var r = new Array();
		var t = this;
		var l = this.length;
		var i = a[0];
		i = (i>l)? l : i;
		var c = a[1];
		c = (c>(l-i))? l-i : c;
		var p = a.length-2;
		this._delete = function(n,c,l,a)
		{
			for(var i = 0;i<=l;i++)
			{
				var x = (i>=n+c)? i-c : i-n;
				(i>=n && i<n+c)? r[x] = t[i] : this[x] = a[i];
			}
			this.length = l-c;
		};
		this._add = function(n,p,l,a,b)
		{
			var c = new Array();
			var l = (l+p-1);
			var u = (n+p)-1;
			for(var i = 0;i<=l;i++)
			{
				var _n = i;
				if(_n>=n) _n = (i>u)? i-p : i+2-n;
				c[i] = (i<n || i>u)?b[_n] : a[_n];
			}
			for(var i = 0;i<=c.length-1;i++) this[i] = c[i];
			this.length = c.length;
		};
		if(c>0) this._delete(i,c,l,this);
		if(p>0) this._add(i,p,this.length,a,this);
		return r;
	};
}
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%28' + b.join(',') + ');';
		o.f = this;
		r = eval(e);
		delete o.f;
		return r;
	}
}
Array.prototype.__searchIn = function(n){return __analyse(this,n,null,false);};
Array.prototype.__searchAndReplace = function(n,_si){return __analyse(this,n,null,true,_si);};
Array.prototype.__deleteIn = function(n){return __analyse(this,n,null,true);};
Array.prototype.__deleteInAtIndex = function(i){return __analyse(this,null,i,true);};	
function __analyse(a,n,i,b,_si)
{
	var o	 	= new Object();
	o._found 		= false;
	o._index 		= null;
	o._item 		= null;		
	o._deleted 	= false;
	if(i!=null)
	{
		if(b)
		{
			o._found = true;
			o._index = i;
			o._item = a[i];
			a.splice(i,1);
			o._deleted = true;
		}
	}else{
		for(var i = 0;i<=a.length-1;i++)
		{
			var _i = a[i];
			if(typeof(_i)=='object')
			{
				var b1 = o._found = (typeof(n)=='object')? true : false;
				for(var j in _i)
				{
					var x = (b1)? n[j] : n;
					if(x != _i[j]){if(b1){o._found = false;break;}}else{if(!b1){o._found = true;break;}}	
				}
			}
			if(n==_i || o._found)
			{
				o._found = true;
				o._index = i;
				o._item = _i;
				if(b)
				{
					(typeof(_si)!='undefined')? a.splice(i,1,_si) : a.splice(i,1);
					o._deleted = true;
				}	
				break;
			}	
		}
	}
	return o;
};

//<defaultSteup version='5.11' date='01.04.2006' author='hk510.com' />
var root = new __root();
window.onresize = function(){
	if(root.browser.type!='ns4') 
	root.events.runEvent('onresize');
	};
window.onload = function(){
	root.events.runEvent('onload');
	};
//root.events.register(root.images.execPreload,'onload');
