$(document).ready(function() {
	$("#loginWindow").hide();
});
function showLoginWindow() {
	
};

function Elem(type, id, styleClass, content) {
	if (typeof type == "object") {
		var elem = document.createElement(type.tag);
		for (var i in type) {
			if (i.toLowerCase() == "tag") continue;
			elem.setAttribute(i, type[i]);
		}
		if ( type.content != undefined) elem.innerHTML = type.content;
		return elem;
	}
	if (type == "clear") return new Elem("div", "", "clear");

	var _elem = document.createElement(type);
	if (id != undefined && id != "") _elem.setAttribute("id", id);
	_elem.setClass = function(className) {
		_elem.setAttribute("class", className);
		_elem.setAttribute("className", className);
	};
	if (styleClass != undefined && styleClass != "") _elem.setClass(styleClass);
	if (content != undefined) _elem.innerHTML = content;
	if ( !_elem.addEventListener ) {
		_elem.addEventListener = function(eventName, action) {
			this.attachEvent("on"+eventName, action);
		};
		_elem.removeEventListener = function(eventName, action) {
			this.detachEvent("on"+eventName, action);
		};
	}

	return _elem;
};

function $Obj(id) { 
	return document.getElementById(id);
}
