// Title: Tigra Menu GOLD
// URL: http://www.softcomplex.com/products/tigra_menu_gold/
// Version: 2.4
// Date: 05-22-2003 (mm-dd-yyyy)
// Technical Support: support@softcomplex.com (specify product title and order ID)
// Notes: Registration needed to use this script legally.
// Visit official site for details.

// Please, don't modify this file

document.write('<style>.mlyri{' + (navigator.userAgent.indexOf('Gecko') > -1 ? '' : 'width:1;height:1;') + 'position:absolute;left:0;top:0}.mlyrh{' + (navigator.userAgent.indexOf('Gecko') > -1 ? '' : 'width:1;height:1;') + 'position:absolute;left:0;top:0;visibility:hidden}</style>');

function doc () {
	this.isIE = navigator.userAgent.indexOf('MSIE') > -1;
	this.isIE4 = navigator.userAgent.indexOf('MSIE 4') > -1;
	this.isIE6 = navigator.userAgent.indexOf('MSIE 6') > -1;
	this.onload = doc_load;
	this.getElem = document.all ?
		function (i) { return document.all[i] } : function (i) { return document.getElementById(i) };
	this.getOffs = function (n, init_x, init_y) {	
		var sz = { 'x' : init_x, 'y' : init_y };
		for(; n; n = n.offsetParent) { sz.x += n.offsetLeft; sz.y += n.offsetTop }
		return sz;
	};
	this.divBlink = function (div, is_vis) { 
		div.style.visibility = is_vis ? 'visible' : 'hidden' 
	};
	this.divMove = function (div, coord) { 
		div.style.left = coord.x + 'px';
		div.style.top = coord.y + 'px'; 
	};
	this.divSize = function (div, dim) { return div[dim ? 'offsetHeight' : 'offsetWidth'] };
}

function TMGSelectsHide (b_hide) {
	var b_needed = false;
	for (var i in menus) if (menus[i].last_item != null) b_needed = true;
	if (b_needed && b_hide) return;
	for (i in this.a_forms) {
		var o_form = document.forms[i];
		if (o_form != null) {     //GB06192003
			for (var j = 0; j < o_form.elements.length; j ++) {
				if (o_form.elements[j] != null); {     //GB06192003
					var o_elem = o_form.elements[j];
					if (o_elem.type.indexOf('select-') > -1)
						o_elem.style.visibility = o_elem.style.overflow = b_hide ? 'visible' : 'hidden';
				}
			}
		}
	}
}
// --------------------------------------------------------------------------------
// menu methods
// --------------------------------------------------------------------------------
function menu_build (table) {
	document.write(['<div', this.is_master || top == window ? '' : ' class=mlyrh', ' id="m', this.id,	'"><table class="', this.items[0].getCSS('table'), '" cellpadding="', table[0], '" cellspacing="', table[1], '" border="', table[2], '"><tr class=kut_menu_tr>', this.subHTML.join(''), '</tr></table></div>'].join(''));
	this.main = o_doc.getElem('m' + this.id);
}

// --------------------------------------------------------------------------------
// browser independent methods
// --------------------------------------------------------------------------------
function mitem_buildSub() {
	var depth_sub = this.depth + 1, 
		o_child = this.a_kids[0],
		table = o_child.getProp('table');

	if (o_doc.isIE4) {
		document.body.insertAdjacentHTML("afterBegin",['<div class=mlyrh style="z-index:', depth_sub, '" id="m', this.o_root.id, 'a', this.id, '"></div>'].join(''));
		this.subling = o_doc.getElem('m' + this.o_root.id + 'a' + this.id);
	}	
	else {
		this.subling = document.createElement('div');
		document.body.appendChild(this.subling);
		this.subling.className = 'mlyrh';
		this.subling.style.zIndex = this.depth * 3 + 2;
	}

	if (o_child.getProp('transition') && document.body.style.filter != null) {
		var t = o_child.getProp('transition'), filter = '';
		if (this.filterExp = t[0] != null)
			filter += [' ', t[0] ? 'reveal' : 'blend', "Trans(duration=", t[1], ",transition=", t[0], ")"].join('');
		if (t[2] != null) {
			filter += [' ', t[2] ? 'reveal' : 'blend', "Trans(duration=", t[3], ",transition=", t[2], ")"].join('');
			this.filterCol = this.filterExp ? 1 : 0;
		}
	this.subling.style.filter = filter;
	}
	this.subling.innerHTML = ['<table cellpadding="', table[0], '" cellspacing="', table[1], '" border="', table[2], '" class="', o_child.getCSS('table'), '"><tr class=kut_menu_tr>', this.subHTML.join(''), '</tr></table>'].join('');

	if (o_doc.isIE) {
		if (!o_doc.isIE4 && o_child.o_shadow) {
			document.body.insertAdjacentHTML("afterBegin",['<div style="position:absolute;filter:blur(strength=4,direction=', Math.atan2(-o_child.o_shadow.offY, o_child.o_shadow.offX)/Math.PI*180, ');background:', o_child.o_shadow.color, ';z-index:', this.depth * 3 + 1, ';width:', this.subling.offsetWidth, ';height:', this.subling.offsetHeight, '" id="m', this.o_root.id, 'sh', this.id, '"></div>'].join(''));
			this.sublingShad = document.getElementById('m' + this.o_root.id + 'sh' + this.id);
		} 
		if (o_doc.isIE6) {
			document.body.insertAdjacentHTML("afterBegin",['<iframe style="position:absolute;filter:alpha(opacity=0);z-index:', this.depth * 3 + 1, ';width:', this.subling.offsetWidth + (o_child.o_shadow ? o_child.o_shadow.offX : 0), ';height:', this.subling.offsetHeight + (o_child.o_shadow ? o_child.o_shadow.offY : 0), '" id="m', this.o_root.id, 'if', this.id, '" src="', o_doc.pix, '"></iframe>'].join(''));
			this.sublingBack = document.getElementById('m' + this.o_root.id + 'if' + this.id);
		}
	}
}

