//------------------------------------------
// i-Tab
// © 2007 Kim & Dean - All Rights Reserved
// Written By:  Dean
//------------------------------------------

var itab_about        = false;
var itab_about_clog   = false;
var itab_about_skip   = false;
var itab_about_check  = false;
var itab_about_loaded = false;
var itab_ie7          = ((is_ie) && (uagent.indexOf('msie 7.') != -1));
var itab_year_start   = 2006;
var itab_about_key    = 'i-tab';
var itab_loaded       = false;
var itab_menu_js      = new Array();
var itab_about_timer;
var itab_cur_x;
var itab_cur_y;

function itab_add_event(o, e, f)
{
	if (o.addEventListener)
	{
		o.addEventListener(e, f, false);
	}
	else if (o.attachEvent)
	{
		o.attachEvent('on'+e, f);
	}
	else
	{
		eval('o.on'+e+'='+f);
	}
}

function itab_gogo_topic(tid)
{
	try
	{
		menu_action_close();
	}

	catch(e){}
	window.location.href = ipb_var_base_url+'showtopic='+tid;

	return true;
}

function topic_link_event_mouseup(e)
{
	e = global_cancel_bubble(e, false);

	var tid = _get_tid_from_id(this.id);
	tid_date[tid] = 0;
}

function itab_load_menus()
{
	try
	{
		var o = document.getElementById('itab-js-data');
		var b = document.getElementsByTagName('body')[0];

		if (o && b)
		{
			while (o.hasChildNodes() || o.childNodes.length > 0)
			{
				b.appendChild(o.childNodes[o.childNodes.length-1]);
			}
		}

		o.style.display = 'none';
	}

	catch(me){}
}

function itab_window_close()
{
	try
	{
		menu_action_close();
	}

	catch(e){}
	window.close();
}

function itab_view_profile(id, nw)
{
	try
	{
		menu_action_close();
	}

	catch(e){}

	nw = (nw == true) ? true : false;
	if (!isNaN(id))
	{
		var u = ipb_var_base_url+'showuser='+id;
		if (nw == true)
		{
			opener.window.location = u;
		}
		else
		{
			window.location = u;
		}
	}

	return false;
}

function itab_get_link_menu(o)
{
	var p = o;
	while (p)
	{
		if (!p || typeof(p) == 'undefined')
		{
			break;
		}

		if (p.className.toLowerCase() == 'popupmenu' && p.parentNode.id.indexOf('_menu'))
		{
			p = p.parentNode;
			break;
		}

		p = p.parentNode;
	}

	return p;
}

function itab_header_search()
{
	var d =
	{
		'obj'   : my_getbyid('ipb-tl-search'),
		'menu'  : my_getbyid('ipb-tl-search_menu'),
		'pmenu' : itab_get_link_menu(my_getbyid('ipb-tl-search'))
	}

	d.obj.onclick = itab_header_search_click;
}

function itab_header_search_click(e)
{
	e = ipsclass.cancel_bubble(e, true);
	var o = my_getbyid('ipb-tl-search_menu');

	if (o.style.display == 'none')
	{
		itab_header_search_show(e);
	}
	else
	{
		o.style.display = 'none';
	}

	return false;
}

function itab_header_search_show()
{
	var d =
	{
		'obj'   : my_getbyid('ipb-tl-search'),
		'menu'  : my_getbyid('ipb-tl-search_menu'),
		'pmenu' : itab_get_link_menu(my_getbyid('ipb-tl-search')),
		'top'   : 0,
		'left'  : 0
	}

	d.menwid = d.pmenu.offsetWidth;
	d.menhgt = d.pmenu.offsetHeight;
	d.width  = (parseInt(d.menu.style.width)) ? parseInt(d.menu.style.width) : d.menu.offsetWidth;
	d.height = (parseInt(d.menu.style.height)) ? parseInt(d.menu.style.height) : d.menu.offsetHeight;
	d.left   = ipsclass.get_obj_leftpos(d.obj.parentNode)+d.menwid;
	d.top    = ipsclass.get_obj_toppos(d.obj.parentNode)-1;

	if ((d.left+d.width) >= document.body.clientWidth)
	{
		d.left = d.left-d.menwid-d.width-2;
	}

	if ((d.top+d.height) >= document.body.clientHeight)
	{
		d.top = d.top+d.menhgt-d.height;
	}

	d.menu.style.position   = 'absolute';
	d.menu.style.top        = d.top+'px';
	d.menu.style.left       = d.left+'px';
	d.menu.style.display    = '';
	d.menu.style.zIndex     = 10000;
	d.menu.onclick          = ipsclass.cancel_bubble_low;

	my_getbyid('ipb-tl-search-box').focus();
}

function itab_header_search_hide()
{
	my_getbyid('ipb-tl-search_menu').style.display = 'none';
}

function itab_about_init()
{
	itab_about_create_box(document.getElementsByTagName('body')[0]);

	var z = new Array('a', 'span');
	for (var n=0; n<z.length; n++)
	{
		var a = document.getElementsByTagName(z[n]);
		var b = 'rel';
		var c;

		for (var i=0; i<a.length-1; i++)
		{
			c = a[i];
			if (c.getAttribute(b))
			{
				if (c.getAttribute(b).toLowerCase() == 'itab-about')
				{
					c.onclick = itab_about_show;
					try
					{
						c.style.cursor = 'pointer';
					}

					catch(er)
					{
						c.style.cursor = 'hand';
					}
				}
			}
		}
	}

	itab_about_loaded = true;
}

