function loadFlashBanner() {
	document.getElementById('flash_banner').innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="548" height="48" bgcolor="#000000"><param name="movie" value="../../stripe_elegance-cut.swf"><param name="quality" value="high"><embed src="../../stripe_elegance-cut.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="548" height="48"></embed></object>';
}

function Menu() {
	this.i_items = Array();
}

Menu.prototype.items = function() {
	return this.i_items;
}
Menu.prototype.addItem = function(item) {
	this.i_items[this.i_items.length] = item;
	return item;
}
Menu.prototype.getMenu = function() {
	if (this.i_menu == undefined) {
		this.i_menu = document.createElement('DIV');
		this.i_menu.className = "Menu";
		for (var x = 0; x < this.i_items.length; x++) {
			this.i_menu.appendChild(this.i_items[x].getItem(x == this.i_items.length - 1));
		}
	}
	return this.i_menu;
}


function MenuItem(text, url) {
	this.i_text = text;
	this.i_url = url;
	this.i_children = Array();
	this.i_active = 0;
}

MenuItem.prototype.children = function() {
	return this.i_children;
}

MenuItem.prototype.addChild = function(child) {
	this.i_children[this.i_children.length] = child;
	return child;
}

MenuItem.prototype.getContext = function() {
	if (this.i_context == undefined) {
		this.i_context = document.createElement('DIV');
		this.i_context.className = "MenuItemContext";
		this.i_context.style.display = "none";
		for (var x = 0; x < this.i_children.length; x++) {
			this.i_context.appendChild(this.i_children[x].getItem());
		}
		document.body.appendChild(this.i_context);
		CursorTracker.i_notify[CursorTracker.i_notify.length] = this.checkMenu;
		CursorTracker.i_menu_item[CursorTracker.i_menu_item.length] = this;
	}
	return this.i_context;
}

MenuItem.prototype.popMenu = function() {
	if (this.i_children.length == 0) {
		return true;
	}

	var tp = 0;
	var lf = 0;
	var nx = this.getItem();
	while (nx != null) {
		tp+=parseInt(nx.offsetTop);
		lf+=parseInt(nx.offsetLeft);
		nx = nx.offsetParent;
	}
	var otp = tp;
	tp+=parseInt(this.getItem().offsetHeight);
	this.getContext().style.left = lf + "px";
	this.getContext().style.top = tp + "px";
	this.getContext().style.display = "";
	
	this.i_left = lf;
	this.i_top = otp;
	
	this.i_cx_width = parseInt(this.getContext().offsetWidth);
	this.i_mi_width = parseInt(this.getItem().offsetWidth);

	this.i_cx_height = parseInt(this.getContext().offsetHeight);
	this.i_mi_height = parseInt(this.getItem().offsetHeight);
	
	this.i_open = true;

}

MenuItem.prototype.checkMenu = function() {

	
	var x = CursorTracker.getX();
	var y = CursorTracker.getY();
	
	if (y >= this.i_top && y < this.i_top + this.i_mi_height) {
		if (x >= this.i_left && x <= this.i_left + this.i_mi_width) {
			this.i_open = true;
			this.getContext().style.display = "";
			return true;
		}

	}
	if (this.i_open == true && y >= this.i_top + this.i_mi_height && y <= this.i_top + this.i_mi_height + this.i_cx_height) {
		if (x >= this.i_left && x <= this.i_left + this.i_cx_width) {
			this.getContext().style.display = "";
			this.i_open = true;
			return true;
		}
	}
	this.getContext().style.display = "none";
	this.i_open = false;
	

	
}

MenuItem.prototype.getItem = function(last) {
	if (this.i_item == undefined) {
		this.i_item = document.createElement('DIV');
		this.i_item.className = "MenuItem";
		this.i_item.innerHTML = this.i_text + (last != true ? "&nbsp;|" : "");
		this.i_item.pObj = this;
		
		this.i_item.onclick = function() {
			if (this.pObj.i_url != undefined && this.pObj.i_url != "") {
				window.location = this.pObj.i_url;
			}
		}
		
		this.i_item.onmouseover = function() {
			this.className = "MenuItem_hover";
			this.pObj.popMenu();
		}
		
		this.i_item.onmouseout = function() {
			this.className = "MenuItem";
		}
	}
	return this.i_item;
}


function MenuItemChild(text, url) {
	this.i_text = text;
	this.i_url = url;
}

MenuItemChild.prototype.getItem = function() {
	if (this.i_item == undefined) {
		this.i_item = document.createElement('DIV');
		this.i_item.className = "ContextMenuItem";
		this.i_item.pObj = this;
		this.i_item.innerHTML = this.i_text;
		
		this.i_item.onclick = function() {
			window.location = this.pObj.i_url;
		}
		
		this.i_item.onmouseover = function() {
			this.className = "ContextMenuItem_hover";
		}
		
		this.i_item.onmouseout = function() {
			this.className = "ContextMenuItem";
		}
	}
	return this.i_item;
}

function CursorTracker() {

}


CursorTracker.i_notify = Array();
CursorTracker.i_menu_item = Array();

CursorTracker.set = function(e) {
	CursorTracker.setXY(e);
	for (var x = 0; x < CursorTracker.i_notify.length; x++) {
		CursorTracker.i_notify[x].call(CursorTracker.i_menu_item[x]);
	}
	return true;
}

CursorTracker.getX = function() {
	return CursorTracker.mouseX;
}

CursorTracker.getY = function() {
	return CursorTracker.mouseY;
}


CursorTracker.setXY = function(e) {
	if (document.all) {
		CursorTracker.mouseX = event.clientX + document.body.scrollLeft;
		CursorTracker.mouseY = event.clientY + document.body.scrollTop;
	}
	else {
		CursorTracker.mouseX = e.pageX;
		CursorTracker.mouseY = e.pageY;
	}
	return true;
}

var bk = window.onload;
window.onload = function(e) {
	document.body.onmousemove = CursorTracker.set;
	if (bk != undefined) {
		bk(e);
	}
}