function mitem_build(w, h) {
	return ['<td><div style="position:relative;margin:0;width:', w, ';height:', h, '"><div class=mlyri><table cellpadding="0" cellspacing="0" border="0" width="', w, '" height="', h, '" class="', this.getCSS('outer', 0), '" id="m', this.o_root.id, 'tb', this.id, '"><tr class=kut_menu_tr><td class="', this.getCSS('inner', 0), '" id="m', this.o_root.id, 'td', this.id, '">', typeof(this.fields[0]) == 'object' ? this.fields[0][0] : this.fields[0], '</td></tr></table></div><div class=mlyrh id="m', this.o_root.id, 'i', this.id, '"><table cellpadding="0" cellspacing="0" border="0" width="', w, '" height="', h, '" class="', this.getCSS('outer', 1), '"><tr class=kut_menu_tr><td class="', this.getCSS('inner', 1), '">', typeof(this.fields[0]) == 'object' ? this.fields[0][1] : this.fields[0], '</td></tr></table></div><div class=mlyri><a href="', this.fields[1] ? this.fields[1] : 'javascript:', '"', this.o_cfg_cust.tw ? ' target="'	+ this.o_cfg_cust.tw + '"' : '', ' onclick="return menus[\'', this.o_root.id, '\'].exec(', this.id, ',0)" onmouseout="menus[\'', this.o_root.id, '\'].exec(', this.id, ',1)" onmouseover="menus[\'', this.o_root.id, '\'].exec(', this.id, ',2)" onmousedown="menus[\'', this.o_root.id, '\'].exec(', this.id, ',3)"><img src="', o_doc.pix, '" width="', w,'" height="', h, '" border="0"', this.o_cfg_cust.tt ? ' alt="' + this.o_cfg_cust.tt + '"' : '', '></a></div></div></td>', this.arrpath[this.depth] != this.o_parent.child_count - 1 && this.o_parent.a_kids[0].b_vertical ? '</tr><tr class=kut_menu_tr>' : ''].join('');
}

function mitem_links() {
	this.elements = [
		o_doc.getElem(['m', this.o_root.id, 'td', this.id].join('')),
		o_doc.getElem(['m', this.o_root.id, 'tb', this.id].join('')),
		o_doc.getElem(['m', this.o_root.id, 'i', this.id].join(''))
	];
}
// swithces states of menu item
function mitem_state(state) {
	if (state == this.state) return;
	if (this.state == 1) this.elements[2].style.visibility = 'hidden';
	else if (this.state == 2) {
		if (typeof(this.fields[0]) == 'object') this.elements[0].innerHTML = this.fields[0][0];
		this.elements[1].className = this.getCSS('outer', 0);
		this.elements[0].className = this.getCSS('inner', 0);
	}
	if (state == 1) this.elements[2].style.visibility = 'visible';
	else if (state == 2) {
		if (typeof(this.fields[0]) == 'object') this.elements[0].innerHTML = this.fields[0][2];
		this.elements[1].className = this.getCSS('outer', 2);
		this.elements[0].className = this.getCSS('inner', 2);
	} 
	this.state = state;
}
// --------------------------------------------------------------------------------
// collapses menu to the level specified
function mitem_collapse(to_level) {
	if (this.subling) {
		for (var i in this.a_kids) this.a_kids[i].set_state(0);
		if (this.sublingShad)	o_doc.divBlink(this.sublingShad);	
		if (this.sublingBack)	o_doc.divBlink(this.sublingBack);
		if (this.o_root.trans) this.o_root.trans.stop();
		if (this.filterCol != null) try {
			this.o_root.trans = this.subling.filters[this.filterCol];
			this.subling.filters[this.filterCol].apply();
		} catch(e) {}
		o_doc.divBlink(this.subling);	
		if (this.filterCol != null) 
			try {this.subling.filters[this.filterCol].play()} catch(e) {};
	}
	if (to_level >= this.depth) {
		if (this != this.o_root.o_hovered) this.set_state(0);
	}
	else this.o_parent.collapse(to_level);
}
// expands menu to calling items
function mitem_expand() {
	if (this.o_root.last_item && this.depth <= this.o_root.last_item.depth)
		this.o_root.last_item.collapse((this.o_root.last_item.o_parent == this) * 1 + this.depth);
	this.o_root.last_item = this;
	if (this.child_count > 0) {
		if (this.o_root.trans) try {this.o_root.trans.stop()} catch(e) {};
		if (!this.subling && this.child_count > 0)
			this.f_born_kids();
		this.pos();
		if (this.filterExp) try {
			this.o_root.trans = this.subling.filters[0];
			this.subling.filters[0].apply();
		} catch(e) {};
		if (o_doc.isIE && !o_doc.isIE6) this.o_root.selectsHide();
		o_doc.divBlink(this.subling, true);
		if (this.filterExp) try {this.subling.filters[0].play()} catch(e) {};
		if (this.sublingShad)	o_doc.divBlink(this.sublingShad, true);	
		if (this.sublingBack)	o_doc.divBlink(this.sublingBack, true);
	}
}