function itab_about_create_box(o)
{
	var d = itab_about_denc('521561566579493566561522500566577558559556558559572578577556559564500493576577582569562522500561566576573569558582519571572571562500523521508561566579523521561566579493566561522500566577558559556558559572578577556580575558573573562575500493576577582569562522500561566576573569558582519571572571562500523521561566579493566561522500566577558559556558559572578577556560572571577562571577500493576577582569562522500573572576566577566572571519575562569558577566579562500523521561566579493576577582569562522500573572576566577566572571519575562569558577566579562520577572573519514573581520569562563577519509573581520577562581577506558569566564571519560562571577562575500523521566570564493576575560522500584566570564507578575569586508566577558559556558559572578577556569572564572507564566563500493559572575561562575522500509500493558569577522500500493508523521559575493508523521576573558571493560569558576576522500566577558559556558559572578577556577566577569562500523566506545558559493544568566571493579511507518561521508576573558571523521559575493508523521576573558571493560569558576576522500566577558559556558559572578577556577566577569562556560500523630493584561558577562507582562558575586493506493526569569493543566564565577576493543562576562575579562561507521508576573558571523521508561566579523521559575493508523521561566579493576577582569562522500580566561577565519518509498500523521577558559569562493560569558576576522500566573559577558559569562500493560562569569576573558560566571564522500509500493560562569569573558561561566571564522500509500523521577575523521577561493558569566564571522500569562563577500493579558569566564571522500577572573500493580566561577565522500516509498500523521559523528575562561566577576519521508559523521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500577572573500493580566561577565522500512509498500523521559523537566571568576519521508559523521508577561523521508577575523521577575523521577561493558569566564571522500569562563577500493579558569566564571522500577572573500523521577558559569562493560569558576576522500566573559577558559569562500493560562569569576573558560566571564522500509500493560562569569573558561561566571564522500509500523521577575523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500493580566561577565522500512514498500523521578523532575558573565566560576508529562576566564571519521508578523521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500493580566561577565522500511514498500523536566570493543566577560565566562521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500493580566561577565522500512509498500523552493521558493565575562563522500565577577573519508508580580580507576568566571559582561575558564572571563569582507560572570500493577558575564562577522500556559569558571568500523548562559576566577562521508558523493554521508577561523521508577575523521577575523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500523521578523541575572564575558570570566571564519521508578523521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500523544565558580571493529562558571521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500523552493521558493565575562563522500565577577573519508508580580580507561576560575566573577566571564507560572570500493577558575564562577522500556559569558571568500523548562559576566577562521508558523493554521508577561523521508577575523521577575523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500523521578523528572561562493538558566571577558566571562575519521508578523521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500493571572580575558573522500571572580575558573500523543578576576572493541558572569572493543566577572521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500570566561561569562500523552493521558493565575562563522500570558566569577572519570558564566560572571562516518525562570558566569507566577524576578559567562560577522534577558559493544568566571576493528572561562493538558566571577558566571562575500493577558575564562577522500556559569558571568500523530570558566569521508558523493554521508577561523521508577575523521508577558559569562523521508577561523521577561493558569566564571522500569562563577500493579558569566564571522500577572573500523521561566579493576577582569562522500570558575564566571506559572577577572570519514573581500523552493521558493565575562563522500565577577573519508508580580580507576568566571559582561575558564572571563569582507560572570508576577572575562508500493577558575564562577522500556559569558571568500523541578575560565558576562493544568566571521508558523493554521508561566579523552493521558493565575562563522500496500493572571560569566560568522500575562577578575571493566577558559556558559572578577556560565558571564562569572564501577575578562502500523547566562580493528565558571564562569572564521508558523493554521508577561523521508577575523521577575523521577561493558569566564571522500569562563577500493560572569576573558571522500511500493579558569566564571522500577572573500523521559523526559572578577519521508559523521508577561523521508577575523521577575523521577561493558569566564571522500569562563577500493560572569576573558571522500511500493579558569566564571522500577572573500523566506545558559493576568566571493566576493563572575493578576558564562493572571493534571579566576566572571493541572580562575493527572558575561493576562575566562576493511507510507581505493511507511507581505493526539529493511507512507581494494493493545565562493566506545558559493576568566571493578576562576493576572573565566576577566560558577562561493573575572564575558570570566571564493577572493575558561566560558569569582493560565558571564562493577565562493569572572568493572563493558571561493562571565558571560562493577565562493566571565562575562571577493563578571560577566572571558569566577582493572563493558571493534541527493563572575578570493560572570570578571566577582493566571493570558571582493579558575566572578576493580558582576507521559575493508523521559575493508523521561566579493576577582569562522500563569572558577519569562563577500523566506545558559493506493541572580562575566571564493578573493582572578575493541572580562575493527572558575561494521508561566579523521561566579493576577582569562522500563569572558577519575566564565577520563572571577506576577582569562519566577558569566560520563572571577506576566583562519581581506576570558569569500523529572571500577493569562577493566577493572579562575506577558568562493582572578575493570566571561494493519529521508561566579523521561566579493560569558576576522500560569562558575562561500523521508561566579523521508577561523521508577575523521508577558559569562523521559575493576577582569562522500570558575564566571506559572577577572570519512573581500493508523521561566579493558569566564571522500560562571577562575500523521577558559569562493560562569569576573558560566571564522500509500493560562569569573558561561566571564522500509500523521577575523521577561493558569566564571522500560562571577562575500493579558569566564571522500559572577577572570500523521566570564493576575560522500584566570564507578575569586508563566575562563572581507573571564500493559572575561562575522500509500493558569577522500500493558569566564571522500569562563577500493566561522500566577558559506563566575562563572581506569572564572500493508523521576573558571493576577582569562522500573558561561566571564506577572573519512573581500523566506545558559493566576493572573577566570566583562561493577572493580572575568493566571493521558493565575562563522500565577577573519508508580580580507564562577563566575562563572581507560572570500493572571560569566560568522500575562577578575571493566577558559556564572556564572556563572581582501502500523531566575562531572581521508558523521559575493508523566506545558559493566576493559562576577493579566562580562561493558577493510509511513581516515517493572575493565566564565562575521508576573558571523521508577561523521508577575523521508577558559569562523521508561566579523521508561566579523521561566579493566561522500566577558559556558559572578577556560569572576562500493572571560569566560568522500566577558559556558559572578577556565566561562501502500523549521508561566579523521508561566579523521508561566579523521561566579493566561522500566577558559556558559572578577556560565558571564562569572564500493576577582569562522500561566576573569558582519571572571562500523521561566579493566561522500566577558559556558559572578577556560565558571564562569572564556561558577558500523521508561566579523521561566579493558569566564571522500560562571577562575500523552493521558493565575562563522500496500493572571560569566560568522500575562577578575571493566577558559556558559572578577556560565558571564562569572564501563558569576562502500523528569572576562493528565558571564562569572564521508558523493554521508561566579523521508561566579523');
	if (d == '')
	{
		alert('Someone has altered something in here that they should not have been doing. >.<');
	}

	var z = new Date();
	var y = z.getFullYear();
	var x = (y > itab_year_start) ? itab_year_start+' - '+y : itab_year_start;

	var a = document.createElement('div');
	a.setAttribute('id', 'itab_about_box');
	a.style.display = '';
	a.innerHTML     = d.replace(/\{date\.year\}/ig, x).replace(/\{img\.url\}/ig, ipb_var_image_url);

	o.appendChild(a);

	try
	{
		var f = my_getbyid('itab-firefox-logo');
		if (f)
		{
			f.setAttribute('title', "Visit Mozilla Firefox's Website");
			itab_add_event(f, 'click', itab_go_go_foxy);
		}
	}

	catch(e){}
}

