function popup(name, url, width, height, args) {
		var newWin = new Object();

		newWin.args = args;
		newWin.url = url;
		newWin.name = name;
		newWin.width = width;
		newWin.height = height;

		if (document.layers) {// browser is NN
			newWin.left = window.screenX + ((window.outerWidth - newWin.width) / 2);
			newWin.top = window.screenY + ((window.outerHeight - newWin.height) / 2);
			var attr = 'screenX=' + newWin.left + ',screenY=' + newWin.top + ',resizable=yes,width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
		}
		else {// browser is MSIE
			newWin.left = (screen.width - newWin.width) / 2;
			newWin.top = (screen.height - newWin.height) / 2;
			var attr = 'left=' + newWin.left + ',top=' + newWin.top + ',scrollbars=1,' + ',width=' + newWin.width + ',height=' + newWin.height + ',' + newWin.args;
		}

		newWin.win=window.open(newWin.url, newWin.name, attr);
		newWin.win.opener=self;
		newWin.win.focus();
	}
	
	
function getmydate(obj){
	return document.all[obj].value;
	}
	
	
	
function UpdatePrices(){
//TotalField
//CUSTOHIDXX
//STOCKDD
//RoomsIDHID
	_Rooms = document.all['RoomsIDHID'];
	_s_ids = _Rooms.value;
//alert(_s_ids);
	_ids = _s_ids.split(',');
//alert(_ids[0]);
//alert(_ids.length);
	var newtotal = 0;
	var i;
	for(i=0;i<_ids.length;i++){
		/*
//alert('quartoID: '+_ids[i]);
		CUSTO = eval(document.all['CUSTOHID'+_ids[i]].value);
//alert('Custo: '+CUSTO);
		STOCK = eval(document.all['STOCKDD'+_ids[i]].value);
		newtotal = newtotal + eval(CUSTO*STOCK);
//alert('Somatorio: '+newtotal);
		*/
		Preco = eval(document.all['STOCKDD'+_ids[i]].value);
//alert('Preco a somar: '+Preco);
		newtotal = newtotal + eval(Preco);
//alert('Somatorio: '+newtotal);
	}
	TOTAL = document.all['TotalField'];
	TOTAL.value = newtotal;
}