var target_y;

function make_gift_category(table) {
	if (!document.all) return false;
	var childNodes = table.firstChild.childNodes;

	table.onmouseout = function () {
		childNodes[2].className = "contracted";
		childNodes[3].className = "expanded";
		childNodes[4].className = "expanded";
		childNodes[5].className = "expanded";
	}

	table.onmouseover = function () {
		childNodes[2].className = "expanded";
		childNodes[3].className = "contracted";
		childNodes[4].className = "contracted";
		childNodes[5].className = "contracted";
	}
}

function make_gift_category_tables() {
	var document_tables = document.getElementsByTagName("table");
	var gift_category_tables = new Array();

	for (var document_table_count = 0;
	     document_table_count < document_tables.length;
	     document_table_count++) {
		var document_table = document_tables[document_table_count];

		if (/gift_category/g.test(document_table.className)) {
			gift_category_tables[gift_category_tables.length] = document_table;
		}

		document_table = null;
	}
	for (var gift_category_table_count = 0;
	     gift_category_table_count < gift_category_tables.length;
	     gift_category_table_count++) {
		make_gift_category(gift_category_tables[gift_category_table_count]);
	}

	document_tables = null;
	gift_category_tables = null;
}

window.getHeight = function () {
	var height;
	try { if (self.innerHeight) height = self.innerHeight; } catch (error) { }
	try { if (document.documentElement.clientHeight) height = document.documentElement.clientHeight; } catch (error) { }
	try { if (document.body.clientHeight) height = document.body.clientHeight; } catch (error) { }
	return height;
}

window.getWidth = function () {
	var width;
	try { if (self.innerWidth) width = self.innerWidth; } catch (error) { }
	try { if (document.documentElement.clientWidth) width = document.documentElement.clientWidth; } catch (error) { }
	try { if (document.body.clientWidth) width = document.body.clientWidth; } catch (error) { }
	return width;
}

window.onresize = function () {
	var height = (document.body.clientHeight) ? document.body.clientHeight : document.body.innerHeight;
	var width = (document.body.clientWidth) ? document.body.clientWidth : document.body.innerWidth;
	var select_category = document.getElementById("select_category");
}