function itab_go_go_foxy()
{
	if (itab_about)
	{
		itab_about_hide();
	}

	var ffw = window.open('http://www.getfirefox.com', '_blank');
	ffw.focus();

	return false;
}

function itab_about_enc_key()
{
	var k = 0;
	for (var i=0; i<itab_about_key.length; i++)
	{
		k = k+itab_about_key.charCodeAt(i);
	}

	if (k == 0)
	{
		alert('Someone has altered something in here that they should not have been doing. >.<');
	}

	return k;
}

function itab_about_denc(c)
{
	var k = itab_about_enc_key();
	var j = 3;
	var r = '';

	{
	if (k > 0)
		if (c.length > 0)
		{
			for (var i=0; i<c.length; i+=3)
			{
				var x = c.substring(i, j);
				var t = (parseInt(x)-k);
				var y = unescape('%'+t.toString(16));

				if (y == '%d' || y == '%a')
				{
					if (y == '%a')
					{
						r = r+'\n';
					}
					else
					{
						r = r+' ';
					}
				}
				else
				{
					r = r+y;
				}

				j += 3;
			}
		}
	}

	return r;
}

function itab_about_show(e)
{
	if (!itab_about_loaded)
	{
		return false;
	}

	if (itab_about)
	{
		itab_about_hide();
		return false;
	}

	itab_about = true;
	itab_about_display_bg();
	itab_about_display();

	itab_about_skip  = true;
	itab_about_timer = setInterval('itab_about_display_bg();itab_about_display();', 10);

	window.onresize = itab_screen_freeze;
	document.oncontextmenu = function(){return false;}
	//window.onscroll = function(){window.scroll(itab_cur_x, itab_cur_y);}

	return false;
}

function itab_about_display()
{
	if (!itab_about_loaded)
	{
		return false;
	}

	var o = document.getElementById('itab_about_wrapper') || document.all['itab_about_wrapper'];

	if (!itab_about_skip)
	{
		o.style.display    = '';
		o.style.visibility = 'hidden';
		o.style.zIndex     = 1005;
	}

	itab_about_center(o);
	if (!itab_about_skip)
	{
		o.style.visibility = 'visible';
	}

	if (itab_about_clog)
	{
		var c = document.getElementById('itab_about_changelog') || document.all['itab_about_changelog'];
		itab_about_center(c);
	}
}

