function openWindow(aOb,width,height) {
	var url = aOb.getAttribute('href');
	width = width?width:865;
	height = height?height:622;
	var left = parseInt((screen.width - width)/2);
	var top = parseInt((screen.height - height)/2);
	var dsdWindow = window.open('','','left='+left+',top='+top+',width='+width+',height='+height+', toolbar=0, location=0, scrollbars=0, menubar=0, status=0');
	dsdWindow.document.write("<html><head><title>X-Control</title></head><body><center><img src=" + url + "></center></body></html>");
	return false;
}

function openWindowPort(aOb,width,height) {
	var url = aOb.getAttribute('href');
	width = width?width:1010;
	height = height?height:780;
	var left = parseInt((screen.width - width)/2);
	var top = parseInt((screen.height - height)/2);
	var dsdWindow = window.open('','','left='+left+',top='+top+',width='+width+',height='+height+', toolbar=0, location=0, scrollbars=0, menubar=0, status=0');
	dsdWindow.document.write("<html><head><title>X-Control</title></head><body><center><img src=" + url + "></center></body></html>");
	return false;
}

function openWindowContact(aOb) {
	var newImg = new Image();
	newImg.src = aOb;
	var height;
	if (newImg.height == 0)
		height = screen.height;
	else height = newImg.height + 20;
	var width = 800;
	var url = aOb.getAttribute('href');
	var left = parseInt((screen.width - width)/2);
	var top = parseInt((screen.height - height)/2);
	var dsdWindow = window.open('','','left='+left+',top='+top+',width='+width+',height='+height+', toolbar=0, location=0, scrollbars=1, menubar=0, status=0');
	dsdWindow.document.write("<html><head><title>X-Control</title></head><body><center><img src=" + url + "></center></body></html>");
	return false;
}

