
function getE(id){
	return document.getElementById(id);
}

function defined(x){
	return typeof(x) != 'undefined' && x != null;
}

function addListener(element, event, func){
	if(element.attachEvent)
		element.attachEvent('on' + event, function(){ func(window.event) });
	else if(element.addEventListener)
		element.addEventListener(event, func, false);
}

function ShowWin(url,x,y,name,isscrollbars, menubar) {
	cx=screen.width/2-(x/2);
	cy=screen.height/2-(y/2);
	isscrollbars=(isscrollbars=="no")?"no":"yes";
	if(name == null) name="_blank";
	if(menubar == null) menubar = 'no';
	window.open(url,name,"toolbar=no,status=no,directories=no,menubar="+menubar+",resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}


function popupHotel(url, print) {
	ShowWin(url, 800, 600, '', 'yes', print?print:'no');
	return false;
}