function itab_about_display_bg()
{
	if (!itab_about_loaded)
	{
		return false;
	}

	var b = document.getElementById('itab_about_bg') || document.all['itab_about_bg'];
	var l = 8;

	if (!itab_about_skip)
	{
		b.style.display = '';
		b.style.zIndex  = 1004;
		b.style.opacity = 0;
		b.style.filter  = 'alpha(opacity=0)';

		for (var i=0; i<=l; i++)
		{
			setTimeout("itab_set_opacity('itab_about_bg', "+i+")", 70*i);
		}
	}

	var sx = self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft)   || document.body.scrollLeft;
	var sy = self.pageYOffset || (document.documentElement && document.documentElement.scrollTop)    || document.body.scrollTop;
	var dw = self.innerWidth  || (document.documentElement && document.documentElement.clientWidth)  || document.body.clientWidth;
	var dh = self.innerHeight || (document.documentElement && document.documentElement.clientHeight) || document.body.clientHeight;
	var ua = navigator.userAgent;

	if (ua.indexOf('MSIE ') != -1)
	{
		b.style.width = dw+'px';
	} 
	else
	{
		try
		{
			ssy = sy;
			if (sx == 0 && sy == 0 && itab_about_check == false)
			{
				window.scroll(0, 1);
				ssy = self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop;
				window.scroll(sx, sy);
				itab_about_check = true;
			}

			if (ssy > 0 || itab_about_check == true)
			{
				b.style.width = dw-20+'px';
			}
			else
			{
				b.style.width = dw+'px';
			}
		}

		catch(e)
		{
			b.style.width = dw+'px';
		}
	}

	b.style.height = dh+sy+'px';
	if (!itab_about_skip)
	{
		itab_selects_status('hidden');
	}
}

function itab_about_key_handler(e)
{
	if (!itab_about_loaded)
	{
		return true;
	}

	var c = (document.all) ?  window.event.keyCode : e.keyCode;
	if (c == 27)
	{
		if (itab_about_clog)
		{
			itab_about_changelog(false);
		}
		else
		{
			if (itab_about)
			{
				itab_about_hide();
			}
			else
			{
				itab_about_show();
			}
		}

		return false;
	}

	return true;
}

function itab_about_hide()
{
	if (!itab_about_loaded)
	{
		return false;
	}

	if (!itab_about)
	{
		itab_about_show();
		return false;
	}

	itab_about = false;
	itab_about_hide_bg();

	var o = document.getElementById('itab_about_wrapper') || document.all['itab_about_wrapper'];
	o.style.display = 'none';

	itab_about_skip  = false;
	if (itab_about_timer)
	{
		clearInterval(itab_about_timer);
	}

	document.oncontextmenu = function(){return true;}
	if (document.body.style.oldoverflow)
	{
		document.body.style.overflow = document.body.style.oldoverflow;
	}

	if (itab_about_clog)
	{
		itab_about_changelog(false);
	}

	return false;
}

function itab_about_hide_bg()
{
	if (!itab_about_loaded)
	{
		return false;
	}

	var b = document.getElementById('itab_about_bg') || document.all['itab_about_bg'];
	b.style.display = 'none';

	itab_selects_status('visible');
}

function itab_selects_status(s)
{
	var a = document.getElementsByTagName('select');	
	for (var i=0; i<a.length; ++i)
	{
		a[i].style.visibility = s;
	}
}

function itab_set_opacity(id, v)
{
	o               = document.getElementById(id) || document.all[id];
	o.style.opacity = v/10;
	o.style.filter  = 'alpha(opacity='+v*10+')';
}

function itab_screen_freeze()
{
	if (!itab_about_loaded)
	{
		return false;
	}

	o = document.getElementById('itab_about_wrapper') || document.all['itab_about_wrapper'];
	b = document.getElementById('itab_about_bg')      || document.all['itab_about_bg'];
	w = self.innerWidth  || (document.documentElement && document.documentElement.clientWidth)  || document.body.clientWidth;
	h = self.innerHeight || (document.documentElement && document.documentElement.clientHeight) || document.body.clientHeight;
	a = navigator.userAgent;

	if (a.indexOf('MSIE ') != -1)
	{
		b.style.width = w+'px';
	} 
	else
	{
		b.style.width = w-20+'px';
	}

	if (a.indexOf('Opera/9') != -1)
	{
		b.style.height = document.body.scrollHeight+'px';
	}
	else
	{
		b.style.height = document.body.scrollHeight+50+'px';
	}

	itab_about_center(o);
	if (itab_about_clog)
	{
		c = document.getElementById('itab_about_changelog') || document.all['itab_about_changelog'];
		itab_about_center(c);
	}
}

function itab_about_center(o)
{
	var sx = self.pageXOffset || (document.documentElement && document.documentElement.scrollLeft)   || document.body.scrollLeft;
	var sy = self.pageYOffset || (document.documentElement && document.documentElement.scrollTop)    || document.body.scrollTop;
	var dw = self.innerWidth  || (document.documentElement && document.documentElement.clientWidth)  || document.body.clientWidth;
	var dh = self.innerHeight || (document.documentElement && document.documentElement.clientHeight) || document.body.clientHeight;
	var ew = o.offsetWidth;
	var eh = o.offsetHeight;
	var x  = Math.round(dw/2)-(ew/2)+sx;
	var y  = Math.round(dh/2)-(eh/2)+sy;

	o.style.left = x+'px';
	o.style.top  = y+'px';
}

function itab_global_login()
{
	var r = my_getbyid('itab-global-login-return').value;
	if (r != '')
	{
		r = r.replace(/&amp;/gi, '&');
		r = r.replace(ipb_var_base_url, '');
		r = r.replace(/^\?/, '');
		r = r.replace(/s=(\w){32}/i, '');
		r = r.replace(/act=(login|reg|lostpass)/i, '');

		my_getbyid('itab-global-login-return').value = r;
	}
}

itab_add_event(window, 'load', itab_load_menus);
itab_add_event(window, 'load', itab_about_init);
itab_add_event(window, 'scroll', itab_screen_freeze);
itab_add_event(document, 'keydown', itab_about_key_handler);

var is_safari_win = false;
if (is_win && is_safari)
{
	is_safari_win = true;
	is_safari     = false;
}

var d = new Date();
if (!itab_year_start || typeof(itab_year_start) == 'undefined' || itab_year_start > d.getFullYear())
{
	itab_year_start = 2006;
}

function itab_about_changelog(d)
{
	if (!itab_about_loaded || !itab_about)
	{
		return false;
	}

	var o = document.getElementById('itab_about_changelog')      || document.all['itab_about_changelog'];
	var c = document.getElementById('itab_about_changelog_data') || document.all['itab_about_changelog_data'];
	var w = document.getElementById('itab_about_wrapper')        || document.all['itab_about_wrapper'];
	var b = document.getElementById('itab_about_bg')             || document.all['itab_about_bg'];

	if (d)
	{

		if (o.style.zIndex < b.style.zIndex)
		{
			b.style.zIndex = parseInt(w.style.zIndex/1+1);
			o.style.zIndex = parseInt(w.style.zIndex/1+2);
		}

		c.innerHTML        = itab_about_denc('493506506506506506506506506506506506506506493493493493493493471508493493493493566506545558559493493493493553493493493493493493471553493493528565558571564562569572564493493508493493493493493493471493506506506506506506506506506506506506506493493493493493493471493493493493493493471552579511507518561554471506493531566581493543576576493570562571578493561575572573561572580571493567558579558576560575566573577493560572561562493563572575493534530493501493529540538493527578564493502471506493531566581493560572561562493563572575493558493560572570573558577566559566569566577582493580566577565493569558577562576577493563566571558569493579562575576566572571493572563493534541527493544565572578577559572581493579510507509507510471506493531566581493560572561562493563572575493558493560572570573558577566559566569566577582493580566577565493569558577562576577493563566571558569493579562575576566572571493572563493534541527493545575558560568562575493579493510507511507510471506493538566571572575493559578564493563566581493563572575493563572575578570505493564558569569562575582505493561572580571569572558561493499493559569572564471506493544568566571576493571572580493560572570573558577566559569562493580566577565493534541527493579511507512507515505493534541532493579511507511507513505493534528527493510507513507511505493534529538493510507511507511505493534527545493579510507511507510505493534544527493579510507509507510493471471552579511507518560554471506493531566581562561493560572561562493563572575493576562560577566572571493545575558560568562575493501493539572580493560572570573558577566559569562493580565566577493534527545493579510507510507510493502471506493570566571572575493559578564493563566581493566571577572493563572575578570471471552579511507518559554471506493531566581562561493560572561562493563572575493576562560577566572571493527569572564493501493539572580493560572570573558577566559569562493580565566577493534528527493579510507513507510493502471471552579511507518558554471506493531566581562561493558569569493560572561562493563572575493576562560577566572571493545575558560568562575493501493539572580493560572570573558577566559569562493580565566577493534527545493579510507510507509493502471506493570566571572575493559578564493563566581493566571577572493563572575578570471471552579511507518554471506493531566581562561493558569569493560572561562493563572575493576562560577566572571493527569572564493501493539572580493560572570573558577566559569562493580565566577493534528527493579510507513507509493502471506493531566581562561493560572561562493570562571578493563572572577562575493563572575493531507531507493512507509493558571561493540573562575558493518507514509471506493570566571572575493559578564493563566581471471552579511507517554471506493531566581562561493570558571582493560565558571564562493576568566571493534541527493579511507512507513493577572493579511507512507514493501493511512513556511512514507565577570569493502493471506493570566571572575493559578564493563566581471471552579511507516554471506493531566581562561493560565558571564562493576568566571493534541532493579511507511507511493577572493579511507511507512493501493511511511556511511512556561566563563562575562571560562556562581573572575577507565577570569493502493471506493531566581562561493560572575575562560577493561566576573569558582493570558560575572493543540548556503493566571577572493532558569569562575582471506493529566563563562575562571577493538566571572575493527578564493531566581493566571577572493532558569569562575582471471552579511507515558554471506493531566581562561493560572561562493563572575493576562560577566572571493529572580571569572558561493501493539572580493560572570573558577566559569562493580565566577493534529538493579510507511507510493502471471552579511507515554471506493543562580575566577562493558569569493560572561562493563572575493576562560577566572571493529572580571569572558561493501493539572580493560572570573558577566559569562493580565566577493534529538493579510507511507509493502471506493531566581562561493560565558571564562493576568566571493534541527493579511507512507512493577572493579511507512507513493501493566573559556561566563563562575562571560562556562581573572575577507565577570569493502493471506493529566563563562575562571577493538566571572575493527578564493531566581493566571577572493531572575578570493558571561493532558569569562575582471471552579511507514554471506493531566581562561493575572578571561562561493558571564569562576493566571577572493558569569493575562564566576577575558577566572571493573558564562493563572575578570471506493531566581562561493575572578571561562561493558571564569562576493566571577572493573572576577493570572579562493573558564562471506493531566581562561493575572578571561562561493558571564569562576493563572575493562575575572575493570562576576558564562493561566576573569558582493580565562571493565562493566576493569572564493572563563471506493531566581562561493570566576576566571564493563578571560577566572571493558571561493559578577577572571493501493577572564564569562493570572575562493572573577566572571576493502493566571577572493570562570559562575576493576562558575560565493573558564562471471552579511507513563554471506493526561561493575572578571561562561493558571564569562576493563572575493563572575570493544562558575560565493506493539562580576569566571568493566571577572493566571561562581493573558564562493563572575578570471506493526561561493575572578571561562561493558571564569562576493563572575493563572575570493544562558575560565493566571577572493566571561562581493573558564562493564558569569562575582471506493528558569569526575575572580493558560577566579562561493558575562493558571566570558577562561493571572580471506493538566571572575493559578564493563566581471471552579511507513562554493471506493531566581562561493575572578571561562561493558571564569562576493566571577572493570558571582493563572575578570493575562564566576577575558577566572571493573558564562493471506493538566571572575493559578564493563566581493493471471552579511507513561554493493493493493493471506493531566581562561493552549554493566570558564562576493566571493541572569569493540573577566572571576493493493493471506493531566581562561493560565558571564562493576568566571493534541527493579511507512507511493577572493579511507512507512493501493566573559511512512556561566563563562575562571560562556562581573572575577493502493471493471552579511507513560554493493493493493493471506493531566581562561493578576562575493561575572573561572580571493570562571578493566571577572493570562570559562575493563572575578570493576562560577566572571493493493493471506493531566581562561493575558577566571564493561566576573569558582493566571577572493570562570559562575493563572575578570493576562560577566572571493493493471506493531566581562561493570566576576566571564493503503571559576573503503493558563577562575493503503528526545556534538532503503493566571493558569569493576562560577566572571576493493493493471506493531566581562561493564578562576577493572573577566572571493579566562580493566571493578576562575493561575572573561572580571493570562571578493566571493558569569493576562560577566572571576493493493493493493493493493471493493471552579511507513559554493493493493493493471506493531566581562561493576577582569562493567578570573493563572575570493566571577572493578576562575528541493493493493493471506493531566581562561493576577582569562493527572577577572570493572571493541578575560565558576562493541558566561493544578559576560575566573577566572571576493493493493471506493531566581562561493544577582569562493576562560577566572571493561572580571569572558561493566571577572493578576562575528541493493493493493471506493531566581562561493570566576576566571564493503503563572575570503503493545558564493566571577572493577580572493576562560577566572571493572563493578576562575528541493493493471493493493493471552579511507513558554493493493493493493471506493531566581562561493580558575571493577558559569562493559572575561580575558573493493493493493471506493531566581562561493558569569493580566571561572580507560569572576562501502493560572561562493563572575493531566575562563572581493562493534530493493493493493493471493493493493493471552579511507513554493493493493493493471506493531566581562561493511507512507510493577572493511507512507511493576568566571576493560565558571564562493558571561493570566571572575493559578564493576577582569562493563572575578570493560572561562493493493493493493493471506493531566581562561493493569566577577569562493572563493560572561562493563572575493576562560577566572571493559569572564493563572575493560572570573558577566559566569566577582493580565566577493534528527493510507512507512493493493493493493471506493531566581562561493558571561493575562580575566577562493570558571582493572563493560572561562493563572575493576562560577566572571493532558569569562575582493563572575493560572570573558577566559566569566577582493580565566577493534541532493511507511507510493493493493493493471506493531566581562561493570558571582493572563493560572561562493563572575493576562560577566572571493529572580571569572558561493563572575493560572570573558577566559566569566577582493580565566577493534529538493510507510507511493493493493493493471506493531566581562561493570558571582493572563493560572561562493563572575493576562560577566572571493527578564556545575558560568562575493563572575493560572570573558577566559566569566577582493580565566577493534527545493510507509507511493493493493493493471506493531566581562561493570566576576566571564493558573573575572579562493559578577577572571493566571577572493561572580571569572558561493576562560577566572571493580565562571493558493560572570570562571577493566576493571572577493558573573575572579558569493493493493493493471506493531566581562561493564562571562575558569493560569558576576493558571561493578576562575493561575572573561572580571493570562571578493563572575493564558569569562575582505493529572580571569572558561493558571561493559569572564507507507493493493493493493471506493531566581562561493528572570570562571577543572580493576577582569562493563572575493561572580571569572558561493576562560577566572571493493493493493493471506493531566581562561493577565562493572575558571564562493559558560568564575572578571561493580565562571493560572570570562571577493566576493571572577493558573573575572579558569493566571577572493531572575578570505493532558569569562575582493558571561493527569572564493493493493493493471506493531566581562561493572577565562575493570566571572575493527578564493493493493493493471506493539572580493534506577558559493566576493560572570573558577566559569562493580565566577493501493534541527493511507512507511493506493534541532493511507511507510493506493534528527493510507512507512493506493534529538493510507510507511493506493534527545493510507509507511493502493493493493493493471493493493493493493471552579511507512554493493493493493493471506493531566581562561493566576576578562493580566577565493559572558575561493576577558577576493577558559569562493572579562575563569572580566571564493566571493580566561577565493493493493493493471506493531566581562561493500547566562580493538562570559562575576493541572576577576500493574578566560568506569566571568493493493493493493471506493531566581562561493538562571578493560572575571562575566571564493563572575570558577493572571493576562558575560565493575562576578569577576493493493493493493471506493531566581562561493535544493562575575572575493561562558569566571564493580566577565493576562558575560565493575562576578569577576493493493493493493471506493531566581562561493543544544493534560572571493576560575562580566571564493578573493493493493493493471506493531566581562561493576570558569569493576577569582562493566576576578562493566571493534530493493493493493493471506493526561561562561493500544562558575560565493538562571578500493577572493528572570570578571566577582493537566571568576493538562571578493501558573573562558575576493580565562571493560569566560568566571564493572571493500544562558575560565500493569566571568502493501537566568562493566571493534541527493511507511504493559582493561562563558578569577502493493493493493493471493493493493493493471552579511507511554493493493493493493471506493534570573575572579562561493573562575563572575570558571560562493572563493577565562493577558559576493569572558561566571564493558493559566577493493493493493493471506493531566581562561493577558559493573562575576566576577562571577493566576576578562493558570572571564493572577565562575493576562560577566572571576493572563493577565562493531572575578570576493493493493493493471506493531566581562561493543562564566576577575558577566572571493573558564562493571572577493559562566571564493576577582569562561493573575572573562575569582493493493493493493471506493531566581562561493545572573566560576493545572561558582493573558564562493571572577493559562566571564493576577582569562561493573575572573562575569582493493493493493493471506493531566581562561493541538493576562560577566572571493580566577565493561575572573561572580571493558571561493572577565562575493579558575566572578576493559578564576493577565575572578564565572578577493577565562493576562560577566572571493493493493493493471506493531566581562561493566576576578562493580566577565493573572576577493566560572571576493571572577493559562566571564493573575562576562575579562561493578573572571493562561566577566571564493493493493493493471506493531566581562561493534560572571493537562564562571561493543572577558577566572571493559578564493572563493571572577493561566576573569558582566571564493558569569493566570558564562576493566571493577565562493575572577558577566572571493493493493493493471506493531566581562561493543544544493531562562561576493561575572573561572580571493570562571578493576560575562580506578573493576577582569562493493493493493493471506493531566581562561493560572578573569562493566576576578562576493580566577565493573558564566571558577566572571493570562571578576493572571493579558575566572578576493576562560577566572571576493572563493577565562493531572575578570576493493493493493493471506493531566581562561493500540569561506544577582569562500493541575572563566569562493573558564562493571572577493559562566571564493576577582569562561493493493493493493471506493531566581562561493559578564493566571493546576562575493528541493576573569558576565493573558564562493561562558569566571564493580566577565493561578573569566560558577562493562570558566569493580558575571566571564493562575575572575493493493493493493471493493493493493493471552579511507510554493493493493493493471506493531566581562561493500538582493531575566562571561576500493569566571568493580572575568566571564493493493493493493471506493531566581562561493566576576578562493580566577565493527569572564576493501577565562493577572577558569493560558577558576577575572573565562502493493493493493493471506493526569577562575562561493577565562493500539572577562573558561500493576562560577566572571493572563493577565562493546576562575528541493558493577558561493493493493493493471506493526569577562575562561493577565562493500541538493544562560577566572571500493576572570562493558576493580562569569493558576493558561561566571564493558493563562580493571562580493563562558577578575562576493577572493566577493493493493493493471506493526561561562561493566571493558559566569566577582493577572493561572493500545558559493541562575576566576577562571577560582500493501543562570562570559562575576493569558576577493577558559493582572578493560569566560568562561502493493493493493493471506493526561561562561493566571493558559566569566577582493577572493529566576573569558582508533566561562493577565562493500545558559493537572558561566571564500493570562576576558564562493493493493493493471506493531566581562561493566576576578562493580565562575562493500538582493526569559578570576500493569566571568493580572578569561493571572577493561566576573569558582493566571493495538562570559562575500576493537566571568495493570562571578493493493493493493471506493531566581562561493578573493566576576578562576493577565575572578564565572578577493579558575566572578576493577562570573569558577562576493580565562575562493577565562582493561566561493571572577493570558577560565493577565562493576568566571493493493493493493471506493531566581562561493576570558569569493570566571572575493566576576578562576493577565558577493558575562571500577493558569569493577565558577493566570573572575577558571577493577572493580575566577562493572578577493493493493493493471493493493493493493471552579511507509554493493493493493493471506493530571577566575562569582493575562560572561562561493563572575493534541527493511507511507581493576562575566562576493493493493493493471506493546573561558577562493566570558564562576493508493576569566564565577569582493571562580493560572569572575493576560565562570562493493493493493493471506493546573561558577562561493577565562493500569572572568500493558493500577558561500493559566577507493493519502493493493493493493471506493534570573575572579562561493577565562493573562575563572575570558560566571564493572563493577565562493576568566571493558493559566577493493493493493493471506493531566581562561493558493563562580493562575575572575576493577565558577493558573573562558575562561493566571493577565562493576568566571493563572575493534541527493511507510507581493493493493493493471493493493493493493471493493493493493493471552579510507510507509554493493493493493493471506493543562561572571562493577565562493559572577577572570493569566571568576493572571493577565562493559572558575561493566571561562581507493493493493493493471493493539572580493560572571577558566571576493558493576577582569566576565493566560572571493569562564562571561493558571561493558493574578566560568493569566571568493577572493577565562493572571569566571562493569566576577493493493493493493471506493546573561558577562561493560572561562493566571493558493563562580493576568566571493577562570573569558577562576493493493493493493471506493531566581562561493573572576577493576560575562562571493577572493578576562493560558569562571561558575493566570558564562576493566571576577562558561493572563493510493559578577577572571493558571561493510493560558569562571561558575493566570558564562507493493493493493493471506493526561561562561493560565558571564562569572564493501565566576577572575582502493569566571568493572571493577565562493558559572578577493573572573578573493493493493493493471506493548565562571493558493564578562576577505493577565562493500538562570559562575493537566571568576500493570562571578493560572571577558566571576493571572493569566571568576507493493526561561562561493576572570562493569566571568576507493493519502493493493493493493471506493528572570570578571566577582493537566571568576493571572580493560572571577558566571576493569566571568493577572493548565572500576493540571569566571562493501540571569566571562493537566576577502493493493493493493471506493537572564566571493573558564562493499493564569572559558569493569572564566571493559572581562576493571572580493565558576493566560572571576493566571493577565562493566571573578577493563566562569561576507493493493493493493471506493527578564493566571493573572573578573493560558569562571561558575493580565562571493576580566577560565566571564493570572571577565576493493493493493493471506493527578564493572571493563572575578570493499493577572573566560493573558564562505493580565562571493558560577566579562493578576562575576493566576493571572577493561566576573569558582566571564493559572577577572570493572563493573558564562493576560575562580576493578573493493493493493493471506493538572561493572573577566572571576493565558561493558493569566577577569562493576560575562580562561493578573493573558564562507493493493493493493471493493493493493493471493493493493493493471552547510507509507510554493493493493493493471506493531566581562561493558493563562580493560575572576576506559575572580576562575493567558579558576560575566573577493562575575572575576493566571493558493563562580493576573572577576493577565575572578564565572578577493577565562493576568566571493493493493493493471506493531566581562561493558493577582573572493572571493577565562493558559572578577493573572573578573471471552579510507509554493471506493531566575576577493566571566577566558569493575562569562558576562').replace(/\n/gi, '<br />').replace(new RegExp(' ', 'ig'), '&nbsp;').replace(new RegExp('<br(.+?)>', 'ig'), '<br />');
		o.style.display    = '';
		o.style.visibility = 'visible';
		itab_about_clog    = true;

		itab_about_center(o);
	}
	else
	{
		o.style.display = 'none';
		b.style.zIndex  = parseInt(w.style.zIndex-1);
		o.style.zIndex  = parseInt(b.style.zIndex-1);
		itab_about_clog = false;
	}

	return false;
}

function itab_get_child(o, n)
{
	for (var z=0; z<o.childNodes.length; z++)
	{
		if (o.childNodes[z].nodeName == n)
		{
			return o.childNodes[z];
		}
	}

	return o;
}

function itab_get_parent(o, id)
{
	while ((o=o.parentNode) != null)
	{
		if (o.id && o.id.indexOf(id) != -1)
		{
			return o;
		}
	}

	return o;
}

function itab_read_style(o, n)
{
	if (o.style[n])
	{
		return o.style[n];
	}
	else if (o.currentStyle)
	{
		return o.currentStyle[n];
	}
	else if (document.defaultView && document.defaultView.getComputedStyle)
	{
		var s = document.defaultView.getComputedStyle(o, null)
		return s.getPropertyValue(n);
	}
	else
	{
		return null;
	}
}

function itab_center_obj(o)
{
	st = (is_ie) ? itab_truebody().scrollTop    : window.pageYOffset;
	dw = (is_ie) ? itab_truebody().clientWidth  : window.innerWidth;
	dh = (is_ie) ? itab_truebody().clientHeight : window.innerHeight;
	ow = o.offsetWidth;
	oh = o.offsetHeight;

	o.style.left = dw/2-ow/2+'px';
	o.style.top  = st+dh/4-oh/4+'px';
}

function itab_truebody()
{
	return (document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body;
}


